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

Re: Woody+initrd+raid1+boot = :-(



+ Eduard Bloch <edi@gmx.de> [19.06.02 10:57]:
> The current md driver is broken-by-design in the autodetection issue.
> You have to compile the driver into the kernel and mark the partition as
> type 0xFD to make it autodetecteable. When using modules, you will be
> forced to reconstruct the array from a userspace utility. I suggest, you
> install mdadm, add mdadm to /etc/mkinitrd/exe, then edit
> 
> /usr/share/initrd-tools/linuxrc
> 
> and add something like
> 
> /sbin/mdadm -R -A /dev/md0 /dev/hdx /dev/hdy

this has to be "-A -R", if not I got a message "mdadm: not allowed, mode
already set to manage"

> in the first lines. There should be an easier way of modifying the
> start-script of initrd, I am just writting a wishlist bugreport about
> that.

I've tried this and also wrote a script /etc/mkinitrd/scripts/mdadm
that is run by mkinitrd before the final image is created. It creates 
a script "/scripts/mdadm.sh" in initrd that gets started by linuxrc
after all modules and stuff were loaded:

#!/bin/sh
# This script creates an executable file in $INITRDDIR/scripts that
# is to be run after the initrd started and the modules were loaded.
#
# It is supposed to start a failed array, which is needed to boot
# from a mirrored raid-partition using modules if raid-disk 0 fails
#
cat > $INITRDDIR/scripts/mdadm.sh << "EOF"
#!/bin/sh
echo "Running mdadm to start array:"
/sbin/mdadm -A -R /dev/md1 /dev/hdc3 /dev/hda3
EOF
chmod ugo+rx $INITRDDIR/scripts/mdadm.sh


However both solutions did not work either way. If the raid1-module gets
started and starts the md1-device, I got
        mdadm: device already active, cannot assemble it
which is not nice, but does not confuse me - as long as it's only a
warning and the raid got configured before

If /dev/hdc got "broken" I get 
        mdadm: cannot open device /dev/hdc3: No such device or address
        mdadm: /dev/hdc3 has no superblock - assembly aborted

I don't know mdadm yet that much, but I thought "-R" was supposed to run
the array anyway - which is not.

Guess I finally have to build a kernel manually :-(.

      Balu


-- 
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: