Skip to contentSkip to conversation

Hotplug support in Linux software raid?

DISCUSSION Mike Snitzer 2 participants 2 messages Jan 5, 2004

lore
Share & tools
lore
#0 lore raw

I have a need to be notified when the kernel changes the state of storage that is managed by Linux MD. Is using hotplug in linux's md a reasonable way to achieve asynchronous notification of raid state changes?

An example use would be when an available spare disk of a md array is made live by the kernel after a failed disk in the array is marked faulty. So maybe 2 events are triggered: 1) spare disk<foo> is now live 2) failed disk<bar> is now marked faulty. This causes the kernel to issue hotplug events to the userspace /sbin/hotplug which in turn triggers a configurable action to be taken in userspace.

Ultimately I could use mdadm's monitor functionality to recieve notification but this is _not_ ideal in that it polls on a specified interval.

I'd appreciate any insight/suggestions.
Thanks.

Signature · 14 lines
Mike Snitzer                           [email protected]
Linux Networx                          http://www.lnxi.com 



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
#1 lore raw
Quoted 3 lines · Mike Snitzer

I have a need to be notified when the kernel changes the state of storage that is managed by Linux MD. Is using hotplug in linux's md a reasonable way to achieve asynchronous notification of raid state changes?

Yes it is. Or something like the current dbus kernel patch that is in the Red Hat 2.6 Fedora development kernel (which I think provides md notifications.) Either way would be acceptable.

thanks,

greg k-h

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel