[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

udev, MD, and stripes of mirrors

I have several MD devices I created under 3AS with the following

    mdadm --create /dev/md0 --level=mirror --raid-devices=2 /dev/sd{b,h}1
    mdadm --create /dev/md1 --level=mirror --raid-devices=2 /dev/sd{c,i}1
    mdadm --create /dev/md2 --level=mirror --raid-devices=2 /dev/sd{d,j}1
    mdadm --create /dev/md3 --level=mirror --raid-devices=2 /dev/sd{e,k}1
    mdadm --create /dev/md4 --level=mirror --raid-devices=2 /dev/sd{f,l}1
    mdadm --create /dev/md5 --chunk=256 --level=stripe --raid-devices=5 /dev/md{0,1,2,3,4}

>From pestering the linux-raid mailing list, I learned that "stacked"
MD devices (a MD device that has another MD device as a subcomponent)
weren't properly supported by the 2.4 kernel, although there were some
hacks present so that the most useful case (a stripe of mirrors) would
mostly work.

At any rate, the only oddity I noticed was that nash wouldn't
autodetect/autostart md5; I had to hack /etc/rc.d/rc.sysinit to
manually run "mdadm -A -s".

But now with 3.95AS and udev, I have a chicken-and-egg problem: md5
doesn't show up in /sys/block until it's actually assembled, so udev
doesn't create /dev/md5.  But without /dev/md5 present, mdadm fails:

    $ mdadm -A -s
    mdadm: error opening /dev/md5: No such file or directory

For now, I'm working around this by putting md5 in /etc/udev/devices,
which seems to work so far, but smells like a hack to me.

Is there some better solution to this?  Or is it still the case that
stacked MD devices aren't fully supported (even in the 2.6 kernel),
and I'm encountering the fallout from that?

James Ralston, Information Technology
Software Engineering Institute
Carnegie Mellon University, Pittsburgh, PA, USA

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]