Stress testing used hard drives


I got a batch of used 18 GB SCSI hard drives this week, and wanted to test each drive to see if they were free of errors and still usable. I had to outfit each drive with a Sun spud bracket prior to installing them in a 6-bay Sun Multipack. Once the drives were installed, I used the following while loop to continuosly write 1 Mb blocks to disk drives attached to my Solaris 10 server:

while :
do
    dd if=/dev/zero of=/dev/rdsk/c1t6d0s2 bs=1048576 seek=1
done

I allowed this loop to run 20 times per drive, and used the smartctl utility to check the health of each drive once the tests completed:

$ smartctl -a /dev/rdsk/c1t2d0s2

smartctl version 5.33 [sparc-sun-solaris2.9] Copyright (C) 2002-4 Bruce Allen
Home page is http://smartmontools.sourceforge.net/

Device: SEAGATE  SX318203LC       Version: B90B
Serial number: LR869054    102424W2
Device type: disk
Local Time is: Thu Jun 30 19:56:54 2005 EDT
Device supports SMART and is Enabled
Temperature Warning Disabled or Not Supported
SMART Health Status: OK
Vendor (Seagate) cache information
  Blocks sent to initiator = 220889811
  Blocks received from initiator = 118918432
  Blocks read from cache and sent to initiator = 8153478
  Number of read and write commands whose size <= segment size = 1354214
  Number of read and write commands whose size > segment size = 46873
Vendor (Seagate/Hitachi) factory information
  number of hours powered up = 65.45
  number of minutes until next internal SMART test = 106

Error counter log:
           Errors Corrected by           Total   Correction     Gigabytes    Total
               EEC          rereads/    errors   algorithm      processed    uncorrected
           fast | delayed   rewrites  corrected  invocations   [10^9 bytes]  errors
read:       4621        0         0      4621       4621        135.662           4
write:         0        0         0         6          6         68.820           0
verify:        0        0         0         0          0         15.207           0

Non-medium error count:        0

Error Events logging not supported

[GLTSD (Global Logging Target Save Disable) set. Enable Save with '-S on']
Device does not support Self Test logging

Smartctl detected several uncorrectable errors on disk c1t2d0s2, so I decided to return that disk to the individual I purchased it from.

Conclusion

Only two disk drives in the batch of drives I purchased failed my tests, and luckily I was granted a refund for the defective hardware. Smartmontools is a great piece of software for proactively detecting failed disk drives, and is freely available for all to use.

References

The following references were used while writing this article: