Problem setting up S.M.A.R.T monitoring
I am trying to setup smart monitoring using smartd but it refuses to start.
I have installed smartmontools and I am able to run smartctl -i /dev/[device] for all my drives and see that they are smart enabled.
However, when I try to run service smartd start it fails:
/var/log/messages tell me:
# service smartd start
Starting smartd (via systemctl): Job failed. See system logs and 'systemctl status' for details.
What are these environment files it is looking for?
Oct 16 00:02:10 holisrv2 systemd: Failed to load environment files: No such file or directory
Oct 16 00:02:10 holisrv2 systemd: smartd.service failed to run 'start' task: No such file or directory
I have looked around a bit and I have /etc/smartd.conf with the following content:
I did for some reason not have /etc/defaults/smartmontools. I tried creating it manually but to no effect. It now contains:
# Sample configuration file for smartd. See man smartd.conf.
DEVICESCAN -S on -o on -a -I 194 -m firstname.lastname@example.org -s (S/../.././02|L/../../6/03)
Looking in /etc/init.d/smartd I find (among others) the following lines:
# cat /etc/default/smartmontools
# Defaults for smartmontools initscript (/etc/init.d/smartmontools)
# This is a POSIX shell fragment
# List of devices you want to explicitly enable S.M.A.R.T. for
# Not needed (and not recommended) if the device is monitored by smartd
# uncomment to start smartd on system startup
# uncomment to pass additional options to smartd on startup
I have none of the files mentioned.
# Source function library
# Source configuration file
[ -r /etc/sysconfig/smartd ] && . /etc/sysconfig/smartd
I appreciate any help I can get.