There are no reallocated sectors because they failed to reallocate. Your drive is showing 5 Offline_Uncorrectable sectors, which happens when automatic repair fails. There are obvious read failures shown in the dmesg output, SMART errors, and read failures from SMART tests. There are ways of repairing these sectors as you have mentioned in the question, but from my experience it is a very short-term fix.
Replace the drive.
Your disk had some problems with reading data from the surface, but it seems that the disk dealt with it. I had similar situation:
Error 29 occurred at disk power-on lifetime: 18836 hours (784 days + 20 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 08 00 40 37 e6 Error: UNC 8 sectors at LBA = 0x06374000 = 104284160
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
c8 00 08 00 40 37 e6 08 03:39:32.447 READ DMA
c8 00 08 f8 3f 37 e6 08 03:39:32.447 READ DMA
c8 00 08 f0 3f 37 e6 08 03:39:32.447 READ DMA
c8 00 08 e8 3f 37 e6 08 03:39:32.447 READ DMA
c8 00 08 e0 3f 37 e6 08 03:39:32.447 READ DMA
And when I wanted to perform test, I got:
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 7 Short offline Completed: read failure 90% 18845 104284160
Ultimately, I managed to unblock the sectors, and after running the extended test, which scan the whole surface, I got the following result:
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 3 Extended offline Completed without error 00% 18858 -
If there were bad blocks, they could be observed in the table under:
5 Reallocated_Sector_Ct 0x0033 200 200 140 Pre-fail Always - 0
196 Reallocated_Event_Count 0x0032 200 200 000 Old_age Always - 0
197 Current_Pending_Sector 0x0032 200 200 000 Old_age Always - 0
In your case, there's no indication of bad sectors because the extended test was performed (11746 h) after the last error occurred (11706 h). So, you can sleep peacefully. :)
As I mentioned in comments, there's two types of badblocks. Here's short info about the difference between the two:
There are two types of bad sectors — often divided into “physical” and
“logical” bad sectors or “hard” and “soft” bad sectors.
A physical — or hard — bad sector is a cluster of storage on the hard
drive that’s physically damaged. The hard drive’s head may have
touched that part of the hard drive and damaged it, some dust may have
settled on that sector and ruined it, a solid-state drive’s flash
memory cell may have worn out, or the hard drive may have had other
defects or wear issues that caused the sector to become physically
damaged. This type of sector cannot be repaired.
A logical — or soft — bad sector is a cluster of storage on the hard
drive that appears to not be working properly. The operating system
may have tried to read data on the hard drive from this sector and
found that the error-correcting code (ECC) didn’t match the contents
of the sector, which suggests that something is wrong. These may be
marked as bad sectors, but can be repaired by overwriting the drive
with zeros — or, in the old days, performing a low-level format.
Windows’ Disk Check tool can also repair such bad sectors.
Best Answer
I can only second the answer from vonbrand. I've seen at least two HDDs die in the past month after going to pre-fail in SMART.
However, your best bet is probably not SMART itself but instead the
badblocks
utility.You can let
badblocks
read and rewrite the whole disk, thereby forcing your HDD to reallocate pending sectors. This usally works quite well.If you don't have the time for running
badblocks
(It can take days on bigger disks) you can try to read out the SMART error log (smartctl -x /dev/<hdd>
and get a list of broken sectors.You can then use
hdparm
to read the sector:If that fails you force a remap using
This works quite well (at least for WD-Green drives, can't you tell anything about other drives)
If you have
dmesg
log messages for failed sectors it's even easier.Before mounting the volume again do a forced
fsck
And assume to have the drive dying on you yesterday!
Good Luck :)