Wednesday, February 28, 2018

hard drive - Full formatting, HDD controllers, and bad-sector locking

We get periodic questions about manually locking and reassigning bad sectors on hard disk drives. There seems to be apparently conflicting information on one aspect of this, the hard drive controller and full formatting.


Hard Drive Controller


Hard drive controllers perform some automated recognition of bad sectors, lock (mark) them, and automatically reassign the contents. This is reported in the SMART information. My understanding is that this is a "random" process, i.e., it happens when the controller stumbles across a bad sector during drive usage.


Full Format


The accepted answer on this question, How to isolate bad sectors on a hard disk in Windows 7?, quotes Microsoft in describing a full format. It talks about the process including a scan for bad sectors, and that in Vista and later, this is accomplished by writing zeros to the entire partition.


Implication


The implication seems to be that the full format uses the drive controller's automated process, and the zero-fill provides a means for the controller to examine every sector. It's possible that sector verification is controlled by the format utility, itself, but this is not described.


No Inherent Read Verification


In a recent question, How do Zero-Fill, Full Format, and CHKDSK fix bad sectors?, there is discussion of this in comments on the answer. In this comment, user sawdust states,



Zero-fill or "formatting" for a filesystem use ordinary write operations. There's no automatic verify or read after write, but there would have to be a read in order to detect a bad sector. So I would not expect any change in the bad sector lists maintained by the controller.



My attempts to research this issue did not uncover any articles on bad sector cleanup that mentions using a full format as a means to accomplish this, which would be consistent with sawdust's comment.


Which brings me to this question, and these two components:



  • How does a full format identify bad sectors? i.e., is the bad sector identification (read verification) managed by the controller as part of its automated response to the zero fill, or does the format utility perform reads of each sector?


  • What condition triggers the hard drive controller's automated process to lock a sector and reassign the contents? i.e., if writes don't inherently involve read verification, is the action triggered only by an inability to correctly read a sector (at least on the initial try)?


  • And corollary: if the format utility performs its own read verification, which I assume would be against the zero-fill (and then marks an external bad sector list, as described in cybernard's answer), wouldn't that read action also trigger the automated verification by the controller? i.e., wouldn't that create redundant checks, and so why would the external list be needed?


No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...