Smartmontools

This article describes the setup of smartmontools, a utility to read and monitor S.M.A.R.T. information of disk drives.

BIOS
Often you can enable or disable this feature in your BIOS. Enable it.

Software
Install :

Usage
smartctl is the main tool of smartmontools:
 * smartctl -i /dev/sda - Check if S.M.A.R.T. is supported.
 * smartctl -s on /dev/sda - Enable S.M.A.R.T.
 * smartctl -H /dev/sda - Read S.M.A.R.T. information. If the result is  , everything is fine. If the result is  , you should backup your data. The disk drive screwed up or will in the next 24 hours.
 * smartctl -c /dev/sda - Shows which tests are supported and how long the tests will take.
 * smartctl -t /dev/sda - Start the a specific test. Possible values for   are:
 * offline - Run the S.M.A.R.T. Immediate Offline Test. The result is later available in the error log.
 * short - Run the S.M.A.R.T. Short Self Test. The result is later available in the selftest log.
 * long - Run the S.M.A.R.T. Extended Self Test. The result is later available in the selftest log.
 * conveyance - Run the S.M.A.R.T. Conveyance Self Test. The result is later available in the selftest log.
 * smartctl -l /dev/sda - Print either the S.M.A.R.T. Error Log or the S.M.A.R.T. Self-Test Log. Possible values for   are:
 * error - Print the S.M.A.R.T. Error Log. Shows all reported errors. If the result is  , everything is fine. If there are some old errors, it's also OK. If there are lots of recent errors, backup your data.
 * selftest - Print the S.M.A.R.T. Self-Test Log. Results for short, long and conveyance tests are reported here.

S.M.A.R.T. daemon
The daemon smartd checks your disk drives continuously. is its config file. See the smartd.conf man page for more information. Errors will be reported to.

This example file monitors 4 hard drives and sends a test e-mail on smartd startup. It also runs a scheduled smart test every week on Friday at 3:00am

You can now start smartd:

To start smartd at boot time, add it your runlevel:

Troubleshooting

 * smartmontools bugtracker: known bugs
 * smartmontools bugtracker: known bugs