Installing and configuring S.M.A.R.T. in Centos.
Install the package:
yum install smartmontools
Add to startup and run the daemon:
chkconfig smartmontools on service smartd start
Look, how many and what drives us in the system:
fdisk -l
View information about the disc /dev/sda:
smartctl -i /dev/sda
Enable S.M.A.R.T (if turned off):
smartctl -s on /dev/sda
Viewing values S.M.A.R.T. disc /dev/sda:
smartctl -A /dev/sda
In order to receive a notification e-mail if a problem occurs, you must file /etc/smartd.conf comment out:
DEVICESCAN -H -m root
and add to each available disk in the system line of the form:
/dev/sda -a -s (S/../../(1|3|6)/01|L) -m root @ domain.net -M diminishing
replacing root @ domain.net to your mailbox (no spaces).
restart the service:
service smartd restart
Now if you have a problem with the disc, you will receive a notification to your email.
In order to test the sending and receiving mail, you must file /etc/smartd.conf replace diminishing with test and restart the service. You should immediately receive an email. If not - check the settings of your mail server.