I'm trying to format an external HDD that has known bad sectors. I was able to recover most of the data using ddrescue
. Now I want to completely wipe the HDD. However, I keep getting I/O errors and the partitions no longer exist.
Question: given the following information, is there any chance that the HDD can be formatted and re-used? This HDD will be used as a file transfer station so data loss is not an issue.
This HDD is listed as sdc
:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 99.4M 1 loop /snap/core/11993
loop1 7:1 0 110.5M 1 loop /snap/core/12603
loop2 7:2 0 55.5M 1 loop /snap/core18/2253
loop3 7:3 0 55.5M 1 loop /snap/core18/2284
loop4 7:4 0 61.9M 1 loop /snap/core20/1270
loop5 7:5 0 61.9M 1 loop /snap/core20/1328
loop6 7:6 0 67.2M 1 loop /snap/lxd/21835
loop7 7:7 0 19.8M 1 loop /snap/minidlna-escoand/19
loop8 7:8 0 68.3M 1 loop /snap/powershell/194
loop9 7:9 0 68.1M 1 loop /snap/powershell/196
sda 8:0 0 298.1G 0 disk
├─sda1 8:1 0 512M 0 part /mnt/localServer01
└─sda2 8:2 0 297.6G 0 part /
sdb 8:16 0 1.8T 0 disk
└─sdb1 8:17 0 1.8T 0 part
sdc 8:32 0 698.7G 0 disk
sr0 11:0 1 1024M 0 rom
dd
returns I/O error when I tried formatting the disk:
sudo dd if=/dev/zero of=/dev/sdc
dd: writing to '/dev/sdc': Input/output error
1+0 records in
0+0 records out
0 bytes copied, 184.335 s, 0.0 kB/s
dmesg
also shows I/O error:
[144465.457953] blk_update_request: I/O error, dev sdc, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[144465.462738] Buffer I/O error on dev sdc, logical block 0, async page read
[147350.634452] sd 6:0:0:1: [sdc] tag#7 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD IN
[147350.634464] sd 6:0:0:1: [sdc] tag#7 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[147389.549614] sd 6:0:0:1: [sdc] tag#4 uas_zap_pending 0 uas-tag 1 inflight: CMD
[147389.549624] sd 6:0:0:1: [sdc] tag#4 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[147420.268875] sd 6:0:0:1: [sdc] tag#5 uas_zap_pending 0 uas-tag 1 inflight: CMD
[147420.268885] sd 6:0:0:1: [sdc] tag#5 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[147450.988273] sd 6:0:0:1: [sdc] tag#6 uas_zap_pending 0 uas-tag 1 inflight: CMD
[147450.988282] sd 6:0:0:1: [sdc] tag#6 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[147481.707378] sd 6:0:0:1: [sdc] tag#7 uas_zap_pending 0 uas-tag 1 inflight: CMD
[147481.707387] sd 6:0:0:1: [sdc] tag#7 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[147512.426775] sd 6:0:0:1: [sdc] tag#4 uas_zap_pending 0 uas-tag 1 inflight: CMD
[147512.426784] sd 6:0:0:1: [sdc] tag#4 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[147512.751588] sd 6:0:0:1: [sdc] tag#4 FAILED Result: hostbyte=DID_RESET driverbyte=DRIVER_OK
[147512.751598] sd 6:0:0:1: [sdc] tag#4 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
smartctl -x /dev/sdc
shows that the HDD has been ON for 9915 hours:
=== START OF INFORMATION SECTION ===
Model Family: HGST Travelstar 5K1000
Device Model: HGST HTS541075A9E680
Serial Number: J8120077G9WM0A
LU WWN Device Id: 5 000cca 69ac47eff
Firmware Version: JA2OA560
User Capacity: 750,156,374,016 bytes [750 GB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Rotation Rate: 5400 rpm
Form Factor: 2.5 inches
Device is: In smartctl database [for details use: -P show]
ATA Version is: ATA8-ACS T13/1699-D revision 6
SATA Version is: SATA 2.6, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Mon Feb 7 20:38:58 2022 UTC
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
AAM feature is: Unavailable
APM level is: 1 (minimum power consumption with standby)
Rd look-ahead is: Enabled
Write cache is: Disabled
DSN feature is: Unavailable
ATA Security is: ENABLED, PW level HIGH, **LOCKED** [SEC4]
Wt Cache Reorder: Unknown (SCT not supported if ATA Security is LOCKED)
=== START OF READ SMART DATA SECTION ===
SMART Status not supported: Incomplete response, ATA output registers missing
SMART overall-health self-assessment test result: FAILED!
Drive failure expected in less than 24 hours. SAVE ALL DATA.
Warning: This result is based on an Attribute check.
See vendor-specific Attribute list for failed Attributes.
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: ( 45) seconds.
Offline data collection
capabilities: (0x5b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
No 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: ( 184) minutes.
SCT capabilities: (0x003d) 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 FLAGS VALUE WORST THRESH FAIL RAW_VALUE
1 Raw_Read_Error_Rate PO-R-- 001 001 062 NOW 466812927
2 Throughput_Performance P-S--- 100 100 040 - 0
3 Spin_Up_Time POS--- 206 206 033 - 1
4 Start_Stop_Count -O--C- 085 085 000 - 24164
5 Reallocated_Sector_Ct PO--CK 001 001 005 NOW 0
7 Seek_Error_Rate PO-R-- 100 100 067 - 0
8 Seek_Time_Performance P-S--- 100 100 040 - 0
9 Power_On_Hours -O--C- 078 078 000 - 9915
10 Spin_Retry_Count PO--C- 100 100 060 - 0
12 Power_Cycle_Count -O--CK 100 100 000 - 1462
191 G-Sense_Error_Rate -O-R-- 100 100 000 - 0
192 Power-Off_Retract_Count -O--CK 100 100 000 - 49
193 Load_Cycle_Count -O--C- 085 085 000 - 153471
194 Temperature_Celsius -O---- 230 230 000 - 26 (Min/Max 12/48)
196 Reallocated_Event_Count -O--CK 001 001 000 - 4142
197 Current_Pending_Sector -O---K 001 001 000 - 21952
198 Offline_Uncorrectable ---R-- 100 100 000 - 0
199 UDMA_CRC_Error_Count -O-R-- 200 200 000 - 0
223 Load_Retry_Count -O-R-- 100 100 000 - 0
||||||_ 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
0x06 SL R/O 1 SMART self-test log
0x07 GPL R/O 1 Extended self-test log
0x09 SL R/W 1 Selective self-test log
0x10 GPL R/O 1 NCQ Command Error log
0x11 GPL R/O 1 SATA Phy Event Counters log
0x80-0x9f GPL,SL R/W 16 Host vendor specific log
0xe0 GPL,SL R/W 1 SCT Command/Status
0xe1 GPL,SL R/W 1 SCT Data Transfer
SMART Extended Comprehensive Error Log Version: 1 (1 sectors)
Device Error Count: 65535 (device log contains only the most recent 4 errors)
CR = Command Register
FEATR = Features Register
COUNT = Count (was: Sector Count) Register
LBA_48 = Upper bytes of LBA High/Mid/Low Registers ] ATA-8
LH = LBA High (was: Cylinder High) Register ] LBA
LM = LBA Mid (was: Cylinder Low) Register ] Register
LL = LBA Low (was: Sector Number) Register ]
DV = Device (was: Device/Head) Register
DC = Device Control Register
ER = Error register
ST = Status register
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 65535 [0] occurred at disk power-on lifetime: 8969 hours (373 days + 17 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER -- ST COUNT LBA_48 LH LM LL DV DC
-- -- -- == -- == == == -- -- -- -- --
40 -- 51 00 08 00 00 23 78 10 00 03 00 Error: UNC 8 sectors at LBA = 0x23781000 = 595070976
Commands leading to the command that caused the error were:
CR FEATR COUNT LBA_48 LH LM LL DV DC Powered_Up_Time Command/Feature_Name
-- == -- == -- == == == -- -- -- -- -- --------------- --------------------
25 00 00 00 08 00 00 23 78 10 00 40 00 00:04:40.714 READ DMA EXT
25 00 00 01 80 00 00 54 d4 10 80 40 00 00:04:40.710 READ DMA EXT
25 00 00 00 38 00 00 54 d4 10 40 40 00 00:04:40.709 READ DMA EXT
25 00 00 00 18 00 00 54 d4 10 20 40 00 00:04:40.709 READ DMA EXT
25 00 00 00 08 00 00 54 d4 10 10 40 00 00:04:40.709 READ DMA EXT
Error 65534 [3] occurred at disk power-on lifetime: 8969 hours (373 days + 17 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER -- ST COUNT LBA_48 LH LM LL DV DC
-- -- -- == -- == == == -- -- -- -- --
40 -- 51 00 08 00 00 23 78 10 00 03 00 Error: UNC 8 sectors at LBA = 0x23781000 = 595070976
Commands leading to the command that caused the error were:
CR FEATR COUNT LBA_48 LH LM LL DV DC Powered_Up_Time Command/Feature_Name
-- == -- == -- == == == -- -- -- -- -- --------------- --------------------
25 00 00 00 08 00 00 23 78 10 00 40 00 00:04:36.900 READ DMA EXT
25 00 00 00 08 00 00 54 d4 10 78 40 00 00:04:36.899 READ DMA EXT
25 00 00 00 08 00 00 00 89 88 00 40 00 00:04:36.876 READ DMA EXT
25 00 00 00 08 00 00 23 0d 30 00 40 00 00:04:36.851 READ DMA EXT
25 00 00 00 68 00 00 54 d4 0f 88 40 00 00:04:36.850 READ DMA EXT
Error 65533 [2] occurred at disk power-on lifetime: 8969 hours (373 days + 17 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER -- ST COUNT LBA_48 LH LM LL DV DC
-- -- -- == -- == == == -- -- -- -- --
40 -- 51 00 08 00 00 00 09 68 10 00 00 Error: UNC 8 sectors at LBA = 0x00096810 = 616464
Commands leading to the command that caused the error were:
CR FEATR COUNT LBA_48 LH LM LL DV DC Powered_Up_Time Command/Feature_Name
-- == -- == -- == == == -- -- -- -- -- --------------- --------------------
25 00 00 00 08 00 00 00 09 68 10 40 00 00:04:32.895 READ DMA EXT
25 00 00 00 08 00 00 00 09 68 10 40 00 00:04:29.072 READ DMA EXT
25 00 00 00 08 00 00 54 d4 10 18 40 00 00:04:29.052 READ DMA EXT
25 00 00 02 00 00 00 23 0d 1c 00 40 00 00:04:29.042 READ DMA EXT
25 00 00 00 68 00 00 23 18 0f 88 40 00 00:04:29.040 READ DMA EXT
Error 65532 [1] occurred at disk power-on lifetime: 8969 hours (373 days + 17 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER -- ST COUNT LBA_48 LH LM LL DV DC
-- -- -- == -- == == == -- -- -- -- --
40 -- 51 00 08 00 00 00 09 68 10 00 00 Error: UNC 8 sectors at LBA = 0x00096810 = 616464
Commands leading to the command that caused the error were:
CR FEATR COUNT LBA_48 LH LM LL DV DC Powered_Up_Time Command/Feature_Name
-- == -- == -- == == == -- -- -- -- -- --------------- --------------------
25 00 00 00 08 00 00 00 09 68 10 40 00 00:04:29.072 READ DMA EXT
25 00 00 00 08 00 00 54 d4 10 18 40 00 00:04:29.052 READ DMA EXT
25 00 00 02 00 00 00 23 0d 1c 00 40 00 00:04:29.042 READ DMA EXT
25 00 00 00 68 00 00 23 18 0f 88 40 00 00:04:29.040 READ DMA EXT
25 00 00 00 80 00 00 23 18 0f 00 40 00 00:04:29.039 READ DMA EXT
SMART Extended Self-test Log Version: 1 (1 sectors)
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.
SCT Commands not supported if ATA Security is LOCKED
Device Statistics (GP/SMART Log 0x04) not supported
Pending Defects log (GP Log 0x0c) not supported
SATA Phy Event Counters (GP Log 0x11)
ID Size Value Description
0x0001 2 0 Command failed due to ICRC error
0x0002 2 0 R_ERR response for data FIS
0x0003 2 0 R_ERR response for device-to-host data FIS
0x0004 2 0 R_ERR response for host-to-device data FIS
0x0005 2 0 R_ERR response for non-data FIS
0x0006 2 0 R_ERR response for device-to-host non-data FIS
0x0007 2 0 R_ERR response for host-to-device non-data FIS
0x0009 2 457 Transition from drive PhyRdy to drive PhyNRdy
0x000a 2 456 Device-to-host register FISes sent due to a COMRESET
0x000b 2 0 CRC errors within host-to-device FIS
0x000d 2 0 Non-CRC errors within host-to-device FIS