[lug] Hard drive testing tools
Ryan Kirkpatrick
linux at rkirkpat.net
Sun Jun 20 14:34:58 MDT 2010
On Sat, 19 Jun 2010, Chris Riddoch wrote:
> To those of you working with lots of hard drives, what do you use to
> evaluate the quality of a disk?
I have used a combination of smartctl, badblocks, and bonnie. My procedure
was:
*) Boot Linux box with disk attached and review kernel messages (e.g., was
the disk seen, was its capacity/partition correctly read, etc...).
*) Run 'smartctl -a /dev/{s,h}dX' on the disk and review the report.
*) Run the long self-test on the disk if supported: smartctl -t long
/dev/{s,h}dX'
*) Then ran badblocks in read/write mode (will DESTROY all data on the
disk), using the block count from the kernel messages: badblocks -b 512 -o
log -svw -c 20480 /dev/{s,h}dX $BLOCKS
*) Finally ran bonnie on the disk, focusing more on block tests than file
tests: cd /mnt && bonnie -f -n 0 -u root -s 2047
If all of that completed successfully and no spurious kernel messages were
generated, then I considered the disk good. But of course that is a rather
tedious set of steps and no real guarantee that the disk is good (though
has identified bad disks).
Lately I have been using SpinRite (from grc.com) to read the disk SMART
info and run a badblock test (Level 4 in SpinRite terms). While it does
cost money (maybe you can get a non-profit discount), you don't need a
Linux install to run it, just a boot floppy/USB or my favorite is a CF
card with an IDE adapter. You can connect multiple disks at once, boot
SpinRite, tell to batch scan them all, and walk away. This is in no way a
plug for SpinRite, and let the flamewar begin about it being snakeoil or
not. :)
PS. For a computer-recycler you probably want to be running some sort of
scrub operation (multiple write passes) on the disks to remove any
data. A disk suriving that may be enough of a test!
---------------------------------------------------------------------------
| "For to me to live is Christ, and to die is gain." |
| --- Philippians 1:21 (KJV) |
---------------------------------------------------------------------------
| Ryan Kirkpatrick | Boulder, Colorado | http://www.rkirkpat.net/ |
---------------------------------------------------------------------------
More information about the LUG
mailing list