does udev support sw raid0?
Hello list,
I'm trying to setup my box to use udev but I'm stuck.
My /home partition is on a software raid0. Using devfs, I have no problems. I can "mount /dev/md/0 /home" and I'm done, but udev seems to ignore raid0 completely. md and raid0 modules are loaded but there're no md/raid devices on /dev.
So what's the problem here? Does udev support sw raid0 devices? Or the other way around, does sw raid0 support udev?
Many thanks in advance,
Norberto
Quoted 8 lines · Norberto Bensa
Hello list,
I'm trying to setup my box to use udev but I'm stuck.
My /home partition is on a software raid0. Using devfs, I have no problems. I can "mount
/dev/md/0/home" and I'm done, but udev seems to ignore raid0 completely. md and raid0 modules are loaded but there're no md/raid devices on /dev.
Do your md raid devices show up in /sys/block? If so, then udev should support them. If not, then udev will not.
thanks,
greg k-h
Quoted 2 lines · Greg KH
Do your md raid devices show up in
/sys/block? If so, then udev should support them. If not, then udev will not.
md has the chicken-egg problem of having to issue an ioctl on the md device to register a gendisk.
Quoted 6 lines · Christoph Hellwig
Quoted 2 lines · Greg KH
Do your md raid devices show up in
/sys/block? If so, then udev should support them. If not, then udev will not.md has the chicken-egg problem of having to issue an ioctl on the md device to register a gendisk.
Ick.
How did this work with devfs then? The device node would not be present before the ioctl needed to be called, right? Or did it do the "magic lookup" mess and just "know" about md devices?
thanks,
greg k-h
Quoted 3 lines · Greg KH
How did this work with devfs then? The device node would not be present before the ioctl needed to be called, right? Or did it do the "magic lookup" mess and just "know" about md devices?
md uses blk_register_region to get a callback for it's dev_t region without a registered gendisk, and also creates devfs entries before the gendisk is registered. It's a single big mess.
Quoted 3 lines · Greg KH
How did this work with devfs then? The device node would not be present before the ioctl needed to be called, right? Or did it do the "magic lookup" mess and just "know" about md devices?
Right, see my recent thread on linux-hotplug-devel about this very subject.
As it stands today, the only gendisk that md registers without being asked to do so is md0, so /dev/md0 will always be present on a udev-enabled system with md. If you have auto-start MD arrays on your system, then those will be registered as well when md autostarts them at kernel boot time.
All other arrays (those that you want to start using mdadm, or those that you want to create because they've never existing before) suffer from the problem of requiring a device node before they can be controlled.
I chatted with Neil Brown about this, and he would not be opposed to the md driver exposing a character device specifically for the purpose of handling the md ioctls (like dm does), but when I looked more into it it seemed to be a waste of effort; the time could be better spent porting the md personalities over to dm, where all this stuff already works properly and there is naming/splitting/partitioning/etc. available.
Quoted 2 lines · Christoph Hellwig
md has the chicken-egg problem of having to issue an ioctl on the md device to register a gendisk.
So do I need to do something special?
Thanks,
Norberto
Quoted 4 lines · Greg KH
Quoted 1 line · Norberto Bensa
I'm trying to setup my box to use udev but I'm stuck.
Do your md raid devices show up in
/sys/block? If so, then udev should support them. If not, then udev will not.
No if I boot with devfs=nomount. Yes otherwise.
Regards,
Norberto