[svlug] Files That Will Not Delete

Greg Lindahl lindahl at pbm.com
Sun Nov 2 18:33:34 PST 2014


On Sun, Nov 02, 2014 at 06:09:42PM -0800, Michael Eager wrote:

> If badblocks did not encounter any bad blocks there are several explanations:
>   1) There are no bad blocks

I haven't read this entire thread, but I just have to comment.

Last time I got a disk guy drunk and pumped him for secrets, he told
me that 20% of the disk surface is reserved for bad blocks, and that
it is completely normal to have lots of bad blocks. They mostly get
covered up by the drive firmware, but, if you get unlucky you'll end
up with a bad block that can't be read that the drive thinks has
important data on it. This will show up as an uncorrectable read
error.

{In the bad old days the drive really would have only 256 reserved
sectors to replace bad ones. That was 3 decades ago, and the tools still
pretend that this is reality. It isn't.}

We have 8,000 spinning rust drives at work. Here's what we do when we
have a bad one, where "bad" means any complaint in syslog or smart
showing actual errors or uncorrectable read errors:

1) Run SMART short self-test, if it fails, return for warranty repair
2) Write the entire drive. With luck, this will convert uncorrectable
read errors to (invisibly) remapped sectors.
3) If the drive now has 0 uncorrectable read errors, you have won and
the drive is good.
4) If the drive still has non-zero uncorrectable read errors, you are
fucked because the drive vendor thinks it's good, but it isn't. If you
are a small player, they may well exchange it under warranty.

Running badblocks is useless, starting about 15 years ago. The drive
should prevent badblocks from ever finding a badblock other than an
uncorrectable read error. 20%, remember? If the drive runs out of the
20% and starts letting you see bad sectors, you are totally screwed.

-- greg





More information about the svlug mailing list