How to get smartd to ignore an HDD

external-hddsmartsmartctl

I have an external HDD which does not report SMART information properly (it gives nonsense results).

As such, the smartd daemon (part of smartmontools) keeps giving false alarms on how the device might be failing.

In /etc/smartmontools/smartd.conf (I'm using the default, here) I see a bunch of options but none that relate to my need (ignoring the alarms for a specific hard drive – I would like to be able to refer to it e.g. by USB ID, since the entry in /dev will vary if I have more devices connected).

I could edit /usr/libexec/smartmontools/smartdnotify (the script that smartd calls when an event happens) and manually force it to shut up about that specific device, but I'd like to know if there's a less ugly way to do that.

How to get smartd to not report any warnings for a specific HDD? I would not like to disable the daemon; I would like it to just not care about this specific HDD.

Best Answer

You need to comment out the DEVICESCAN line, and put in lines for individual devices. Mine, for example, looks like this:

/dev/sda -d removable -n standby,8 -S on -o on -a \
         -m root -M exec /usr/share/smartmontools/smartd-runner \
         -r 194 -R 5 -R 183 -R 187 -s L/../../6/01
/dev/sdb -d removable -n standby,8 -S on -o on -a \
         -m root -M exec /usr/share/smartmontools/smartd-runner \
         -r 194 -R 5 -R 183 -R 187 -s L/../../6/06
/dev/sdc -d removable -n standby,8 -S on -o on -a \
         -m root -M exec /usr/share/smartmontools/smartd-runner \
         -r 194 -R 5 -R 183 -R 187 -s L/../../7/01
/dev/sdd -d removable -n standby,8 -S on -o on -a \
         -m root -M exec /usr/share/smartmontools/smartd-runner \
         -r 194 -R 5 -R 183 -R 187 -s L/../../7/06
/dev/sde -d removable -n standby,8 -S on -o on -a \
         -m root -M exec /usr/share/smartmontools/smartd-runner \
         -r 194 -R 5 -R 183 -R 187 -s L/../../6/01

You can refer to individual devices in any convenient way; for example, instead of /dev/sda I could use /dev/disk/by-id/wwn-0x5000c5001fc90b93, which will track that same disk no matter how its connected.

Related Question