Installation
sudo apt-get install smartmontools
Test your hard drives
list your hard drives
sudo fdisk -l
launch the test on your hard drives
For example, if you have 3 hard drives as /dev/sda, /dev/sdb and /dev/sdc, run this command lines :
sudo smartctl -t short /dev/sda
sudo smartctl -t short /dev/sdb
sudo smartctl -t short /dev/sdc
As soon as one of these command lines is launch, the response ends with an estimate time remaining before having the result of the analyse.
Verify the integrity of your hard drives
With the same example as above, you will need to launch the following command lines :
sudo smartctl -l selftest /dev/sda
sudo smartctl -l selftest /dev/sdb
sudo smartctl -l selftest /dev/sdc
What is wished is the following “Status” for each of :
Completed without error
You can have more details with the following commands lines :
sudo smartctl -a /dev/sda
sudo smartctl -a /dev/sdb
sudo smartctl -a /dev/sdc
The result make easer to identify a hard drive if errors are logged.
After the line “SMART Error Log Version: 1”, the result is ok if “No Errors Logged”. Otherwise, the number of errors is displayed with the details for each them.