Opened 10 years ago

Last modified 5 weeks 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

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 (7)

comment:1 Changed 10 years ago by Dan Lukes

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.

comment:2 Changed 9 years ago by Gabriele Pohl

Keywords: smartd.conf added

comment:3 Changed 5 years ago by Dale Worley

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 Changed 5 years ago by Christian Franke

Milestone: unscheduled

comment:5 Changed 20 months ago by Christian Franke

Tickets #218 and #1014 have been marked as duplicates of this ticket. See also #1016.

comment:6 Changed 13 months ago by Nathan Stratton Treadway

Cc: Nathan Stratton Treadway added

comment:7 Changed 5 weeks ago by onlyjob

Cc: onlyjob added
Note: See TracTickets for help on using tickets.