HDD stands for "hard disk drive", typically where data is stored on computer. As this is a mechanical device, it is one of the more likely devices to fail inside of your computer. For this reason, make SURE you do a backup of any important data you have. If you do think your HDD is dying, or are having issues and would like to check, all major HDD vendors offer a diagnostic boot cd image. This means you should download it, and burn it onto a cd, and boot your computer off it, which will step you through the process of testing your HDD for issues.
If you have shred installed, you can use
# shred -vz -n 50 /dev/hda
assuming /dev/hda is the disk you'd like to wipe. If you don't have shred installed, you can use trusty dd:
# dd if=/dev/random of=/dev/hda
Testing on Linux
To test read speed on /dev/sda:
$ sudo hdparm -tT /dev/sda
To test write speed on /dev/sda (this assumes it's mounted and contains /tmp, and you have one gigabyte of available space!)
$ dd count=1k bs=1M if=/dev/zero of=/tmp/test.img
Better tests can be obtained using tools written for the purpose.
- This is a hack of
ddthat will report timing/bandwidth information written by Coraid. It can be found at http://support.coraid.com/support/sr/ddt-8.tgz
- Sample output:
[[email protected] /scratch]# ddt -c 10240 -b 1k . * warning: total I/O < total ram - throughput reported may not reflect I/O path. Writing to ./ddt.29528 ... syncing ... done. sleeping 10 seconds ... done. Reading from ./ddt.29528 ... done. 10 MiB KiB/s CPU% Write 75851 38 Read 1024000 50
- This is a wonderfully detailed program, useful for getting a comprehensive test of your IO system. Details at http://www.iozone.org/ (and much too complicated to describe here!)
Testing on BSD
Test your read speed on disk /dev/ad0:
# diskinfo -c /dev/ad0
You can also try rawio, iozone, or bonnie from the ports tree.