• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

How does fixing HDD bad sectors work?

fuzzybabybunny

Moderator<br>Digital & Video Cameras
Moderator
I've got a HDD with some bad sectors. I've read that what scandisk does is mark these sectors as unusable. Does this mean that these markers will be erased during a zero-fill format or a switch to an ext3 file system?

I've tried running fsck on the disk in Linux but I can't because it keeps on thinking the drive is a "zero-length partition" and attempting to read it resulted in a short read.

Maxtor's diagnostics include a full scan test, a burn-in test, and a zero write format. The problem is I don't know if any of them actually repair anything. And the same question applies; if markers are placed around the bad sectors, will they just be erased once I format the drive into ext3 for Linux?
 
Bad sectors can be confusing.

When the PC requests data from the drive, but the drive is unable to give the data to the PC - it will tell the PC that it's come across a 'bad sector'. Generally, the OS will then make a record of that bad sector somewhere else on the drive. When the drive is next used, the OS will check the list of bad sectors and avoid them.

If you perform a 'quick format' Windows will preserve the list of bad sectors. However, if you 'zero-fill' the drive, or format it as a different format (e.g. in linux) then the list of bad sectors will be lost. Normally, during a 'full' format, the OS will try and read the entire drive, that way if there are any bad sectors, they will be detected and the list regenerated.

However, not all sectors are bad all the time (sometimes the drive gets lucky and can read it) - this means that a drive reformatted after 'zero-filling' may not have a complete list of bad sectors after formatting.

---

Some people have claimed to have 'repaired' bad sectors. What's going on here?

All hard drives will have some bad sectors when they come from the factory. They can't be made perfect enough. So how come, when you get a brand new drive, it's perfect in scandisk? The answer is that drives contain a number of 'spare' sectors. During normal use the drive will calculate quality scores for each sector as it's accessed, and periodically scan the entire drive. If a sector is going bad, then it will automatically copy the data into a spare sector, and disable the original sector. Or, if the data is bad and unrecoverable, it will disable that sector and activate a spare.

This dealing with spare sectors is done automatically by the drive. The OS has no access or control over it.

So, sometimes if a sector suddenly goes bad - scandisk will report it as bad. But at the same time, the drive will replace it with a spare. Scandisk has no way of knowing that a spare has been recruited, so it carries on as normal. However, if you zero-fill the drive and reformat, the bad sector will have gone (it will appear ot have been repaired). This is relatively uncommon.

What happens more commonly, is that spares are recruited to replacing weakening sectors. Eventually, all the spares get used up - and the next time a sector dies - the drive has no choice but to call it bad. In general, if you've got more than 1 bad sector on a drive, this is what has happened. Essentially, the drive has suffered critical damage which has used up all the spares. In general, such a drive is likely to be very unreliable and have a very short life. It should be replaced immediately.
 
IBM and WD's older utilities would allow you do do a real sector remapping to fix problems but their newer utilities are just software diagnostics and filesystem remappers. I doubt these utilities work on 120GB+ drives.
 
Ichinisan,

Do you know where we could download that older software. I actually have a drive with a few bad sectors and would like to remap it. It is an older IBM drive.


Thanks!

eddie
 
SpinRite from http://www.grc.com is probably the best HDD diagnostic and data recovery tool available, but it is pricey. If your drive does have hidden "spare" sectors, SR will know how to use them. Programs like scandisk or checkdisk just lock out the bad sector (cluster) and remaps the data elsewhere if it is recoverable. I know SCSI drives come with hidden spares (at least they used to), but I'm not sure about ATA drives - I think you just lose what sectors are considered bad.

.bh.
 
Back
Top