Sunday, March 27, 2011

Nostradamus of the Hard Disk

The older Compaq NC6000 that I have set up as a dual boot Linux/Windows has started to warn of impending hard disk drive failure.  My first reaction was, "What?  There's a Nostradamus chip in here somewhere?  Not to worry, it's more science than supernatural, more math than magic. 

The Linux Disk Utility shows the SMART data which reports when sectors are remapped to a new location because of read errors.  The Disk Utility says that there are a "few bad sectors."  In more detail, I see that there are 3,047,927 bad sectors--which sounds like a bit more than a "few."

I was planning to replace this 20 GB hard disk anyway with something larger, so that Linux and Windows wouldn't be cramped in there, but this gives me an incentive to do so.  I was hoping someone would give me an EIDE notebook drive that they had outgrown, but it never happened, so I ordered up a 160 GB replacement for $64.  That should be more than enough.


  1. That's a few bad sectors, but nothing too much or too unusual for the age of the drive. Your real problem is that those are real bad sectors and you've run out of replacements.

    The way drives work is that the manufacturers have a bunch of spare tracks around the outer part of the drive. When you get a TA (thermal asperity, usually a spec of dust) the drive goes into a recovery mode trying various things to get the sector read and virtually always getting the data. You then go and write the recovered data to a spare track, mark the sector as bad in the internal tables, map the sector to the new sector on the spare track, and continue on without alerting the user.

    When you get to the stage that you're out of spare tracks, then the user can see bad sectors start to accumulate. And when that happens the drive is generally on its last legs and that's when S.M.A.R.T. kicks in. My rule of thumb is what when you start to see bad sectors it's time to replace the drive since it's not long for this world.

  2. You're kidding, right? You can get a 500GB Western Digital on Amazon for under $60!

  3. At 512 bytes per sector (since 2007 or so, they've upped it to 4k, but a 20 gig drive isn't that new), there are just under 40 million sectors on the disk.

    So, yeah, at nearly 10% bad that drive's going to fail any minute now.

    (PhaseMargin is 100% correct up there; once you start SEEING bad sectors it's new drive time.)

  4. holdfast: That's a SATA drive. It won't work on my antique. SATA drives are dramatically cheaper per gigabyte than PATA drives.