오랜만에 TrueNAS 관리 화면에 들어가 봤더니 이런 오류 메세지가 있다. 검색을 해보니 SSH 접속을 해서 확인해 보라고 한다. 관리 화면의 Shell을 이용해도 되지만 화면 크기가 작아서 보기에 불편하니 SSH 접속을 해서 확인해 본다.
root@truenas[~]# zpool status
pool: boot-pool
state: ONLINE
status: Some supported and requested features are not enabled on the pool.
The pool can still be used, but some features are unavailable.
action: Enable all features using 'zpool upgrade'. Once this is done,
the pool may no longer be accessible by software that does not support
the features. See zpool-features(7) for details.
scan: scrub repaired 0B in 00:01:33 with 0 errors on Tue May 30 03:46:33 2023
config:
NAME STATE READ WRITE CKSUM
boot-pool ONLINE 0 0 0
ada4p2 ONLINE 0 0 0
errors: No known data errors
pool: share
state: ONLINE
status: One or more devices has experienced an unrecoverable error. An
attempt was made to correct the error. Applications are unaffected.
action: Determine if the device needs to be replaced, and clear the errors
using 'zpool clear' or replace the device with 'zpool replace'.
see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-9P
scan: scrub repaired 0B in 19:02:22 with 0 errors on Sun May 7 19:02:24 2023
config:
NAME STATE READ WRITE CKSUM
share ONLINE 0 0 0
raidz1-0 ONLINE 0 0 0
gptid/b0a454ea-fe6c-11ec-8729-28924a3ae9b0 ONLINE 0 0 0
gptid/b0b34dc0-fe6c-11ec-8729-28924a3ae9b0 ONLINE 0 0 0
gptid/b0bf6c41-fe6c-11ec-8729-28924a3ae9b0 ONLINE 9 0 0
gptid/b0cb7728-fe6c-11ec-8729-28924a3ae9b0 ONLINE 0 0 0
errors: No known data errors
읽기 에러가 발생한 것 같다. 저 UUID가 어떤 디스크인지 모르기 때문에 확인해 보아야 한다.
root@truenas[~]# glabel status
Name Status Components
gptid/b0cb7728-fe6c-11ec-8729-28924a3ae9b0 N/A ada0p2
gptid/b0bf6c41-fe6c-11ec-8729-28924a3ae9b0 N/A ada1p2
gptid/b0b34dc0-fe6c-11ec-8729-28924a3ae9b0 N/A ada2p2
gptid/4263c713-740d-11ec-aa30-28924a3ae9b0 N/A ada4p1
gptid/b0a454ea-fe6c-11ec-8729-28924a3ae9b0 N/A ada3p2
gptid/426904bf-740d-11ec-aa30-28924a3ae9b0 N/A ada4p3
smartctl 을 이용해서 SMART 보고서 내용을 확인해 본다.
root@truenas[~]# smartctl -a /dev/ada1
smartctl 7.2 2021-09-14 r5236 [FreeBSD 13.1-RELEASE-p7 amd64] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Family: Western Digital AV-GP (AF)
Device Model: WDC WD20EURX-64HYZY0
Serial Number: WD-WCC4M2246369
LU WWN Device Id: 5 0014ee 25f3ea517
Firmware Version: 80.00A80
User Capacity: 2,000,398,934,016 bytes [2.00 TB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Rotation Rate: 5400 rpm
Device is: In smartctl database [for details use: -P show]
ATA Version is: ACS-2 (minor revision not indicated)
SATA Version is: SATA 3.0, 6.0 Gb/s (current: 3.0 Gb/s)
Local Time is: Tue May 30 16:58:04 2023 KST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
General SMART Values:
Offline data collection status: (0x00) Offline data collection activity
was never started.
Auto Offline Data Collection: Disabled.
Self-test execution status: ( 0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: (26760) seconds.
Offline data collection
capabilities: (0x7b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 2) minutes.
Extended self-test routine
recommended polling time: ( 270) minutes.
Conveyance self-test routine
recommended polling time: ( 5) minutes.
SCT capabilities: (0x703d) SCT Status supported.
SCT Error Recovery Control supported.
SCT Feature Control supported.
SCT Data Table supported.
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x002f 200 200 051 Pre-fail Always - 34
3 Spin_Up_Time 0x0027 174 165 021 Pre-fail Always - 4300
4 Start_Stop_Count 0x0032 099 099 000 Old_age Always - 1602
5 Reallocated_Sector_Ct 0x0033 200 200 140 Pre-fail Always - 2
7 Seek_Error_Rate 0x002e 200 200 000 Old_age Always - 0
9 Power_On_Hours 0x0032 079 079 000 Old_age Always - 15443
10 Spin_Retry_Count 0x0032 100 100 000 Old_age Always - 0
11 Calibration_Retry_Count 0x0032 100 100 000 Old_age Always - 0
12 Power_Cycle_Count 0x0032 099 099 000 Old_age Always - 1582
192 Power-Off_Retract_Count 0x0032 199 199 000 Old_age Always - 1465
193 Load_Cycle_Count 0x0032 200 200 000 Old_age Always - 136
194 Temperature_Celsius 0x0022 112 079 000 Old_age Always - 35
196 Reallocated_Event_Count 0x0032 200 200 000 Old_age Always - 0
197 Current_Pending_Sector 0x0032 200 200 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0030 100 253 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always - 0
200 Multi_Zone_Error_Rate 0x0008 100 253 000 Old_age Offline - 0
SMART Error Log Version: 1
No Errors Logged
SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Short offline Completed without error 00% 15443 -
# 2 Short offline Completed without error 00% 15442 -
# 3 Short offline Completed without error 00% 15441 -
# 4 Short offline Completed without error 00% 15440 -
# 5 Short offline Completed without error 00% 15439 -
# 6 Short offline Completed without error 00% 15438 -
# 7 Short offline Completed without error 00% 15437 -
# 8 Short offline Completed without error 00% 15436 -
# 9 Short offline Completed without error 00% 15435 -
#10 Short offline Completed without error 00% 15434 -
#11 Short offline Completed without error 00% 15433 -
#12 Short offline Completed without error 00% 15432 -
#13 Short offline Completed without error 00% 15431 -
#14 Short offline Completed without error 00% 15430 -
#15 Short offline Completed without error 00% 15429 -
#16 Short offline Completed without error 00% 15428 -
#17 Short offline Completed without error 00% 15427 -
#18 Short offline Completed without error 00% 15426 -
#19 Short offline Completed without error 00% 15425 -
#20 Short offline Completed without error 00% 15424 -
#21 Short offline Completed without error 00% 15423 -
SMART Selective self-test log data structure revision number 1
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 Not_testing
2 0 0 Not_testing
3 0 0 Not_testing
4 0 0 Not_testing
5 0 0 Not_testing
Selective self-test flags (0x0):
After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.
보통 문제가 있는 부분은 197 Current Pending Sector 과 198 Offline Uncorrectable 이라고 한다. 일단 0으로 표시되어 있으니.. 보고서를 초기화 해 본다. ;(
일단 모두 0으로 초기화 되었다…
root@truenas[~]# zpool clear share
root@truenas[~]# zpool status
pool: boot-pool
state: ONLINE
status: Some supported and requested features are not enabled on the pool.
The pool can still be used, but some features are unavailable.
action: Enable all features using 'zpool upgrade'. Once this is done,
the pool may no longer be accessible by software that does not support
the features. See zpool-features(7) for details.
scan: scrub repaired 0B in 00:01:33 with 0 errors on Tue May 30 03:46:33 2023
config:
NAME STATE READ WRITE CKSUM
boot-pool ONLINE 0 0 0
ada4p2 ONLINE 0 0 0
errors: No known data errors
pool: share
state: ONLINE
scan: scrub repaired 0B in 19:02:22 with 0 errors on Sun May 7 19:02:24 2023
config:
NAME STATE READ WRITE CKSUM
share ONLINE 0 0 0
raidz1-0 ONLINE 0 0 0
gptid/b0a454ea-fe6c-11ec-8729-28924a3ae9b0 ONLINE 0 0 0
gptid/b0b34dc0-fe6c-11ec-8729-28924a3ae9b0 ONLINE 0 0 0
gptid/b0bf6c41-fe6c-11ec-8729-28924a3ae9b0 ONLINE 0 0 0
gptid/b0cb7728-fe6c-11ec-8729-28924a3ae9b0 ONLINE 0 0 0
errors: No known data errors
TrueNAS가 설치된 컴퓨터가 동작 중에 살짝 충격을 준 일이 있었다. 그 때는 몰랐는데, 그 충격으로 인하여 HDD 중 1개에 좀 문제가 생긴 것 같다. 일부 섹터에 인식 오류가 발생했다. 인터넷을 검색하여 보니 일단 문제가 생긴 섹터 수가 늘어나지 않은면 큰 문제는 아니라고 한다. 하지만 조만간 교체를 하는게 좋다는 내용이 다수였다.
2TB 하드 1개가 필요한 상황이었다. 집에서 사용하는 NAS를 업그레이드 하면서 남는 하드를 이용할 것인지 우선 고민했다. 그런데 이렇게 하면 컴퓨터 1개, NAS 2개 이렇게 총 3개가 필요했다. 그렇게 시간이 지나가는 중 중고 HDD를 구입하게 되었다. 충분한 연식이 있어 보였다. 일단 TrueNAS 서버의 빈 슬롯에 연결하였다.
교체하는 방법은 OS 에서 친절하게 알려주지 않았기 때문에 인터넷을 통해서 찾아볼 수 밖에 없었다. 문제가 발생한 하드를 제거하고 새 하드를 설치한 후 리빌딩 하는 방법을 시도해 볼 수 있을 것 같았다. 그런데, 그보다는 새거 하나를 추가한 후 스페어 설정을 하고 오류가 발생한 하드를 제거 하면서 교체를 하는 것이 더 안전하다는 글을 보았다. 이 방법으로 해보기로 했다.
나중에 알게 된 것인데 spare로 등록을 하지 않아서 교체가 되었다. 아마 하드웨어적으로 fault인 상황이 아니기 때문에 spare 상태에 머무르는 것 같았다. 이럴 때는 어떻게 해야하나 싶어서 이렇게도 저렇게 해보았다. 최종적으로 찾아낸 방법은 pool에 별도로 설정을 하지 않은 상태에서 replace를 하는 것이다. 이렇게 하면 추가한 하드와 오류가 발생한 하드가 서로 동기화 되는 과정이 진행된다. 약 2시간이 지난 후에 작업이 완료 되었다. 전원을 종료한 후 오류난 하드를 제거하고 같이 추가로 구입한 하드를 연결한 다음 이번에는 spare로 설정해 두었다.