Does a hard drive remember bad sectors after formatting?

On an NTFS-formatted hard drive with some bad sectors, does the hard drive still remember bad sectors after Windows's diskpart clean is used to remove the NTFS volume? What about clean all?


Solution 1:

NTFS remembers bad clusters. A cluster is considered bad if any sector in it is inaccessible. Since the cluster badness information is stored in a file ($BadClus, specifically), that information will get blown away if the NTFS volume is removed. (clean and clean all are essentially the same in that regard. clean all does a more thorough destruction of the disk's data, while clean just wipes the partition table.) Further reading: NTFS System (Metadata) Files.

The hard drive is what remembers bad sectors. Exactly how it does that depends on the model of the drive, but most modern disks automatically detect and remap dead sectors so that the operating system doesn't even know there's a problem. In that case, nothing the OS does can affect the disk's internal bookkeeping.

As others (notably harsh's answer) mentioned, if the OS can see bad sectors, the disk may have run out of internal spare sectors. (Especially true if the failure is returned on a write.) Bad ThingsTM will probably happen soon if you do not replace it.

Solution 2:

If the OS is encountering bad sectors, the drive's internal bad block table is probably full (as Ben N pointed out) and it is time to retire the drive. Drives typically don't stop failing.