Opened 15 years ago
Last modified 6 days ago
#60 new enhancement
DEVICESCAN and hotplug
Reported by: | mhlavink | Owned by: | somebody |
---|---|---|---|
Priority: | major | Milestone: | unscheduled |
Component: | smartd | Version: | 5.39.1 |
Keywords: | smartd.conf | Cc: | Nathan Stratton Treadway, onlyjob, Kevin Locke |
Description
Hi,
one our user has complained about behaviour for hot-plugging. Smartd does not handle unplugged and especially plugged devices. Devicescan occurs only during startup or when it receives sighup. Would it be possible to improve this? Desired behaviour is to forget about device, when it's missing and rescan devices for new ones once a while.
Regards,
Michal Hlavinka
Change History (9)
comment:1 by , 15 years ago
comment:2 by , 14 years ago
Keywords: | smartd.conf added |
---|
comment:3 by , 10 years ago
I am seeing the same problem (on Fedora 19), that is, smartd determines the list of devices that it will check shortly after boot, and it does not change that list, regardless of whether some of the devices are removed from the system, or other devices are added to the system.
This is quite annoying, because it means that smartd often produces both false negatives and false positives. As a result, I've written a script that I call from cron to give me SMART reports, and I am strongly considering disabling smartd. It seems to be quite simple to get a list of the disk devices. The code I use is:
DISKS="$( </proc/partitions tail -n +3 |
awk '{ print $4 }' |
grep 'sd[0-9]*$' |
sort -u )"
Of course, that doesn't see the hdX drives. But I expect that smartd has a much better algorithm built in. Why doesn't smartd just run its algorithm before each status check? Naively, it seems like a simple change that would make everyone happy.
comment:4 by , 10 years ago
Milestone: | → unscheduled |
---|
comment:5 by , 7 years ago
comment:6 by , 6 years ago
Cc: | added |
---|
comment:7 by , 5 years ago
Cc: | added |
---|
comment:8 by , 4 years ago
Cc: | added |
---|
On FreeBSD we can assign action for some device-related events. So we can send SIGHUP to smartd when new device arrives (I never tried it by self). There may be a way how to do something like this on your (undisclosed) OS. Such workaround may satisfy your user.