Configure Automated Tests

Under a Unix install of smartmontools there is the ability to set a daemon to run and monitor the health of the drives in your system. The default configuration is not that great, so I did some research and found a good, basic config.

In Devuan (Debian) systems, the configuration is stored in /etc/smart.conf. A very well documented configuration file, it actually only has one directive which tells the SMART daemon to scan for all drives (DEVSCAN). I tend to move that out of the way, then create my own.

Here is the basic template for the file. Note that you need one line like this for each device, as far as I can tell, so if you have two drives (sda and sdb), you'd have two lines where the only difference would be sda would become sdb.

/dev/sda -H -l error -l selftest -S on -s (L/../.././06|S/../.././18) -m root -M test

According to https://edafe.de/2024/01/monitoring-storage-devices-with-smartmontools-on-debian-or-ubuntu/ (where I stole this)

The URL above is much better, goes into more detail, and shows you how to scan for all drives, determine which have SMART capabilities, etc…