Here's how I understand things [which could easily be wrong] - a failed *read* won't get a bad/failing block re-mapped to a "good" block - only failed *writes.*

You might have a read that fails only part of the time - so occasionlly it will read properly and all will be well.

To force a re-map of the bad block, you'll need to try to write to that block. If the write fails, then it will re-map the block to one of the spares.
Before writing to the block, you may want to try to read it and/or verify there's nothing there you actually need.

HTH
-Greg



On Thu, Jul 11, 2013 at 9:38 AM, <robert@spotswood-computer.net> wrote:
I had a hard drive yesterday I ran smarttools on. It showed one current
pending sector count. I ran a short test and it failed on a specific block
at 10%. From what I read here, that's not uncommon for a hard drive to
stop the test at the first bad block it finds. Looking through the
extended error log (smartctl -x /dev/sda) - the regular error log was
empty - I found a bunch of errors. All the complete error reports pointed
to the same specific block.

To verify, I tried hdparm --read-sector <number of sector found above> and
it failed. Since I had nothing to loose, I wanted to see if I could change
the pending count, so I used hdparm --write-sector <number of sector found
above> --yes-i-know-what-i-am-doing /dev/sda. This worked.

Now I used hdparm to try to read that block/sector again and I could,
although it had no data. Not surprising. I figured I had just forced the
firmware of the drive to reallocate a spare block, so the pending count
would go to 0, and the reallocated count would be 1.

But when I ran smartctl -x /dev/sda again, the reallocated sector count
was still 0! The pending count was also 0 as was the Reallocation Event
Count and the Offline Uncorrectable. I re-ran the short test, and this
time it passed. I even ran badblocks on the whole drive, and no bad blocks
were found.

Can someone explain what I did/saw? I find it hard to believe I "repaired"
the bad sector, but that's the only explanation I can come up with to
explain my results.




------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Smartmontools-support mailing list
Smartmontools-support@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/smartmontools-support