Mechanical Drive Bad Sectors: The Drive is Not Always Dead (A Primer)

That’s very interesting; I have a few drives failing the SMART test.
I was actually planning to replace them, but if I can put that off—since the data on them is backed up anyway

Then let me just make sure I’ve understood this correctly.
Basically, when a SMART test reports a failure—specifically a read failure—the idea is to try reading from the disk, and if it fails, write to that specific LBA?

I’m trying this right now, but it seems like there’s always a new LBA failing the check.
So, in a situation like this, should I just overwrite the entire disk using fio with the command from the post?

yeah, so the “new” LBA failing notice where they are. you cant just write one LBA you should write 8-32 in a row, probably. is what I found

or fio just write it all

If the white label firmware is superior, can it just be flashed onto retail drives to acquire the additional functionality?

Interesting, that is why I run two passes only (instead of the default 4) I did see bad performance with some block sizes. I will try it next time.

If anybody needs RPMs of the trunk builds of smartmontools, I’m maintaining a COPR that builds smartmontools from trunk regularly: copr. fedorainfracloud .org/coprs/karellen/smartmontools-next/

badblocks defaults to doing direct I/O with 64 * 1024 byte blocks.

That crawls.

Adding -b 4096 -c 1024 will do I/O 4MB at a time, which improves performance noticeably. I ended up running mine with -b 4096 -c 10240 and that resulted in achieving max HDD speed.

I have this one drive that started showing read errors i did the same fix with a low level format but looking at the SMART data is seems as it had the lifetime hours reset…

Smart Data

=== START OF INFORMATION SECTION ===
Model Family: Seagate Surveillance
Device Model: ST3000VX000-1CU166
Serial Number: Z1F57GKL
LU WWN Device Id: 5 000c50 066f7337a
Firmware Version: CV23
User Capacity: 3,000,592,982,016 bytes [3.00 TB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Rotation Rate: 7200 rpm
Form Factor: 3.5 inches
Device is: In smartctl database 7.5/6028
ATA Version is: ATA8-ACS T13/1699-D revision 4
SATA Version is: SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Thu Sep 17 09:30:58 2026 UTC
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
See vendor-specific Attribute list for marginal Attributes.

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: ( 89) 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: ( 330) minutes.
Conveyance self-test routine
recommended polling time: ( 2) minutes.
SCT capabilities: (0x10b9) 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 109 091 006 Pre-fail Always - 23460608
3 Spin_Up_Time 0x0003 092 091 000 Pre-fail Always - 0
4 Start_Stop_Count 0x0032 096 096 020 Old_age Always - 4783
5 Reallocated_Sector_Ct 0x0033 100 100 010 Pre-fail Always - 88
7 Seek_Error_Rate 0x000f 081 060 030 Pre-fail Always - 26593331729
9 Power_On_Hours 0x0032 094 011 000 Old_age Always - 6035
10 Spin_Retry_Count 0x0013 100 100 097 Pre-fail Always - 0
12 Power_Cycle_Count 0x0032 096 096 020 Old_age Always - 4734
184 End-to-End_Error 0x0032 100 100 099 Old_age Always - 0
187 Reported_Uncorrect 0x0032 001 001 000 Old_age Always - 576
188 Command_Timeout 0x0032 100 099 000 Old_age Always - 52
189 High_Fly_Writes 0x003a 001 001 000 Old_age Always - 23662
190 Airflow_Temperature_Cel 0x0022 058 043 045 Old_age Always In_the_past 42 (Min/Max 31/49 #2982)
191 G-Sense_Error_Rate 0x0032 100 100 000 Old_age Always - 0
192 Power-Off_Retract_Count 0x0032 098 098 000 Old_age Always - 4570
193 Load_Cycle_Count 0x0032 098 098 000 Old_age Always - 4783
194 Temperature_Celsius 0x0022 042 057 000 Old_age Always - 42 (0 10 0 0 0)
197 Current_Pending_Sector 0x0012 100 096 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0010 100 096 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x003e 200 200 000 Old_age Always - 0

SMART Error Log Version: 1
ATA Error Count: 1112 (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 1112 occurred at disk power-on lifetime: 53063 hours (2210 days + 23 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 ff ff ff 0f Error: UNC at LBA = 0x0fffffff = 268435455

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 ff ff ff 4f 00 00:01:35.419 READ FPDMA QUEUED
27 00 00 00 00 00 e0 00 00:01:35.418 READ NATIVE MAX ADDRESS EXT [OBS-ACS-3]
ec 00 00 00 00 00 a0 00 00:01:35.418 IDENTIFY DEVICE
ef 03 46 00 00 00 a0 00 00:01:35.418 SET FEATURES [Set transfer mode]
27 00 00 00 00 00 e0 00 00:01:35.418 READ NATIVE MAX ADDRESS EXT [OBS-ACS-3]

Error 1111 occurred at disk power-on lifetime: 53063 hours (2210 days + 23 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 ff ff ff 0f Error: UNC at LBA = 0x0fffffff = 268435455

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 ff ff ff 4f 00 00:01:35.419 READ FPDMA QUEUED
27 00 00 00 00 00 e0 00 00:01:35.418 READ NATIVE MAX ADDRESS EXT [OBS-ACS-3]
ec 00 00 00 00 00 a0 00 00:01:35.418 IDENTIFY DEVICE
ef 03 46 00 00 00 a0 00 00:01:35.418 SET FEATURES [Set transfer mode]
27 00 00 00 00 00 e0 00 00:01:35.418 READ NATIVE MAX ADDRESS EXT [OBS-ACS-3]

Error 1110 occurred at disk power-on lifetime: 53063 hours (2210 days + 23 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 ff ff ff 0f Error: UNC at LBA = 0x0fffffff = 268435455

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 ff ff ff 4f 00 00:01:32.473 READ FPDMA QUEUED
27 00 00 00 00 00 e0 00 00:01:32.473 READ NATIVE MAX ADDRESS EXT [OBS-ACS-3]
ec 00 00 00 00 00 a0 00 00:01:32.472 IDENTIFY DEVICE
ef 03 46 00 00 00 a0 00 00:01:32.472 SET FEATURES [Set transfer mode]
27 00 00 00 00 00 e0 00 00:01:32.472 READ NATIVE MAX ADDRESS EXT [OBS-ACS-3]

Error 1109 occurred at disk power-on lifetime: 53063 hours (2210 days + 23 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 ff ff ff 0f Error: UNC at LBA = 0x0fffffff = 268435455

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 ff ff ff 4f 00 00:01:32.473 READ FPDMA QUEUED
27 00 00 00 00 00 e0 00 00:01:32.473 READ NATIVE MAX ADDRESS EXT [OBS-ACS-3]
ec 00 00 00 00 00 a0 00 00:01:32.472 IDENTIFY DEVICE
ef 03 46 00 00 00 a0 00 00:01:32.472 SET FEATURES [Set transfer mode]
27 00 00 00 00 00 e0 00 00:01:32.472 READ NATIVE MAX ADDRESS EXT [OBS-ACS-3]

Error 1108 occurred at disk power-on lifetime: 53063 hours (2210 days + 23 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 ff ff ff 0f Error: UNC at LBA = 0x0fffffff = 268435455

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 ff ff ff 4f 00 00:01:29.526 READ FPDMA QUEUED
27 00 00 00 00 00 e0 00 00:01:29.526 READ NATIVE MAX ADDRESS EXT [OBS-ACS-3]
ec 00 00 00 00 00 a0 00 00:01:29.525 IDENTIFY DEVICE
ef 03 46 00 00 00 a0 00 00:01:29.525 SET FEATURES [Set transfer mode]
27 00 00 00 00 00 e0 00 00:01:29.525 READ NATIVE MAX ADDRESS EXT [OBS-ACS-3]

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

2 Short offline Completed without error 00% 6014 -

3 Extended offline Interrupted (host reset) 00% 6014 -

4 Short offline Completed: read failure 90% 5988 63222576

5 Short offline Completed: read failure 90% 5988 63222576

6 Short offline Completed without error 00% 2512 -

7 Short offline Completed without error 00% 2344 -

8 Short offline Completed without error 00% 2176 -

9 Short offline Completed without error 00% 2008 -

#10 Short offline Completed without error 00% 1840 -
#11 Short offline Completed without error 00% 1672 -
#12 Short offline Completed without error 00% 1504 -
#13 Short offline Completed without error 00% 1336 -
#14 Short offline Completed without error 00% 1168 -
#15 Short offline Completed without error 00% 1000 -
#16 Short offline Completed without error 00% 832 -
#17 Short offline Completed without error 00% 664 -
#18 Short offline Completed without error 00% 496 -
#19 Short offline Completed without error 00% 328 -
#20 Short offline Completed without error 00% 160 -
#21 Short offline Completed without error 00% 65528 -
2 of 2 failed self-tests are outdated by newer successful extended offline self-test # 1

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.

The above only provides legacy SMART information - try ‘smartctl -x’ for more

I think i had pulled this drive from a PC that someone gave me to recycle and it has been since then in my server as an NVR drive for one camera i think at least a year or two so it doesn’t make sense to me. Just posting this here as a curiosity.
Would you still use this for not that important nvr?