Linux RAID5 어레이의 불량 블록 복구 - 중고 드라이브

Linux RAID5 어레이의 불량 블록 복구 - 중고 드라이브

핵심요약: 내가 구입한 하드 드라이브가 NAS 사본을 백업하는 데 사용해도 안전한가요?


저는 중고 Western Digital 3TB Red HDD 4개를 구입하여 제가 가지고 있는 예비 마이크로서버에 넣었습니다. 이 설정을 기존 온사이트(백업) NAS의 보조 오프사이트 백업 복사본으로 사용할 계획입니다.

.NET을 사용하여 각 드라이브에서 확장 자체 테스트를 실행했습니다 smartctl. 에 /dev/sdb대한 /dev/sdc세 가지 테스트는 & "오류 없이 완료되었습니다"이지만 "완료: 읽기 실패" /dev/sdd테스트입니다 ./dev/sda

  1. 이러한 불량 블록은 물리적 불량 블록입니까, 아니면 논리적 불량 블록입니까?
  2. 논리적이라면 어떻게 고칠 수 있나요?
  3. 물리적인 경우 RAID 어레이의 드라이브를 계속 사용해도 안전합니까, 아니면 새 드라이브를 구입하기 위해 실제로 돈을 써야 합니까?

나는 "에 관한 모든 것을 읽었습니다.불량 블록 작동 방법" 페이지이지만 RAID 어레이와 관련된 정보는 제공하지 않습니다. 특히 블록 번호를 계산할 때 RAID 오프셋을 고려하는 방법에 대해 설명합니다.

내가 읽고있다이 답변비슷한 질문에 누군가 "RAID 데이터 오프셋"을 고려해야 한다고 언급했지만 더 이상의 설명은 제공되지 않았습니다. 또한 RAID 5 대신 RAID 1 어레이도 있습니다. 내가 말하는 방정식은 다음과 같습니다.

 b = (int)((L-S)*512/B)

where:
b = File System block number
B = File system block size in bytes
L = LBA of bad sector
S = Starting sector of partition as shown by fdisk -lu
and (int) denotes the integer part.

또한 예제에서 다음을 실행하면 sudo fdisk -lu /dev/md0다음과 같은 결과가 나타납니다.

> sudo fdisk -lu /dev/md0
Disk /dev/md0: 8.19 TiB, 9001371697152 bytes, 17580804096 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 524288 bytes / 1572864 bytes

다음과 같은 드라이브 테이블 정보가 표시되지 않습니다. Device Boot Start End Blocks Id System

또한 다음을 실행할 때 더 이상 정보를 얻지 못합니다.sudo fdisk -lu /dev/sda

> sudo fdisk -lu /dev/sda
Disk /dev/sda: 2.75 TiB, 3000592982016 bytes, 5860533168 sectors
Disk model: WDC WD30EFRX-68A
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

이는 파티션의 시작 섹터를 모른다는 의미입니다 /dev/sda. RAID 데이터 오프셋 값 264192를 방정식에 대체하면 다음 S과 같이 됩니다. [(1342886576 - 264192) * 512] / 4096 = 167827798

그런 다음 을 실행하면 결과를 sudo hdparm --read-sector 167827798 /dev/sd0얻습니다 .reading sector 167827798: succeeded

따라서 블록/섹터 번호가 잘못되었거나 불량 블록이 실제로는 괜찮습니다.

누구든지 나를 더 도와줄 수 있나요? smartctl아래 출력을 포함했습니다 .


/dev/sda

  • 스마트 종합: 합격
  • 오랫동안 오프라인 상태: 읽기 실패
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.4.0-31-generic] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Western Digital Red
Device Model:     WDC WD30EFRX-68AX9N0
Serial Number:    WD-WMC1T3647350
LU WWN Device Id: 5 0014ee 6ae046f8e
Firmware Version: 80.00A80
User Capacity:    3,000,592,982,016 bytes [3.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
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:    Fri May 22 10:41:12 2020 CEST
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:      ( 113) The previous self-test completed having
                    the read element of the test failed.
Total time to complete Offline 
data collection:        (39900) 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:    ( 400) minutes.
Conveyance self-test routine
recommended polling time:    (   5) minutes.
SCT capabilities:          (0x70bd) 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       -       11
  3 Spin_Up_Time            0x0027   185   179   021    Pre-fail  Always       -       5741
  4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       41
  5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x002e   200   200   000    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   042   042   000    Old_age   Always       -       42583
 10 Spin_Retry_Count        0x0032   100   253   000    Old_age   Always       -       0
 11 Calibration_Retry_Count 0x0032   100   253   000    Old_age   Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       41
192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       27
193 Load_Cycle_Count        0x0032   200   200   000    Old_age   Always       -       13
194 Temperature_Celsius     0x0022   121   110   000    Old_age   Always       -       29
196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       4
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   200   200   000    Old_age   Offline      -       1

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  Extended offline    Completed: read failure       10%     42562         1342886576
# 2  Extended offline    Completed: read failure       90%     42534         1342886576
# 3  Short offline       Completed without error       00%     42534         -

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.

/dev/sdb

  • 스마트 종합: 합격
  • 오프라인 시간 연장: 오류 없이 완료됨
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.4.0-31-generic] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Western Digital Red
Device Model:     WDC WD30EFRX-68AX9N0
Serial Number:    WD-WMC1T3613933
LU WWN Device Id: 5 0014ee 6ae04400b
Firmware Version: 80.00A80
User Capacity:    3,000,592,982,016 bytes [3.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
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:    Fri May 22 10:47:03 2020 CEST
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:        (40860) 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:    ( 410) minutes.
Conveyance self-test routine
recommended polling time:    (   5) minutes.
SCT capabilities:          (0x70bd) 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       -       1
  3 Spin_Up_Time            0x0027   182   176   021    Pre-fail  Always       -       5858
  4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       58
  5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       1
  7 Seek_Error_Rate         0x002e   200   200   000    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   085   084   000    Old_age   Always       -       11555
 10 Spin_Retry_Count        0x0032   100   253   000    Old_age   Always       -       0
 11 Calibration_Retry_Count 0x0032   100   253   000    Old_age   Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       41
192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       28
193 Load_Cycle_Count        0x0032   200   200   000    Old_age   Always       -       12
194 Temperature_Celsius     0x0022   120   111   000    Old_age   Always       -       30
196 Reallocated_Event_Count 0x0032   199   199   000    Old_age   Always       -       1
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   200   200   000    Old_age   Offline      -       0

SMART Error Log Version: 1
ATA Error Count: 32 (device log contains only the most recent five errors)
    CR = Command Register [HEX]
    FR = Features Register [HEX]
    SC = Sector Count Register [HEX]
    SN = Sector Number Register [HEX]
    CL = Cylinder Low Register [HEX]
    CH = Cylinder High Register [HEX]
    DH = Device/Head Register [HEX]
    DC = Device Command Register [HEX]
    ER = Error register [HEX]
    ST = Status register [HEX]
Powered_Up_Time is measured from power on, and printed as
DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes,
SS=sec, and sss=millisec. It "wraps" after 49.710 days.

Error 32 occurred at disk power-on lifetime: 1796 hours (74 days + 20 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  04 61 42 10 51 6f ae  Device Fault; Error: ABRT

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  ef 03 42 10 51 6f ae 00  43d+23:51:57.394  SET FEATURES [Set transfer mode]
  ef 03 0c 10 51 6f ae 00  43d+23:51:57.393  SET FEATURES [Set transfer mode]
  ec 00 01 00 00 00 a0 00  43d+23:51:57.392  IDENTIFY DEVICE
  ef 90 06 00 00 00 40 00  43d+23:51:38.870  SET FEATURES [Disable SATA feature]
  ef 90 06 00 00 00 40 00  43d+23:51:38.869  SET FEATURES [Disable SATA feature]

Error 31 occurred at disk power-on lifetime: 1796 hours (74 days + 20 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  04 61 0c 10 51 6f ae  Device Fault; Error: ABRT

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  ef 03 0c 10 51 6f ae 00  43d+23:51:57.393  SET FEATURES [Set transfer mode]
  ec 00 01 00 00 00 a0 00  43d+23:51:57.392  IDENTIFY DEVICE
  ef 90 06 00 00 00 40 00  43d+23:51:38.870  SET FEATURES [Disable SATA feature]
  ef 90 06 00 00 00 40 00  43d+23:51:38.869  SET FEATURES [Disable SATA feature]
  ef 90 06 00 00 00 40 00  43d+23:51:38.869  SET FEATURES [Disable SATA feature]

Error 30 occurred at disk power-on lifetime: 1796 hours (74 days + 20 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  04 61 06 00 00 00 40  Device Fault; Error: ABRT

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  ef 90 06 00 00 00 40 00  43d+23:51:38.870  SET FEATURES [Disable SATA feature]
  ef 90 06 00 00 00 40 00  43d+23:51:38.869  SET FEATURES [Disable SATA feature]
  ef 90 06 00 00 00 40 00  43d+23:51:38.869  SET FEATURES [Disable SATA feature]
  ef 90 06 00 00 00 40 00  43d+23:51:38.868  SET FEATURES [Disable SATA feature]
  ef 90 06 00 00 00 40 00  43d+23:51:38.868  SET FEATURES [Disable SATA feature]

Error 29 occurred at disk power-on lifetime: 1796 hours (74 days + 20 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  04 61 06 00 00 00 40  Device Fault; Error: ABRT

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  ef 90 06 00 00 00 40 00  43d+23:51:38.869  SET FEATURES [Disable SATA feature]
  ef 90 06 00 00 00 40 00  43d+23:51:38.869  SET FEATURES [Disable SATA feature]
  ef 90 06 00 00 00 40 00  43d+23:51:38.868  SET FEATURES [Disable SATA feature]
  ef 90 06 00 00 00 40 00  43d+23:51:38.868  SET FEATURES [Disable SATA feature]
  ef 90 06 00 00 00 40 00  43d+23:51:38.867  SET FEATURES [Disable SATA feature]

Error 28 occurred at disk power-on lifetime: 1796 hours (74 days + 20 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  04 61 06 00 00 00 40  Device Fault; Error: ABRT

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  ef 90 06 00 00 00 40 00  43d+23:51:38.869  SET FEATURES [Disable SATA feature]
  ef 90 06 00 00 00 40 00  43d+23:51:38.868  SET FEATURES [Disable SATA feature]
  ef 90 06 00 00 00 40 00  43d+23:51:38.868  SET FEATURES [Disable SATA feature]
  ef 90 06 00 00 00 40 00  43d+23:51:38.867  SET FEATURES [Disable SATA feature]
  ef 90 06 00 00 00 40 00  43d+23:51:38.667  SET FEATURES [Disable SATA feature]

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Extended offline    Completed without error       00%     11531         -
# 2  Extended offline    Aborted by host               10%     11521         -
# 3  Short offline       Completed without error       00%     11506         -

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.

/dev/sdc

  • 스마트 종합: 합격
  • 오프라인 시간 연장: 오류 없이 완료됨
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.4.0-31-generic] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Western Digital Red
Device Model:     WDC WD30EFRX-68AX9N0
Serial Number:    WD-WMC1T3643940
LU WWN Device Id: 5 0014ee 60359ae37
Firmware Version: 80.00A80
User Capacity:    3,000,592,982,016 bytes [3.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
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:    Fri May 22 10:48:40 2020 CEST
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:        (40080) 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:    ( 402) minutes.
Conveyance self-test routine
recommended polling time:    (   5) minutes.
SCT capabilities:          (0x70bd) 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       -       0
  3 Spin_Up_Time            0x0027   182   177   021    Pre-fail  Always       -       5858
  4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       42
  5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x002e   200   200   000    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   042   042   000    Old_age   Always       -       42582
 10 Spin_Retry_Count        0x0032   100   253   000    Old_age   Always       -       0
 11 Calibration_Retry_Count 0x0032   100   253   000    Old_age   Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       42
192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       29
193 Load_Cycle_Count        0x0032   200   200   000    Old_age   Always       -       12
194 Temperature_Celsius     0x0022   120   111   000    Old_age   Always       -       30
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   200   200   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  Extended offline    Completed without error       00%     42558         -
# 2  Short offline       Completed without error       00%     42543         -

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.

/dev/sdd

  • 스마트 종합: 합격
  • 오프라인 시간 연장: 오류 없이 완료됨
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.4.0-31-generic] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Western Digital Red
Device Model:     WDC WD30EFRX-68AX9N0
Serial Number:    WD-WMC1T3642983
LU WWN Device Id: 5 0014ee 658ae70cd
Firmware Version: 80.00A80
User Capacity:    3,000,592,982,016 bytes [3.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
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:    Fri May 22 10:49:48 2020 CEST
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:        (40320) 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:    ( 404) minutes.
Conveyance self-test routine
recommended polling time:    (   5) minutes.
SCT capabilities:          (0x70bd) 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       -       0
  3 Spin_Up_Time            0x0027   181   175   021    Pre-fail  Always       -       5950
  4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       42
  5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x002e   200   200   000    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   047   047   000    Old_age   Always       -       39003
 10 Spin_Retry_Count        0x0032   100   253   000    Old_age   Always       -       0
 11 Calibration_Retry_Count 0x0032   100   253   000    Old_age   Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       42
192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       29
193 Load_Cycle_Count        0x0032   200   200   000    Old_age   Always       -       12
194 Temperature_Celsius     0x0022   120   112   000    Old_age   Always       -       30
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   200   200   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  Extended offline    Completed without error       00%     38979         -
# 2  Short offline       Completed without error       00%     38969         -

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.

출력은 다음에서 비롯됩니다. sudo mdadm --examine /dev/sda

> sudo mdadm --examine /dev/sda
/dev/sda:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x9
     Array UUID : 1457ad95:8434aaa1:93949de6:2e100471
           Name : remote-nas:0  (local to host remote-nas)
  Creation Time : Tue May 19 17:05:24 2020
     Raid Level : raid5
   Raid Devices : 4

 Avail Dev Size : 5860268976 (2794.39 GiB 3000.46 GB)
     Array Size : 8790402048 (8383.18 GiB 9001.37 GB)
  Used Dev Size : 5860268032 (2794.39 GiB 3000.46 GB)
    Data Offset : 264192 sectors
   Super Offset : 8 sectors
   Unused Space : before=264112 sectors, after=944 sectors
          State : clean
    Device UUID : 7dc7b151:ee18b088:a54a5a7d:201420d3

Internal Bitmap : 8 sectors from superblock
    Update Time : Fri May 22 10:02:30 2020
  Bad Block Log : 512 entries available at offset 24 sectors - bad blocks present.
       Checksum : e90608f7 - correct
         Events : 20196

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 0
   Array State : AAAA ('A' == active, '.' == missing, 'R' == replacing)

답변1

이러한 불량 블록은 물리적 불량 블록입니까, 아니면 논리적 불량 블록입니까?

둘 다입니다. 물리적(드라이브 자체)은 Completed: read failureSMART 테스트 결과입니다. 또한 재할당된/보류 중인/수정할 수 없는 블록에 대한 0이 아닌 값입니다.

논리(mdadm 메타데이터)는 불량 블록 bad blocks present로그 에 있습니다 mdadm. 이를 확인할 수도 mdadm --examine-badblocks있습니다(각 드라이브에 대해 개별적으로). 여러 드라이브에 동일한 불량 블록이 있는 경우 md 장치는 해당 드라이브에 대한 소프트 읽기 오류를 반환합니다.

RAID 어레이에서 드라이브를 계속 사용해도 안전합니까?

저는 SMART에 장애가 발생하거나 읽을 수 없는 섹터에 데이터가 손실된 드라이브를 신뢰하지 않습니다. 교체하고 쓰기-읽기-확인 테스트를 실시하고 결정을 내립니다.

논리적이라면 어떻게 고칠 수 있나요?

mdadm --replace이상적으로는 문제의 드라이브에서 불량 블록 로그 항목이 사라집니다.

항목이 여러 드라이브에서 동일하고(이러한 블록에 중복성이 없음) 교체 후에도 항목이 여전히 존재하고 md 어레이가 소프트 읽기 오류를 반환하는 경우 불량 블록 로그 강제 지우기를 사용할 수 있습니다 mdadm --assemble --update=force-no-bbl.

결과적으로 md 배열은 이 로그의 블록에 대해 올바르지 않거나 오래된 데이터를 반환할 수 있으며, 이로 인해 데이터가 손상될 수 있습니다.

관련 정보