How to get smartd to ignore an HDD?
Solution 1
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.
Solution 2
-d ignore
is a new directive which allows ignoring a device from DEVICESCAN.
~$ cat /etc/smartd.conf
#/dev/disk/by-id/scsi-SATA_KingSpec_KDM-44VVS14413121 -d ignore
# frustratingly specifying disk by-id doesn't work so fall-back to ignoring sdb
/dev/sdb -d ignore
DEVICESCAN -a -o on -S on -n standby,q -s (S/../.././02|L/../../6/03) -W 4,40,45 -m root
Related videos on Youtube
Renan
My other presence online: blog Twitter GitHub LinkedIn last.fm
Updated on September 18, 2022Comments
-
Renan over 1 year
I have an external HDD which does not report SMART information properly (it gives nonsense results).
As such, the
smartd
daemon (part ofsmartmontools
) 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 thatsmartd
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. -
Rogach over 3 yearsAs of smartmontools 7, disk by-id works if you add
-d by-id
option to DEVICESCAN (more details here: smartmontools.org/ticket/1390#comment:2)