Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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.

share|improve this question
    
What's your config look like? Usually it's the other way around, you have to tell it explicitely which HDDs to monitor, not which ones to ignore... –  frostschutz Jun 27 '13 at 14:48

2 Answers 2

up vote 4 down vote accepted

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.

share|improve this answer
    
This looks like what I need. Thanks! –  Renan Jun 27 '13 at 15:58

-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
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.