如何修复外部硬盘上的 I/O 错误?

如何修复外部硬盘上的 I/O 错误?

我正在尝试格式化此外部硬盘,但失败了。我尝试使用 gparted 但出现错误:“在 /dev/sdb 上写入期间发生 E/S 错误”
还尝试在终端上使用 dd 命令,但效果相同:

root:# dd if=/dev/zero of=/dev/sdb bs=1024
dd: error al escribir en '/dev/sdb': Error de entrada/salida
65+0 registros leídos
64+0 registros escritos
65536 bytes (66 kB, 64 KiB) copied, 3.44742 s, 19.0 kB/s

该驱动器列在下面fdisk -l,但/etc/fstab/无法识别。
这个问题是几周前我在 Windows 10 上格式化它时开始的,这样做之后,它的性能开始下降,并且在上面写入文件需要比平时更长的时间,现在我发现有些文件已损坏并且无法修复被检索。

我想要的只是格式化它并将其保留为新的。无需恢复文件,只需使其再次工作即可。

编辑:
dmesg 输出:

[ 5070.478844] sd 3:0:0:0: [sdc] Spinning up disk...
[ 5074.591076] sd 3:0:0:0: [sdc] 625142448 512-byte logical blocks: (320 GB/298 GiB)
[ 5074.591512] sd 3:0:0:0: [sdc] Write Protect is off
[ 5074.591517] sd 3:0:0:0: [sdc] Mode Sense: 43 00 00 00
[ 5074.591684] sd 3:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 5075.027725] sd 3:0:0:0: [sdc] Attached SCSI disk
[ 5077.983527] sd 3:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 5077.983545] sd 3:0:0:0: [sdc] tag#0 Sense Key : Hardware Error [current] 
[ 5077.983553] sd 3:0:0:0: [sdc] tag#0 Add. Sense: Internal target failure
[ 5077.983559] sd 3:0:0:0: [sdc] tag#0 CDB: Read(10) 28 00 00 00 08 00 00 00 08 00
[ 5077.983565] blk_update_request: critical target error, dev sdc, sector 2048
[ 5080.503688] sd 3:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 5080.503706] sd 3:0:0:0: [sdc] tag#0 Sense Key : Medium Error [current] 
[ 5080.503712] sd 3:0:0:0: [sdc] tag#0 Add. Sense: Unrecovered read error
[ 5080.503719] sd 3:0:0:0: [sdc] tag#0 CDB: Read(10) 28 00 00 00 08 00 00 00 08 00
[ 5080.503725] blk_update_request: critical medium error, dev sdc, sector 2048
[ 5080.503735] Buffer I/O error on dev sdc, logical block 256, async page read
[ 5193.596565] sd 3:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 5193.596583] sd 3:0:0:0: [sdc] tag#0 Sense Key : Hardware Error [current] 
[ 5193.596590] sd 3:0:0:0: [sdc] tag#0 Add. Sense: Internal target failure
[ 5193.596597] sd 3:0:0:0: [sdc] tag#0 CDB: Read(10) 28 00 00 00 00 80 00 00 08 00
[ 5193.596602] blk_update_request: critical target error, dev sdc, sector 128
[ 5197.144414] sd 3:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 5197.144431] sd 3:0:0:0: [sdc] tag#0 Sense Key : Hardware Error [current] 
[ 5197.144438] sd 3:0:0:0: [sdc] tag#0 Add. Sense: Internal target failure
[ 5197.144445] sd 3:0:0:0: [sdc] tag#0 CDB: Read(10) 28 00 00 00 08 00 00 00 08 00
[ 5197.144451] blk_update_request: critical target error, dev sdc, sector 2048
[ 5199.664609] sd 3:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 5199.664629] sd 3:0:0:0: [sdc] tag#0 Sense Key : Medium Error [current] 
[ 5199.664637] sd 3:0:0:0: [sdc] tag#0 Add. Sense: Unrecovered read error
[ 5199.664644] sd 3:0:0:0: [sdc] tag#0 CDB: Read(10) 28 00 00 00 08 00 00 00 08 00
[ 5199.664651] blk_update_request: critical medium error, dev sdc, sector 2048
[ 5199.664662] Buffer I/O error on dev sdc, logical block 256, async page read
[ 5554.703903] sd 3:0:0:0: [sdc] Synchronizing SCSI cache
[ 5554.950855] sd 3:0:0:0: [sdc] Synchronize Cache(10) failed: Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[ 5559.423288] sd 3:0:0:0: [sdc] Spinning up disk...
[ 5563.519760] sd 3:0:0:0: [sdc] 625142448 512-byte logical blocks: (320 GB/298 GiB)
[ 5563.520280] sd 3:0:0:0: [sdc] Write Protect is off
[ 5563.520286] sd 3:0:0:0: [sdc] Mode Sense: 43 00 00 00
[ 5563.520466] sd 3:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 5563.953895] sd 3:0:0:0: [sdc] Attached SCSI disk
[ 5566.909766] sd 3:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 5566.909784] sd 3:0:0:0: [sdc] tag#0 Sense Key : Hardware Error [current] 
[ 5566.909792] sd 3:0:0:0: [sdc] tag#0 Add. Sense: Internal target failure
[ 5566.909799] sd 3:0:0:0: [sdc] tag#0 CDB: Read(10) 28 00 00 00 08 00 00 00 08 00
[ 5566.909805] blk_update_request: critical target error, dev sdc, sector 2048
[ 5569.429940] sd 3:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 5569.429958] sd 3:0:0:0: [sdc] tag#0 Sense Key : Medium Error [current] 
[ 5569.429965] sd 3:0:0:0: [sdc] tag#0 Add. Sense: Unrecovered read error
[ 5569.429973] sd 3:0:0:0: [sdc] tag#0 CDB: Read(10) 28 00 00 00 08 00 00 00 08 00
[ 5569.429983] blk_update_request: critical medium error, dev sdc, sector 2048
[ 5569.429994] Buffer I/O error on dev sdc, logical block 256, async page read
[ 5589.767745] sd 3:0:0:0: [sdc] Synchronizing SCSI cache
[ 5590.014674] sd 3:0:0:0: [sdc] Synchronize Cache(10) failed: Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[ 5593.835410] sd 3:0:0:0: [sdc] Spinning up disk...
[ 5597.951543] sd 3:0:0:0: [sdc] 625142448 512-byte logical blocks: (320 GB/298 GiB)
[ 5597.952051] sd 3:0:0:0: [sdc] Write Protect is off
[ 5597.952058] sd 3:0:0:0: [sdc] Mode Sense: 43 00 00 00
[ 5597.952225] sd 3:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 5598.384619] sd 3:0:0:0: [sdc] Attached SCSI disk
[ 5601.340395] sd 3:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 5601.340413] sd 3:0:0:0: [sdc] tag#0 Sense Key : Hardware Error [current] 
[ 5601.340420] sd 3:0:0:0: [sdc] tag#0 Add. Sense: Internal target failure
[ 5601.340427] sd 3:0:0:0: [sdc] tag#0 CDB: Read(10) 28 00 00 00 08 00 00 00 08 00
[ 5601.340433] blk_update_request: critical target error, dev sdc, sector 2048
[ 5603.860687] sd 3:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 5603.860706] sd 3:0:0:0: [sdc] tag#0 Sense Key : Medium Error [current] 
[ 5603.860712] sd 3:0:0:0: [sdc] tag#0 Add. Sense: Unrecovered read error
[ 5603.860719] sd 3:0:0:0: [sdc] tag#0 CDB: Read(10) 28 00 00 00 08 00 00 00 08 00
[ 5603.860725] blk_update_request: critical medium error, dev sdc, sector 2048
[ 5603.860735] Buffer I/O error on dev sdc, logical block 256, async page read

编辑2: smartctl -a /dev/sdc 输出:

=== START OF INFORMATION SECTION ===
Model Family:     Seagate Momentus 5400.6
Device Model:     ST9320325AS
Serial Number:    5VEJEL2E
LU WWN Device Id: 5 000c50 0394053d7
Firmware Version: 0002CE02
User Capacity:    320 072 933 376 bytes [320 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    5400 rpm
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ATA8-ACS T13/1699-D revision 4
SATA Version is:  SATA 2.6, 1.5 Gb/s
Local Time is:    Thu May 31 15:12:17 2018 CDT
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:  (0x82) Offline data collection activity
                    was completed without error.
                    Auto Offline Data Collection: Enabled.
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:        (    0) 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:    (   1) minutes.
Extended self-test routine
recommended polling time:    (  99) minutes.
Conveyance self-test routine
recommended polling time:    (   2) minutes.
SCT capabilities:          (0x103b) SCT Status supported.
                    SCT Error Recovery Control supported.
                    SCT Feature Control supported.
                    SCT Data Table supported.

SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000f   089   089   006    Pre-fail  Always       -       232775642
  3 Spin_Up_Time            0x0003   098   098   000    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0032   100   100   020    Old_age   Always       -       152
  5 Reallocated_Sector_Ct   0x0033   091   091   036    Pre-fail  Always       -       194
  7 Seek_Error_Rate         0x000f   100   253   030    Pre-fail  Always       -       252775
  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       206
 10 Spin_Retry_Count        0x0013   100   100   097    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   099   099   020    Old_age   Always       -       1466
184 End-to-End_Error        0x0032   100   100   099    Old_age   Always       -       0
187 Reported_Uncorrect      0x0032   001   001   000    Old_age   Always       -       883
188 Command_Timeout         0x0032   100   100   000    Old_age   Always       -       0
189 High_Fly_Writes         0x003a   100   100   000    Old_age   Always       -       0
190 Airflow_Temperature_Cel 0x0022   063   057   045    Old_age   Always       -       37 (Min/Max 36/37)
191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       0
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       309
193 Load_Cycle_Count        0x0032   100   100   000    Old_age   Always       -       1565
194 Temperature_Celsius     0x0022   037   043   000    Old_age   Always       -       37 (0 22 0 0 0)
195 Hardware_ECC_Recovered  0x001a   060   045   000    Old_age   Always       -       232775642
197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always       -       191
198 Offline_Uncorrectable   0x0010   100   100   000    Old_age   Offline      -       191
199 UDMA_CRC_Error_Count    0x003e   200   200   000    Old_age   Always       -       0

SMART Error Log Version: 1
ATA Error Count: 2254 (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 2254 occurred at disk power-on lifetime: 206 hours (8 days + 14 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
  -- -- -- -- -- -- --
  40 51 00 01 08 00 00  Error: UNC at LBA = 0x00000801 = 2049

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  25 03 08 00 08 00 40 00      00:00:08.281  READ DMA EXT
  ef 03 46 00 00 00 00 00      00:00:08.280  SET FEATURES [Set transfer mode]
  ef 03 0c 00 00 00 00 00      00:00:08.279  SET FEATURES [Set transfer mode]
  ec 00 01 00 00 00 00 00      00:00:08.272  IDENTIFY DEVICE
  00 00 00 00 00 00 00 04      00:00:08.216  NOP [Abort queued commands]

Error 2253 occurred at disk power-on lifetime: 206 hours (8 days + 14 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
  -- -- -- -- -- -- --
  40 51 00 01 08 00 00  Error: UNC at LBA = 0x00000801 = 2049

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  60 00 08 00 08 00 40 00      00:00:05.747  READ FPDMA QUEUED
  60 00 08 ff ff ff 4f 00      00:00:05.742  READ FPDMA QUEUED
  60 00 08 ff ff ff 4f 00      00:00:05.741  READ FPDMA QUEUED
  60 00 08 ff ff ff 4f 00      00:00:05.740  READ FPDMA QUEUED
  60 00 08 ff ff ff 4f 00      00:00:05.735  READ FPDMA QUEUED

Error 2252 occurred at disk power-on lifetime: 206 hours (8 days + 14 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
  -- -- -- -- -- -- --
  40 51 00 01 08 00 00  Error: UNC at LBA = 0x00000801 = 2049

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  25 03 08 00 08 00 40 00      00:00:08.301  READ DMA EXT
  ef 03 46 00 00 00 00 00      00:00:08.300  SET FEATURES [Set transfer mode]
  ef 03 0c 00 00 00 00 00      00:00:08.299  SET FEATURES [Set transfer mode]
  ec 00 01 00 00 00 00 00      00:00:08.292  IDENTIFY DEVICE
  00 00 00 00 00 00 00 04      00:00:08.225  NOP [Abort queued commands]

Error 2251 occurred at disk power-on lifetime: 206 hours (8 days + 14 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
  -- -- -- -- -- -- --
  40 51 00 01 08 00 00  Error: UNC at LBA = 0x00000801 = 2049

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  60 00 08 00 08 00 40 00      00:00:05.756  READ FPDMA QUEUED
  60 00 08 ff ff ff 4f 00      00:00:05.751  READ FPDMA QUEUED
  60 00 08 ff ff ff 4f 00      00:00:05.750  READ FPDMA QUEUED
  60 00 08 ff ff ff 4f 00      00:00:05.750  READ FPDMA QUEUED
  60 00 08 ff ff ff 4f 00      00:00:05.744  READ FPDMA QUEUED

Error 2250 occurred at disk power-on lifetime: 205 hours (8 days + 13 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
  -- -- -- -- -- -- --
  40 51 00 01 08 00 00  Error: UNC at LBA = 0x00000801 = 2049

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  25 03 08 00 08 00 40 00      00:02:07.468  READ DMA EXT
  ef 03 46 00 00 00 00 00      00:02:07.467  SET FEATURES [Set transfer mode]
  ef 03 0c 00 00 00 00 00      00:02:07.467  SET FEATURES [Set transfer mode]
  ec 00 01 00 00 00 00 00      00:02:07.459  IDENTIFY DEVICE
  00 00 00 00 00 00 00 04      00:02:07.403  NOP [Abort queued commands]

SMART Self-test log structure revision number 1
No self-tests have been logged.  [To run self-tests, use: smartctl -t]

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.

答案1

“驱动器已损坏或即将失效。回收并更换它。提示:当 smartctl 为您报告的未更正错误提供非零值时,这意味着驱动器已耗尽制造商预留的备用扇区供应,并且故障即将发生。 ——亚历克斯·P”

相关内容