Thread (13 messages) 13 messages, 5 authors, 2004-02-11

Re: ATARAID userspace configuration tool

From: Kevin P. Fleming <hidden>
Date: 2004-02-10 18:26:53
Also in: lkml

Christophe Saout wrote:
I have a really bad idea :)

Try to combine it with udev. udev calls the ide script, the ide script
then calls the ataraid detector. If the device is non-ataraid, go on as
usual. If it is, build the device-mapper device and symlink (if it
doesn't already exist) and tell udev to not create anything.
This is not a bad idea, it's the future. The hotplug mechanism is 
exactly what should be used here. When a block-device hotplug ADD event 
occurs, you look at that device to see if it's something you care about. 
If not, just exit and leave it alone.

Now in the ATARAID case, where you need to see multiple devices before 
you can do anything with them, this means you'd need to keep some 
"state" somewhere about the devices you've seen so far, and the partial 
ATARAID devices they represent. When you get the hotplug event for the 
last piece of a particular ATARAID device, you use DM/MD to set up the 
device and make it available.

The wonderful part of this is, when you do that last step, _another_ 
block-device hotplug ADD event occurs for the new device you just 
created, and if the hotplug scripts are set up to run dmpartx or its 
equivalent for new block-devices, you are done. The partition tables 
_inside_ the ATARAID device will be read, more DM calls will be made to 
make those sub-devices available to userspace and everyone is thrilled 
about the elegance of the solution :-)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help