18
8
I'm in a process of doing a fresh Linux install and before I went to do that I thought that it is a good time to verify HDD health since I can safely overwrite any data on the HDD if needed.
First I tried checking with smartmontools... My Seagate HDD reports one current pending sector and one offline uncorrectable(presumably the same one). Reallocated sector count is zero.
5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always - 0
...
197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 1
198 Offline_Uncorrectable 0x0010 100 100 000 Old_age Offline - 1
However SMART self tests (short, long, offline, conveyance) find no errors.
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% 6631 -
# 2 Conveyance offline Completed without error 00% 6630 -
# 3 Extended offline Completed without error 00% 6622 -
# 4 Short offline Completed without error 00% 6600 -
# 5 Extended offline Completed without error 00% 6632 -
I've also tried running badblocks -wsv(full read-write 4 pattern pass test) on the drive and no bad blocks were found. I then followed the guide(to the extent possible, since I deleted my filesystem after running badblocks) found here: http://smartmontools.sourceforge.net/badblockhowto.html
There it says that if I overwrite the sector with all zeros the disk should move(reallocate) the pending sector. Badblocks last write pattern is all zeros so that should have done it. however nothing has changed I still have that pending sector count 1.
I then tried figuring out which sector is the problematic one and in the SMART output there is a error log:
Error 2 occurred at disk power-on lifetime: 5344 hours (222 days + 16 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
-- -- -- -- -- -- --
84 51 7c 1b 1a 02 ae Error: ABRT at LBA = 0x0e021a1b = 235018779
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
20 20 7f 18 1a 02 ae 00 00:09:05.228 READ SECTOR(S)
20 20 01 17 1a 02 ae 00 00:09:05.228 READ SECTOR(S)
20 20 01 01 00 00 a0 00 00:08:59.830 READ SECTOR(S)
91 20 3f 01 00 00 af 00 00:08:59.826 INITIALIZE DEVICE PARAMETERS [OBS-6]
10 20 01 01 00 00 a8 00 00:08:59.678 RECALIBRATE [OBS-4]
Error 1 occurred at disk power-on lifetime: 5009 hours (208 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 SC SN CL CH DH
-- -- -- -- -- -- --
40 51 00 b7 8c 02 e0 Error: UNC at LBA = 0x00028cb7 = 167095
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 20 1e 9e 8c 02 e0 00 00:02:20.691 READ DMA EXT
25 20 1e 80 8c 02 e0 00 00:02:20.691 READ DMA EXT
25 20 1e 62 8c 02 e0 00 00:02:20.690 READ DMA EXT
25 20 1e 44 8c 02 e0 00 00:02:20.690 READ DMA EXT
25 20 1e 26 8c 02 e0 00 00:02:20.690 READ DMA EXT
So apparently the drive had two errors.
84 51 7c 1b 1a 02 ae Error: ABRT at LBA = 0x0e021a1b = 235018779
and
40 51 00 b7 8c 02 e0 Error: UNC at LBA = 0x00028cb7 = 167095
So I assumed these are the sector numbers: 167095 and 235018779. And I tried writing zeros with dd:
dd if=/dev/zero of=/dev/sda bs=512 count=1 seek=167095
Now that one did ok. However when I tried with the other sector:
dd if=/dev/zero of=/dev/sda bs=512 count=1 seek=235018779
I get dd: '/dev/sda': cannot seek: Invalid argument. I then spotted that my HDD only has 234441658 sectors. So this is out of range. But then why did SMART report an error on that address?!
Can anyone help me figure that out and also advise me how to do this correctly if I'm doing it wrong? I suspect that maybe I'm wrong in using block size 512 with dd. That is the sector size reported by SMART. maybe those LBA addresses are bytes not blocks I tried setting bs=1 and writing only one byte to those addresses on the HDD. That did work(dd write process)… However pending sector count still did not change after that. I also called sync and smartctl -t offline /dev/sda to try 'forcing' the drive to reallocate the sector. Nothing...
Here is my full smartctl --all /dev/sda output:
smartctl 5.43 2012-06-30 r3573 [i686-linux-2.6.32-358.el6.i686] (local build)
Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net
=== START OF INFORMATION SECTION ===
Model Family: Seagate Barracuda 7200.9
Device Model: ST3120811AS
Serial Number: 6PT1N4VZ
Firmware Version: 3.AAE
User Capacity: 120,034,123,776 bytes [120 GB]
Sector Size: 512 bytes logical/physical
Device is: In smartctl database [for details use: -P show]
ATA Version is: 7
ATA Standard is: Exact ATA specification draft version not indicated
Local Time is: Mon Nov 18 12:03:00 2013 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
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: ( 430) 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: ( 1) minutes.
Extended self-test routine
recommended polling time: ( 51) minutes.
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 084 077 006 Pre-fail Always - 185600113
3 Spin_Up_Time 0x0003 095 095 000 Pre-fail Always - 0
4 Start_Stop_Count 0x0032 098 098 020 Old_age Always - 2185
5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always - 0
7 Seek_Error_Rate 0x000f 073 055 030 Pre-fail Always - 25890559714
9 Power_On_Hours 0x0032 093 093 000 Old_age Always - 6632
10 Spin_Retry_Count 0x0013 100 100 097 Pre-fail Always - 0
12 Power_Cycle_Count 0x0032 098 098 020 Old_age Always - 2229
187 Reported_Uncorrect 0x0032 099 099 000 Old_age Always - 1
189 High_Fly_Writes 0x003a 100 100 000 Old_age Always - 0
190 Airflow_Temperature_Cel 0x0022 071 056 045 Old_age Always - 29 (Min/Max 25/29)
194 Temperature_Celsius 0x0022 029 044 000 Old_age Always - 29 (0 13 0 0 0)
195 Hardware_ECC_Recovered 0x001a 052 046 000 Old_age Always - 194244099
197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 1
198 Offline_Uncorrectable 0x0010 100 100 000 Old_age Offline - 1
199 UDMA_CRC_Error_Count 0x003e 200 200 000 Old_age Always - 0
200 Multi_Zone_Error_Rate 0x0000 100 253 000 Old_age Offline - 0
202 Data_Address_Mark_Errs 0x0032 066 219 000 Old_age Always - 34
SMART Error Log Version: 1
ATA Error Count: 2
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 2 occurred at disk power-on lifetime: 5344 hours (222 days + 16 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
-- -- -- -- -- -- --
84 51 7c 1b 1a 02 ae Error: ABRT at LBA = 0x0e021a1b = 235018779
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
20 20 7f 18 1a 02 ae 00 00:09:05.228 READ SECTOR(S)
20 20 01 17 1a 02 ae 00 00:09:05.228 READ SECTOR(S)
20 20 01 01 00 00 a0 00 00:08:59.830 READ SECTOR(S)
91 20 3f 01 00 00 af 00 00:08:59.826 INITIALIZE DEVICE PARAMETERS [OBS-6]
10 20 01 01 00 00 a8 00 00:08:59.678 RECALIBRATE [OBS-4]
Error 1 occurred at disk power-on lifetime: 5009 hours (208 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 SC SN CL CH DH
-- -- -- -- -- -- --
40 51 00 b7 8c 02 e0 Error: UNC at LBA = 0x00028cb7 = 167095
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 20 1e 9e 8c 02 e0 00 00:02:20.691 READ DMA EXT
25 20 1e 80 8c 02 e0 00 00:02:20.691 READ DMA EXT
25 20 1e 62 8c 02 e0 00 00:02:20.690 READ DMA EXT
25 20 1e 44 8c 02 e0 00 00:02:20.690 READ DMA EXT
25 20 1e 26 8c 02 e0 00 00:02:20.690 READ DMA EXT
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% 6631 -
# 2 Conveyance offline Completed without error 00% 6630 -
# 3 Extended offline Completed without error 00% 6622 -
# 4 Short offline Completed without error 00% 6600 -
# 5 Extended offline Completed without error 00% 6632 -
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.
UPDATE:
As suggested in the answer from rob I tried overwriting the entire HDD with zeroes. Checked SMART values and then started reading the whole HDD. Again checked SMART values. The result is: SMART values regarding the pending/reallocated sector count do not change, in both cases, immediately after write and then after read. Reallocated 0. Pending 1.
https://superuser.com/questions/1218312/pending-sector-issue-does-this-mean-the-hdd-is-failing/1218317#1218317 – SDsolar – 2017-06-12T05:39:28.630
1I guess your drive has 234441658 sectors, but backup sectors remapped in place of bad sectors don't count into this number. – gronostaj – 2013-11-18T12:08:19.047
Hmm, so that error on sector 235018779 would mean an error in backup sectors… Is that possible? – Ivan Kovacevic – 2013-11-18T13:34:00.280
1Well, backup sectors can be corrupt too. Otherwise we would make "immortal" hard drives from backup sectors only. – gronostaj – 2013-11-18T15:17:38.043
:) … Well my reasoning was that backup sectors are not in use(and therefor safe). I presumed that HDD surface can only get corrupted if disk head(s) make(s) an improper action, because of a power failure or something. – Ivan Kovacevic – 2013-11-18T15:25:35.763
1Assuming that 235018779 sector is a backup sector. That means that I should have at least 235018779 - 234441658 = 577121 backup sectors. That is almost 282 MB in backup sectors. Seems a lot(too much) to me. Or is it? Just thinking out loud, maybe it's not a backup sector but a glitch in SMART diagnostics? – Ivan Kovacevic – 2013-11-18T15:35:17.077
It's just my wild guess, but I think it makes sense that backup sectors are indexed after normal sectors, that would match their physical location. 577121 sectors is just 0.2% of the total capacity, it's not that much if you think about it this way. Maybe that "normal" bad sector has already been remapped and the backup sector that replaced it failed too. Chances of that happening are low, but you know - Murphy's law... – gronostaj – 2013-11-18T18:00:59.257
Keep in mind that
badblocks -w
writes, then reads each pattern. If the write succeeds, the pending sector is cleared until a subsequent read fails. – rob – 2013-11-20T16:53:41.297I don't think that error ABRT point out at bad sector, more like bad address. – week – 2013-11-20T17:19:24.810
Were any new SMART errors logged after writing and reading the entire disk? – rob – 2013-11-20T23:47:55.353
Nope, none! Seems fine! Yet somehow I hate that feeling of uncertainty. – Ivan Kovacevic – 2013-11-21T00:00:20.133