Created attachment 935402 [details] /etc/smartmontools/smartd.conf from the system (I have not customized it.) Description of problem: If I boot the system with a USB disk drive attached, smartd discovers that the drive exists and monitors it. But if I later unplug the drive, smartd does not realize that the drive is physically not present, and repeatedly reports that it cannot contact the drive. (I suspect that the reverse error happens as well, that if a drive is later plugged in, smartd will not start monitoring the drive unless smartd is restarted. But I have not verified this.) Version-Release number of selected component (if applicable): smartmontools-6.2-4.fc19.x86_64 Fedora release 19 (Schrödinger’s Cat) Linux hobgoblin.ariadne.com 3.14.17-100.fc19.x86_64 #1 SMP Thu Aug 14 17:17:26 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux /etc/smartmontools/smartd.conf is not customized. How reproducible: Reliably reproducible. Steps to Reproduce: 1. Boot system with a USB disk drive attached. 2. Once the system is running, disconnect the USB disk drive. Actual results: root will receive periodic e-mail messages like: From: root <root> Date: Fri, 05 Sep 2014 09:07:47 -0400 To: root.com Subject: FailedReadSmartData Device: /dev/sdb [USB JMicron], failed to read SMART Attribute Data Messages appear in /var/log/messages like: Sep 7 03:37:45 hobgoblin smartd[631]: Device: /dev/sdb [USB JMicron], open() failed: No such device Expected results: smartd should be aware of what drives are present and test all (and only) drives that are present. This would prevent the messages that are being seen from being generated. (I admit that there is a problem regarding the inaccessibility of drives that the user expects to be accessible, i.e., complete drive failure. But in situations like that, the user usually becomes very aware of the drive failure long before smartd gives a report.) Additional info: I use a script to perform similar SMART monitoring. It uses a simple shell command to get a list of drives every time it runs. The script seems to be quite reliable in regard to this issue: # Use /proc/partitions to find all the disks. DISKS="$( </proc/partitions tail -n +3 | awk '{ print $4 }' | grep '^sd[^0-9]*$' | sort -u )" However, this would need to be enhanced to at least locate hdX drives.
smartmontools does not support hotplug. Upstream request was created some time ago. http://www.smartmontools.org/ticket/60