Wednesday 1 January 2020

hard drive - What happens to sectors marked as bad when HDD is repartitioned?



If I have an HDD with some bad sectors and I format the disk (from Windows) or re-partition the disk, will bad sectors still be marked as bad?



Answer



A long time ago hard drives did not have spare sectors or advanced firmware that did much more than read/write the disk. This was around the time that hard drives were "full-height" (the height of 2 CD-ROMs) and came with a "defect table" sticker which identified bad sectors on the disk from the factory.


So filesystem support for identifying bad sectors was a necessity, and exists in FAT and NTFS (though by the time NTFS appeared with NT in 1993 I think these types of drives no longer existed or were on the way out).


If you have one of these ancient drives that information is killed when you redo partitions - you have to format and create the filesystem again, and scan again for bad sectors.


These days, spinning hard drives have advanced firmware and spare sectors, and can switch them out "on the fly" without the OS even knowing. Since the sector is not in line with others physically, it degrades performance. SMART data will report on this (Reallocated Sector Count). The OS will only receive a report of a bad sector from a hard drive if the drive is out of spare sectors, which means at this point you ought to replace it. (Hard drives likely are still manufactured with some existing surface defects that the firmware hides as well.)


The filesystem support for marking clusters as bad is still there in FAT and NTFS, but never used basically.


Anything you do to the filesystem does NOT affect the firmware. So a simple reformat, or redoing your partitions and reformatting, will not do anything with firmware-managed spare sectors.


No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...