Thursday, January 24, 2013

Is my hard drive dying?


I remember back like 10+ years ago, one way to tell if a hard drive was dying is the number of bad sectors on the drive.  Occasionally you scan your drive, and if that scan comes back with bad sectors you know your drive is slowly dying and you might want to consider a new drive.

Recently at work a drive in a server machine had been causing problems, and sometimes even crashing the machine.  When you reboot the machine, the BIOS reported a hard drive failure.  So I ran a sector scan which came back with 0 bad sectors.  I wasn't expecting that, I was for sure there would be a lot of bad sectors.  Well it turns out, most newer hard drives employ a little technique to make you think the drive is still doing great when in fact it is dying.  They have extra sectors on the hard drive which are held in reserve, there is no way for the operating system to access these sectors.  When the hard drive detects a bad sector, it stops using that sector and replaces it with one of these reserved sectors.  So to the outside world the drive is still running great, but internally the failures have begun.

It turns out there is a way to detect and track this.  Newer hard drives have what is called S.M.A.R.T. (or Self-Monitoring, Analysis and Reporting Technology).  Basically the drive tracks statistics about it's own operation; number of hours in use, number of reads and writes, etc.  One of the stats it tracks is number of reallocated sectors.  Checking the S.M.A.R.T. stats on the failing drive I found over 5,000 reallocated sectors.  Indeed, the drive was failing.

So how do you read these stats?  There are tons of free and commercial tools that read and display this info.  I like Defraggler by Piriform.  In addition to reading and displaying S.M.A.R.T. data it is a great disk defragger, and it's free!


No comments:

Post a Comment