S.M.A.R.T. stuff

RAID setup is nice – it provides redundancy and makes you buy more hard disks (and drives the economy). But the advantages are somehow retrospective; it is only realized when a disk gives up and calls it a day and you suddenly feel so smart (no pun here) that you had a RAID setup. For us to take preemptive measures, we can use smartmontools to monitor the vitals of the disks. So we know when the disk is reaching the end of its life and plan ahead, like getting a replacement, migrate to another system, etc.

apt-get install smartmontools                          # or

apt-get install smartmontools --no-install-recommends  # to install w/o the recommended mail server

Under /etc/default/smartmontools, uncomment a line to have smartd start on system startup:


Configurations are found in /etc/smartd.conf. I chose to combine 2 examples to come up with the following:

DEVICESCAN -m root -M exec /usr/share/smartmontools/smartd-runner -R 194 -R 231 -I 9

It means to scan for all devices, monitor them using default settings, send an email to root on failures, show raw Temperature_Celsius readings in /var/log/syslog and ignore Power_On_Hours. Now I drive the economy before the disk fails on me 🙂

Manpage of SMARTD.CONF