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 10:06 AM in response to baltwo

AFAIK, DU does map out bad blocks when writing zeros to the HD.


Hi baltwo,

I had believed that as well, but after searching today I could find no documented evidence of it anywhere on Apple's site. The only thing I could find on Apple's support site referenced TechTool Deluxe for this task. If you have more info I'd love to hear about it. 🙂

Sep 4, 2008 10:50 AM in response to PrecisionTEQ

The question is, does Disk Utility test for bad blocks, i.e. does it perform a surface scan, when writing zeros during Erase?

It's generally accepted that writing zeros will usually trigger a drive's firmware to map out bad sectors, if spare sectors are available as replacements. But spare sectors may be unavailable, or the operation could fail for other reasons.

Before posting this question I checked thoroughly, and found just one formally published claim that Disk Utility does any testing when writing zeros, under number 6 on this page:

http://macs.about.com/od/applications/ss/diskutilformat_4.htm

However, there are no references cited ion this page. I'd greatly appreciate if someone can provide authoritative, documented evidence, either for or against the claim. Thanks again.

Sep 4, 2008 11:01 AM in response to PrecisionTEQ

To learn more than I care to know about Disk Utility and the Mac OS native format processes, take a look at this article in Apple Developer Connection.

http://developer.apple.com/technotes/tn/tn1150.html#BadBlockFile

Here's the relevant paragraph:

Bad Block File
The extent overflow file is also used to hold information about the bad block file. The bad block file is used to mark areas on the disk as bad, unable to be used for storing data. This is typically used to map out bad sectors on the disk.


Looks to me like mapping out bad blocks is a standard part of the erase and format procedure.
Francine

User uploaded file
Francine
Schwieder

Sep 4, 2008 12:26 PM in response to PrecisionTEQ

The disk drive does the mapping out, and zero all may, or may not, catch a weak sector. A 7-way erase does, in my experience will and has.

MicroMat (TechTool Pro) surface scan of media will alert on detecting a sector but doesn't take any other action. Has basic SMART tests.

Speedtools by Intech has a media scanner that has the option to map out, but my results with it are mixed at best. I had better luck using Windows chkdsk with option to attempt to map out bad blocks. It also has an extensive SMART test.

Zero all is not writing patterns and you really need to see if bits can be switched, which is why a hex x'FF' zeroes and ones might work better.

SoftRAID will alert if there is an error, and you can specify if you only want to know about unrecoverable after multiple atempts.

Disk Warrior has a test, writes the smart status line to system log, and will show how many spare blocks, how many used, how many still reserved, which in one study was found to be a good indicator of when to replace a drive if it starts using from the pool of spares.

Would I rely on the zero-all? that is what Micromat recommends to start with, doesn't take 2 hrs per 100GB like 7-way write will. And subjecting a drive to 7-way, either fix it or kill it? I know those old low=level formats would really heat up SCSI drive to point it would be too hot to touch.

Vista detected a bad block, wouldn't do backup until it was fixed and the partition reformatted - there was 4k file on bad block(s).

Sep 4, 2008 12:50 PM in response to PrecisionTEQ

The tech notes in ADC contain information that developers need to know to write programs. In this case it is the information necessary to write a disk utility program for working with disks for the Mac, using the HFS+ file system. Which means it is the same information that the Apple engineers used in writing Apple's own program, to wit Disk Utility. I have no desire to write a program, ever, nor any pressing curiousity about disk formats, so did not read the article, merely scanned it for relevant information. But it looked to me like it was saying that mapping out bad blocks is an integral part of erasing and formatting a disk for HFS+ and thus would automatically happen when the program does that thing. Disk Utility does that, therefore bad blocks are indeed taken care of when you erase and format a disk using Disk Utility. I don't know whether one would call this "scanning" or not. But bad blocks are found and removed from use for storing data.
Francine

User uploaded file
Francine
Schwieder

Sep 4, 2008 12:52 PM in response to PrecisionTEQ

No. The drive itself gets an I/O request to do something. DU says "write zero" and unless it gets an invalid read, goes to next block. That to me is not really "testing" by my definition of "test."

Disk drives have their own DSP processors and handle - and have handled - all of the requests. At one time, Apple HD Setup actually did try to "low level" on ATA and of course was quickly updated and the feature - which was designed for SCSI, removed.

Sep 4, 2008 1:28 PM in response to Francine Schwieder

Testing for bad blocks is very time-consuming, so Disk Utility routinely erases and reformats hard drives without doing a surface scan.

The question is whether or not Disk Utility performs a surface scan when the user chooses to write zeros to the drive.

Writing zeros is a security option, intended to wipe personal data from a drive. So this option could also be performed without a surface scan.

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.

Sep 4, 2008 2:04 PM in response to PrecisionTEQ

The way I read the information in the tech note is that you won't find a "list" of bad blocks, but erasing and formatting the disk does find the bad blocks and marks them as used in such a way that they can not then be used for storing anything else. In short, they are mapped out. So I suppose it is technically incorrect to say Disk Utility "scans" the disk. But for practical purposes it does find the bad blocks and in effect disables them, so nothing you put on the disk will be corrupted by being written to a bad block. Evidently you are interested in something else. I think all most people would want to know is whether using Disk Utility to erase and format a disk will result in bad blocks being eliminated from use, so that the things they then put on the disk will not be corrupted. To that the answer is: yes, bad blocks are found and treated in such a way that no regular files will ever be written to those areas of the disk.
Francine

User uploaded file
Francine
Schwieder

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.