One of the most insidious types of disk failure on conventional hard drives is due to bad sectors. A bad sector is a sector on a hard disk that cannot be read, written or corrected by the drive’s ECC (Error Correction Code) mechanism. Typically bad sectors develop slowly over time and the average computer user often gets no indication that there is a problem with their disk.
Bad Sector Symptoms
A disk with bad sectors will sometimes show these error messages.
“You need to format the disk in drive F before you can use it ” (Windows operating system)
“The disk in drive E is not formatted. Do you want to format it now?” (Windows operating system)
“The disk you inserted was not readable by this computer” (Mac operating system)
Modern drives more likely to develop bad sectors
Modern multi-terabyte drives using perpendicular recording are more likely to develop bad sectors compared to their smaller capacity brethren. This is because they use higher areal densities (more bits are squeezed into the same space), the track widths are narrower and their disk heads fly lower. These attributes make the drive’s signal-to-noise ratio decrease. As the SNR ratio decreases, the likelihood of bit-errors developing increases. However, this is somewhat compensated for by manufacturer’s use of more sophisticated ECC algorithms.
Other factors which increase the probability of bad sectors:
Age – As disks age, the probability of bit-flip and other magnetic distortions occurring increases. Hard disks are not the only magnetic storage medium to deteriorate with age. For example tape storage is notorious for age-related degeneration.
Thermal Asperities – Tiny particulates of contaminants inside the drive can cause a phenomenon known as thermal asperity. Typically, it occurs when a giant magneto-resistive drive head collides with a contaminant on the disk platter. As a result, heating will occur on the disk head and platter surface. This causes some sectors in the affected area to become unreadable.
Dirty Power – If the host system of your hard disk is delivering intermittent over and under voltages to your HDD, then the probability of bad sectors increases. Read/write heads need a stable power supply to perform read, write and erase functions properly.
Recovering data from a drive with bad sectors
In a small number of cases where the disk has relatively few bad sectors, commercially available data recovery programs can be successful in recovering your data. I emphasize a small number of cases because, as soon as these programs hit contiguous bad sectors, they will often get stuck or freeze the host computer. These programs are really only designed for disks with relatively few bad sectors. If the disk has any underlying read/write head issues, repeated retries can precipitate failure of one or all of the disk heads. Users who torture their drives by using these DIY programs on damaged drives risk permanently losing their data.
The right equipment and skills
If your data is in any way important, the best way to recover data from a disk which has extensive bad sectors is to take it to a professional data recovery company. They will have the equipment to deal with bad sectors. But, having the right equipment is not always enough. In the same way that a kitchen fitted out the with latest cookers, mixers and knives does not make a Michelin starred chef – the data recovery technician must have experience, skill and insight. Some bad sectors recoveries are straightforward procedures. Other cases will be more complex.
Data recovery from a Seagate Barracuda 7200.11
Take for example a client we were helping last week. A vetinary surgeon in Waterford was using a HP desktop PC with a Seagate Barracuda S-ATA 7200.11 as a server for his x-ray machine. Recently, the drive became inaccessible and his local IT support company were unable to retrieve his files. They were of vital importance to him. Without them, he would have to schedule appointments with dozens of his customers again in order to x-ray the animals for a second time. This would have imposed a huge time burden on his staff and would have been damaging to his reputation.
Our preliminary scans revealed that his disk had extensive bad sectors. To complicate matters, most of these bad sectors were in the inner tracks. This can be the worst place for a drive to develop bad sectors as the Master File Table file is usually stored here. This file is important because it acts as an index for the whole drive.
The data recovery from this drive involved a number of steps. Using our equipment, we disabled SMART on the drive. (In this case SMART only gave the user a warning after the drive failed to boot up). During the recovery process, SMART will actually hinder the recover process. Next, we put the drive into PIO mode instead of UDMA mode. Recovery from disks with bad sectors is made easier in this mode as it enables much better quality reads. Then we set the read time-out and read block size. Optimal read time-out will vary depending on the extent of the damage. Sometimes a time-out of 1200 millie-seconds is needed for reading from badly damaged sectors. In this particular case, our setting of 550 millieseconds proved optimal. We set the read block size to 60 sectors. The means our equipment would read 60 sectors at a time. This setting proved most suitable. Two hours into the process, the MFT file was successfully copied. The rest of the data took nearly 16 hours to copy.
Our process was successful. All of the x-ray files in .dicom format were recovered. We are able to use the excellent MicroDicom reader (created by Simeon Antonov Stoykov) to verify the integrity of the images. Our client was able to securely login to our systems to view his recovered files. A lot of labradors, poodles and cats had been saved a second trip to have their innards photographed!
Protection against bad sectors
For standalone disks, there are some inbuilt protections against bad sectors: Error Correction Code and SMART. ECC is designed to detect errors and try to remedy them. These are merely safeguards and nothing else. Hard disk manufacturers are sometimes a bit reluctant to over-burden their disks with ECC mechanisms for fear it creates too much of an operational overhead on the disk’s performance. Then there is the problem with SMART. Theoretically, this mechanism is designed to detect bad sectors and then report them to the user. But because a SMART alert entitles the user to an RMA (Return merchandise authorisation), manufacturers have set the SMART threshold extremely high. Often, the user only gets notified by a SMART alert when the drive is at an advanced stage of failure or has already failed.
Myths about bad sectors
A pervasive myth among general computer users is that only disks in Windows systems develop bad sectors. The reality is bad sectors are operating system agnostic. Whether a disk is running the latest version of Mac OS X, Linux or the latest version of Windows; it is still possible for the disk to develop bad sectors.
Hard Disk Sentinel to the rescue
There is an wealth of “disk health” programs available that promise to monitor the health of your disks. Some of these are adequate, others just do what SMART monitor does already. However, one disk health application which stands out for its accuracy is Hard Disk Sentinel. It provides some predictive indication if bad sectors are developing on your disk.
In the context of RAID arrays, bad sector management becomes much more sophisticated and would merit another another blog post to detail its intricacies.
Ulimately, the best prevention against bad sectors is backing up your data on a regular basis. Our vet client now uses an external hard drive to backup his x-rays. We recommended to him that he use a quality online backup service as an extra layer of protection.