불량 블록 수리

불량 블록 수리

얻은 후

WARNING: Your hard drive is failing
Device: /dev/sdb [SAT], 1 Offline uncorrectable sectors

난 달린다

$ sudo smartctl -a /dev/sdb
smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.10.0-514.26.2.el7.x86_64] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Device Model:     KingDian S200 60GB
Serial Number:    2017022100551
LU WWN Device Id: 0 000000 000000000
Firmware Version: P0707F1
User Capacity:    60,022,480,896 bytes [60.0 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    Solid State Device
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   ACS-2 T13/2015-D revision 3
SATA Version is:  SATA >3.1, 6.0 Gb/s (current: 3.0 Gb/s)
Local Time is:    Tue Oct  3 10:56:08 2017 BST
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:        (  120) seconds.
Offline data collection
capabilities:            (0x11) SMART execute Offline immediate.
                    No Auto Offline data collection support.
                    Suspend Offline collection upon new
                    command.
                    No Offline surface scan supported.
                    Self-test supported.
                    No Conveyance Self-test supported.
                    No Selective Self-test supported.
SMART capabilities:            (0x0002) Does not save 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:    (  10) minutes.

SMART Attributes Data Structure revision number: 1
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x0032   100   100   050    Old_age   Always       -       0
  5 Reallocated_Sector_Ct   0x0032   100   100   050    Old_age   Always       -       3
  9 Power_On_Hours          0x0032   100   100   050    Old_age   Always       -       4486
 12 Power_Cycle_Count       0x0032   100   100   050    Old_age   Always       -       13
160 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       1
161 Unknown_Attribute       0x0033   100   100   050    Pre-fail  Always       -       98
163 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       0
164 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       9724
165 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       9
166 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       1
167 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       5
168 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       1500
169 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       100
175 Program_Fail_Count_Chip 0x0032   100   100   050    Old_age   Always       -       0
176 Erase_Fail_Count_Chip   0x0032   100   100   050    Old_age   Always       -       0
177 Wear_Leveling_Count     0x0032   100   100   050    Old_age   Always       -       9602
178 Used_Rsvd_Blk_Cnt_Chip  0x0032   100   100   050    Old_age   Always       -       3
181 Program_Fail_Cnt_Total  0x0032   100   100   050    Old_age   Always       -       0
182 Erase_Fail_Count_Total  0x0032   100   100   050    Old_age   Always       -       0
192 Power-Off_Retract_Count 0x0032   100   100   050    Old_age   Always       -       13
194 Temperature_Celsius     0x0022   100   100   050    Old_age   Always       -       28
195 Hardware_ECC_Recovered  0x0032   100   100   050    Old_age   Always       -       3994818
196 Reallocated_Event_Count 0x0032   100   100   050    Old_age   Always       -       2414
197 Current_Pending_Sector  0x0032   100   100   050    Old_age   Always       -       3
198 Offline_Uncorrectable   0x0032   100   100   050    Old_age   Always       -       1
199 UDMA_CRC_Error_Count    0x0032   100   100   050    Old_age   Always       -       0
232 Available_Reservd_Space 0x0032   100   100   050    Old_age   Always       -       98
241 Total_LBAs_Written      0x0030   100   100   050    Old_age   Offline      -       36124
242 Total_LBAs_Read         0x0030   100   100   050    Old_age   Offline      -       10259
245 Unknown_Attribute       0x0032   100   100   050    Old_age   Always       -       9799

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%      4486         -

Selective Self-tests/Logging not supported

자세한 smartctl출력은 다음을 표시합니다.

$ sudo smartctl -x /dev/sdb
smartctl 6.2 2017-02-27 r4394 [x86_64-linux-3.10.0-514.26.2.el7.x86_64] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Device Model:     KingDian S200 60GB
Serial Number:    2017022100551
LU WWN Device Id: 0 000000 000000000
Firmware Version: P0707F1
User Capacity:    60,022,480,896 bytes [60.0 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    Solid State Device
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   ACS-2 T13/2015-D revision 3
SATA Version is:  SATA >3.1, 6.0 Gb/s (current: 3.0 Gb/s)
Local Time is:    Tue Oct  3 15:49:27 2017 BST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
AAM feature is:   Unavailable
APM level is:     128 (minimum power consumption without standby)
Rd look-ahead is: Enabled
Write cache is:   Enabled
ATA Security is:  Disabled, frozen [SEC2]
Wt Cache Reorder: Unavailable

=== 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:        (  120) seconds.
Offline data collection
capabilities:            (0x11) SMART execute Offline immediate.
                    No Auto Offline data collection support.
                    Suspend Offline collection upon new
                    command.
                    No Offline surface scan supported.
                    Self-test supported.
                    No Conveyance Self-test supported.
                    No Selective Self-test supported.
SMART capabilities:            (0x0002) Does not save 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:    (  10) minutes.

SMART Attributes Data Structure revision number: 1
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAGS    VALUE WORST THRESH FAIL RAW_VALUE
  1 Raw_Read_Error_Rate     -O--CK   100   100   050    -    0
  5 Reallocated_Sector_Ct   -O--CK   100   100   050    -    3
  9 Power_On_Hours          -O--CK   100   100   050    -    4491
 12 Power_Cycle_Count       -O--CK   100   100   050    -    13
160 Unknown_Attribute       -O--CK   100   100   050    -    1
161 Unknown_Attribute       PO--CK   100   100   050    -    98
163 Unknown_Attribute       -O--CK   100   100   050    -    0
164 Unknown_Attribute       -O--CK   100   100   050    -    10068
165 Unknown_Attribute       -O--CK   100   100   050    -    9
166 Unknown_Attribute       -O--CK   100   100   050    -    1
167 Unknown_Attribute       -O--CK   100   100   050    -    5
168 Unknown_Attribute       -O--CK   100   100   050    -    1500
169 Unknown_Attribute       -O--CK   100   100   050    -    100
175 Program_Fail_Count_Chip -O--CK   100   100   050    -    0
176 Erase_Fail_Count_Chip   -O--CK   100   100   050    -    0
177 Wear_Leveling_Count     -O--CK   100   100   050    -    9687
178 Used_Rsvd_Blk_Cnt_Chip  -O--CK   100   100   050    -    3
181 Program_Fail_Cnt_Total  -O--CK   100   100   050    -    0
182 Erase_Fail_Count_Total  -O--CK   100   100   050    -    0
192 Power-Off_Retract_Count -O--CK   100   100   050    -    13
194 Temperature_Celsius     -O---K   100   100   050    -    28
195 Hardware_ECC_Recovered  -O--CK   100   100   050    -    4314392
196 Reallocated_Event_Count -O--CK   100   100   050    -    2667
197 Current_Pending_Sector  -O--CK   100   100   050    -    3
198 Offline_Uncorrectable   -O--CK   100   100   050    -    1
199 UDMA_CRC_Error_Count    -O--CK   100   100   050    -    0
232 Available_Reservd_Space -O--CK   100   100   050    -    98
241 Total_LBAs_Written      ----CK   100   100   050    -    36474
242 Total_LBAs_Read         ----CK   100   100   050    -    10529
245 Unknown_Attribute       -O--CK   100   100   050    -    10146
                            ||||||_ K auto-keep
                            |||||__ C event count
                            ||||___ R error rate
                            |||____ S speed/performance
                            ||_____ O updated online
                            |______ P prefailure warning

General Purpose Log Directory Version 1
SMART           Log Directory Version 1 [multi-sector log support]
Address    Access  R/W   Size  Description
0x00       GPL,SL  R/O      1  Log Directory
0x01           SL  R/O      1  Summary SMART error log
0x02           SL  R/O      1  Comprehensive SMART error log
0x03       GPL     R/O      1  Ext. Comprehensive SMART error log
0x04       GPL,SL  R/O      8  Device Statistics log
0x06           SL  R/O      1  SMART self-test log
0x07       GPL     R/O      1  Extended self-test log
0x10       GPL     R/O      1  NCQ Command Error log
0x11       GPL     R/O      1  SATA Phy Event Counters
0x30       GPL,SL  R/O      9  IDENTIFY DEVICE data log
0x80-0x9f  GPL,SL  R/W     16  Host vendor specific log
0xde       GPL     VS       8  Device vendor specific log

SMART Extended Comprehensive Error Log Version: 1 (1 sectors)
No Errors Logged

SMART Extended Self-test Log Version: 1 (1 sectors)
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Extended offline    Completed without error       00%      4488         -
# 2  Extended offline    Completed without error       00%      4487         -
# 3  Extended offline    Completed without error       00%      4486         -

Selective Self-tests/Logging not supported

SCT Commands not supported

Device Statistics (GP Log 0x04)
Page Offset Size         Value  Description
  1  =====  =                =  == General Statistics (rev 1) ==
  1  0x008  4               13  Lifetime Power-On Resets
  1  0x010  4             4491  Power-on Hours
  1  0x018  6       2390408669  Logical Sectors Written
  1  0x020  6         69617191  Number of Write Commands
  1  0x028  6        690041929  Logical Sectors Read
  1  0x030  6          6959725  Number of Read Commands
  7  =====  =                =  == Solid State Device Statistics (rev 1) ==
  7  0x008  1                0  Percentage Used Endurance Indicator

SATA Phy Event Counters (GP Log 0x11)
ID      Size     Value  Description
0x0001  4            0  Command failed due to ICRC error
0x0002  4            0  R_ERR response for data FIS
0x0005  4            1  R_ERR response for non-data FIS
0x000a  4           17  Device-to-host register FISes sent due to a COMRESET

답변1

나는 과거에이 문제에 직면했습니다. IIRC, "오프라인 수정할 수 없는 섹터"는 디스크 컨트롤러(PC의 SATA/SCSI 컨트롤러가 아닌 디스크 내부의 컨트롤러)가 반복적으로 섹터를 읽지 못하고 해당 섹터를 절대 사용할 수 없다고 판단하는 경우입니다.

그렇다면 해당 섹터를 사용하는 파일 시스템에 대해 해당 섹터를 불량 섹터로 선언해야 합니까?

습관. 다행스럽게도 오늘날의 디스크는 불량 섹터를 예비 섹터 풀의 양호한 섹터로 자동 교체합니다. 따라서 이러한 불량 섹터를 파일 시스템에서 더 이상 사용하지 않도록 파일 시스템에 선언할 필요가 없습니다. 물론 풀의 크기는 제한되어 있으며( Available_Reservd_Space sectors아마도) 예비 섹터를 모두 사용한 후에도 불량 섹터는 계속 사용할 수 없으므로 이를 파일 시스템에 선언해야 합니다.

그러면 모든 것이 괜찮고 이것은 무해한 메시지입니까?

설마. 드라이브가 불량 섹터를 여러 번 읽으려고 시도했지만 매번 실패하여 교체 대기 중이지만 드라이브는 스스로 이 작업을 수행할 수 없습니다(결국 읽을 수 있기를 계속 기대합니다). 섹터가 새 데이터로 덮어쓰기될 때까지 "수정할 수 없는" 상태로 유지됩니다. 또는 드라이브가 어떻게든 이를 읽을 수 있으면 다시 매핑되어 예비 섹터로 교체됩니다(출력 smartctl에서는 Offline_Uncorrectable1씩 감소하고 Reallocated_Sector_Ct증가합니다) . 1)로.

어떡해?

이 경우에는 일반적으로 RAID 1 어레이(양호한 디스크 -> 결함이 있는 디스크)를 강제로 재동기화하여 새 섹터에 올바른 내용이 포함되도록 합니다. 어쨌든 fsck, 파티션의 백업이 있다면(그리고 그래야만 한다면), 백업을 실제 내용과 비교하십시오.

답변2

smartctl테스트를 실행해 보세요. 긍정적인 오류가 반환되면 뭔가 잘못된 것입니다. 그렇지 않으면 하드 드라이브를 사용해도 괜찮을 것입니다.

smartctl -t long /dev/sdb

참고: 테스트하기 전에 하드 드라이브의 데이터를 백업하는 것을 잊지 마십시오. 드라이브 상태에 따라 테스트 스트레스로 인해 디스크가 추가로 손상될 수 있습니다.

사용디스크 스캔uncorrectable sectors테스트에 오류가 있으면 수정해 보세요 smartctl.

관련 정보