1. Install smartmontools and smart-notifier and accept all dependencies:
sudo apt-get install smartmontools smart-notifier
2. Enable smart features on each drive. First list all the drives with:
If the drives are part of a linux software raid array issue this command first:
Assuming your array is /dev/md0 or it could be any number you set. Adjust as necessary. After you get a listing of all the drives you want to monitor enter the following command for each drive:
smartctl --smart=on --offlineauto=on --saveauto=on /dev/sdb1
This assumes there’s drive /dev/sdb1 that you want to enable smart status on it. You can check the smart status for each drive you enabled smart status on by using this command:
4. Edit your /etc/smartd.conf file:
Replace the “root” entry right after the “-m” with the email address that you want the notifications to go on the “DEVICESCAN” line:
DEVICESCAN -m firstname.lastname@example.org -M exec /usr/share/smartmontools/smartd-runner
5. Configure smartd to start automatically. Edit the “/etc/default/smartmontools” file:
sudo vi /etc/default/smartmontools
Uncomment the “start_smartd=yes” line and save the file.
sudo /etc/init.d/smartmontools restart
* Restarting S.M.A.R.T. daemon smartd [ OK ]
Ensure service is running:
You should get a result similar to below:
If the service fails to start, check out /var/log/messages for any errors and correct them. It’s also a good idea to reboot your machine and verifying that the “smartd” service started automatically.
Thanks to this guy for the help!