Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Surface scan during Disk Utility's Erase?

Does Disk Utility perform a surface scan, when you write zeros to the drive using Erase?

Or is erasing a write-only operation, rather than a test?

Thanks for any authoritative replies! Would appreciate references to Apple documents / Knowledge Base.

Various Mac models, Mac OS X (10.5.2), Computer Support Professional

Posted on Sep 4, 2008 8:16 AM

Reply
19 replies

Sep 4, 2008 2:05 PM in response to The hatter

Yes, it's my understanding that bad block re-mapping is normally handled by the drive's internal processor and firmware, when zeroing out a hard drive.

Surface scanning can be done in either read-only, or in read / write mode. Test patterns are used in read / write mode, to help detect bad sectors. This process is very time consuming.

Even read-only testing is better than nothing, and that might (or might not) be included in Disk Utility's Erase process, if the user chooses to write zeros to the drive.

But it's also possible to write zeros (or any other value) without reading the data back in. Apple may have chosen to do this, for the sake of speed, since wiping a drive is meant as a security option, rather than as a drive diagnostic.

Yet all this technical background and speculation is beside the point. Rather than what Disk Utility might do, the question on the table here is whether it actually does or does not test for bad blocks when zeroing out a drive?

Sep 4, 2008 2:29 PM in response to Francine Schwieder

My reading of the tech note is very different: a list of bad blocks is available for use by drive utilities. This is indicated in the quote in your first post here.

But Disk Utility does not use this list, and as far as I've been able to discover, no 3rd party utility does either.

That's because, as Hatter and I have detailed, bad blocks are mapped out *by the drive itself*, so no software can see them.

However, each drive has a limited reservoir of spare sectors, and when those are exhausted, the bad blocks can no longer be mapped out.

So unless Disk Utility actually tests the drive, writing zeros affords no guarantee that all bad blocks are mapped out.

And for anyone who intends to reuse a drive by writing zeros to it, the question of whether Disk Utility performs a surface scan is highly relevant.

Sep 6, 2008 1:34 PM in response to PrecisionTEQ

Third party utilities could implement the scheme for tracking bad blocks, as detailed in the Tech Note. However, I've yet to find any program which does this, and I've yet to find any bad block information listed for a drive (or volume) formatted by Disk Utility.


I hesitate to jump in, as you guys all know more about this than I. But SMARTUtility will access the drive's SMART data (assuming it's on a connection that supports it) and tell you the number of Pending, Removed, and Reallocated Bad Sectors there are. Also, as someone else has noted, Disk Warrior writes in the System Log how many replacement sectors are left or how many have been used, I forget exactly which.

As a Mac consultant I see many failures due to back blocks, so this discussion is especially welcome.

Sep 7, 2008 4:00 AM in response to cavenewt

Thanks for the idea, cavenewt: we can check whether a hard drive's spare sectors are exhausted, by examining the ReallocatedSectorCt field in its S.M.A.R.T. data.

First we need to find a drive which is past that point. Then we could zero out the drive using Erase, to check whether Disk Utility actually tests for bad blocks and, if so, how it reports a failure.

I've installed the MacPorts version of smartmontools, which includes the command-line program smartctl to test and report hard drive S.M.A.R.T. status & history.

I will start checking spare drives, to find one with more bad sectors than can be mapped out. It may take some time to locate one which is still spinning.

So I'd be interested to hear reports from anyone who can run the tests and finds such a drive. I'd be willing to provide any help required to install and run smartmontools, which is a free, open-source utility.

Surface scan during Disk Utility's Erase?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.