[Bug 308557] New: smartd cannot cope with hot unplug
https://bugzilla.novell.com/show_bug.cgi?id=308557 Summary: smartd cannot cope with hot unplug Product: openSUSE 10.3 Version: Beta 2 Platform: x86-64 OS/Version: openSUSE 10.3 Status: NEW Severity: Major Priority: P5 - None Component: Hotplug AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: oneukum@novell.com QAContact: qa@suse.de Found By: --- smartd gave me the following popup for an unplugged usb flash drive: Your hard disk drive is failing! S.M.A.R.T. message: Device: /dev/sdd, unable to open device Steps to reproduce - boot with usb flash drive plugged in - umount <path> - eject <device> - physically unplug device - wait for smartd to wake up Getting a drive failing message is very rattling for the first few seconds until you understand the cause -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=308557 Andreas Jaeger <aj@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bnc-team-screening@forge.provo.novell.com |sbrabec@novell.com -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=308557#c1 Stanislav Brabec <sbrabec@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO Info Provider| |kasievers@novell.com --- Comment #1 from Stanislav Brabec <sbrabec@novell.com> 2007-09-10 08:10:07 MST --- smartd does not yet support hotplug. It needs to get HUP on each such event. Even then, there will be a race condition, if smartd will check disc before reaching HUP, but it would work in most cases. Kay, what do you advice. Adding a script to udev? And how it should look? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=308557#c2 Kay Sievers <kasievers@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kasievers@novell.com Status|NEEDINFO |NEW Info Provider|kasievers@novell.com | --- Comment #2 from Kay Sievers <kasievers@novell.com> 2007-09-10 16:22:29 MST --- We can not accept any rules that run programs for every block device. I doubt that it makes sense to add udev rules to send out signals for this use case. The daemon itself needs to be fixed to cope with devices that just go away. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=308557#c3 Stanislav Brabec <sbrabec@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO Info Provider| |dkukawka@novell.com --- Comment #3 from Stanislav Brabec <sbrabec@novell.com> 2007-09-12 08:05:44 MST --- Danny, would it be correct solution to create hald-addon-disc, which will HUP the daemon, whenever any new disc device appears? To implement it, is it sufficient to add following files? /usr/share/hal/fdi/information/10freedesktop/10-foo.fdi and to %{_libexecdir}/hal/hald-addon-foo And what would be the optimal solution? Should smartd listen directly to hal events over dbus? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=308557#c4 Danny Kukawka <dkukawka@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dkukawka@novell.com Status|NEEDINFO |NEW Info Provider|dkukawka@novell.com | --- Comment #4 from Danny Kukawka <dkukawka@novell.com> 2007-09-12 11:29:18 MST --- IMO it would subotimal to add a addon to HAL which would send a HUP to smartd for every storage device. IMO smartd should handle this within it's code (doesn't matter for me if via listen to HAL via D-Bus or via any other way like listen to D-Bus or whatever) and not via a HAL addon -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=308557#c5 Stanislav Brabec <sbrabec@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED --- Comment #5 from Stanislav Brabec <sbrabec@novell.com> 2007-11-06 03:54:51 MST --- I see two solutions: 1. Adding -d removable to the init script and adding a simple patch to ingore later open() errors. Easy, prevents ugly warnings, but still no support for hotplug. 2. Use suboptimal solution with hald-addon and some ugly hacks to prevent multiple HUPs. (as optional feature - admins of systems with 1024 physical discs wouldn't be happy even with one single rescanning of all discs after adding new iSCSI volume) 3. Rewrite smartd to support dbus and device add/remove. I am ready to do either 1. or 2. WONTFIX for 3., unless there will be an explicit FATE/L3 request about it. Bruce Allen wrote: Hi Stanislav, smartd has a '-d removable' flag that can be set. This prevents smartd from exiting or issuing significant warnings if the disk is not found on smartd startup. I think there have been patches sent to the support list which extend this directive so that if open() fails then it is not treated as serious. Could you inspect one of those patches and check it into CVS? That would not require any external interaction such as sending HUP from the hotplug monitoring layer. Cheers, Bruce The problem is that DEVICESCAN only triggers one device scan, on smartd start up. There are two cases of interest. Here is how it *should* work in each case: CASE 1: hotplug device present when smartd started. In this case, if open() fails then smartd should skip the device check but not exit or otherwise complain. But smartd should continue to try open() on each polling interval. If open() succeeds then the disk should be checked. CASE 2: hotplug device NOT present when smartd started. In this case, when the device is plugged in, one has to arrange for an external event (HUP) to be sent to smartd so that it scans again. Could you check the patch to be sure that it obeys correctly in CASE 1 above? Cheers, Bruce -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=308557#c6 --- Comment #6 from Oliver Neukum <oneukum@novell.com> 2007-11-06 05:42:36 MST ---
From a strict perspective proposal #1 fixes the bug. The others are enhancements. So I'd favor #1
-- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=308557 User sbrabec@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=308557#c7 Stanislav Brabec <sbrabec@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED --- Comment #7 from Stanislav Brabec <sbrabec@novell.com> 2008-06-03 08:10:01 MDT --- Fixed in Factory using the simplest approach: Do not report errors after disconnecting of removable discs. Future upstream solution may use advanced version of upper mentioned udev script - integration of smartmontools with DeviceKit (as it seems, that hal may be deprecated soon). -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=308557 User sbrabec@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=308557#c9 --- Comment #9 from Stanislav Brabec <sbrabec@novell.com> 2008-06-04 04:19:39 MDT --- The rest of the bug is a minor issue - hotpluggable discs are automatically monitored only if they are present during boot, or if user sends HUP. As there is no hotplug code in smartd yet, it would be probably good to wait for DeviceKit. As an intermediate solution, manual HUP is sufficient (and maybe adding it to init script "reload"). Automatic HUP is not wanted on large systems, as inserting of USB dongle may cause scanning of thousands discs. (But it may be done as an option for small desktop systems.) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com