Surface scan
Brought to you by:
kwidholm
Besides a basic disk check, a surface scan could come
in handy when there are some deep problems on the disk.
Are there any C utilities for Darwin out there that can
be invoked by a shell script?
Perhaps there needs to be a submenu in the user
interface for "deep maintenance" or "other options/tools".
Logged In: YES
user_id=583959
http://smartmontools.sourceforge.net/
Smartmontools can do a surface scan, but not remap blocks.
I'll have to look for scripts that can remap blocks on a drive.
Also, there is a nice package of universal binaries that can
install smartmontools for Mac OS X:
http://geppo1982.altervista.org/smartmontools_5.36.pkg.tgz
Logged In: YES
user_id=583959
From macosxhints.com
Alen Shapiro describes a UNIX process called "badding" for
monitoring disk volumes and marking blocks bad as they fail.
The reason this is not done in modern file systems is
because the hardware provides this functionality. Hard
drives have a supply of "hot spare" disk blocks which are
automatically swapped for other blocks when the drive
detects them going bad.
Erasing a drive using its built-in firmware (what is
erroneously referred to as "low level" formatting) checks
the surface for bad blocks and allocates a new pool of hot
spare blocks.
A drive's SMART status should (among other things) track the
number of bad blocks and available hot spare blocks.
A software-based "badding" system is not useful with this
kind of drive. When a block goes bad, it will be swapped for
a hot spare by the drive's firmware, and the OS will never
know there was a failure. The OS will only start getting
errors from the drive when the pool of hot spare blocks runs
out and there are more bad blocks remaining. When a drive
gets to this state, you don't want the OS to wait even
longer to inform the user.
A much better system is to simply have a program monitor the
drive's SMART status and issue alerts when SMART indicates
an imminent failure.
Looks like we should just do a SMART report, and not a
surface scan.