Modern hard disk drives incorporate Self-Monitoring Analysis and Recording Technology, aka SMART.
Basically they have a degree of self-test capability that the user can access to help determine the health and life expectancy of a hard disk drive.
The tool I use is smartmontools.
There are others — many others. “Bonnie++” is one, and a whole suite of hard drive diagnostic tools is available on the Ultimate Boot CD as described here.
However if you’re simply in a hurry to discover whether your hard drive is likely to crash tomorrow, or not, here’s the quick look:
1. Open a Konsole window and
sudo apt-get install smartmontools
2. Verify the manufacturer, model, and SMART capability, and look at the current state of health (as last recorded):
sudo smartctl -ia /dev/sda
Here is the output:
