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

Bug#286276: kernel-image-2.6.8-9-amd64-k8: Unable to mount md devices



On Wed, Dec 22, 2004 at 03:39:32PM +0900, Horms wrote:
> I took a breif look at initrd and for reference have included
> how it handles mdadm below. I think that the important bit
> is that it passes not only the md device but its component
> devices to mdadm -A (--assemble). It seems to me that as your
> invocation does not do that, it is going into a code path
> in mdadm that has a bug in it and thus segfaults. In a nutshell,
> I don't think it is a kernel problem.

Adding the UUID to the mdadm command line allows MD to assemble the
raid.  So, that answers the question "why doesn't mdadm assembled once
the machine is booted."  

Now, the question is this: with the md and raid modules added to the
initrd, why doesn't initrd find and start the raid array?

> 
> -- 
> Horms
> 
> getraid_mdadm() {
>         mdadm=$(mdadm -D "$device") || {
>                 echo "$PROG: mdadm -D $device failed" >&2
>                 exit 1
>         }
>         eval "$(
>                 echo "$mdadm" | awk '
>                         $1 == "Raid" && $2 == "Level" { print "echo " $4; next }
>                         $1 == "Number" && $2 == "Major" { start = 1; next }
>                         $1 == "UUID" { print "uuid=" $3; start = 0; next }
>                         !start { next }
>                         $2 == 0 && $3 == 0 { next }
>                         { devices = devices " " $NF }
>                         END { print "devices='\''" devices "'\''" }
>                 '
>         )"
> 
>         printf '%s\n' $devices > getroot
>         echo mdadm -A /devfs/md/$minor -R -u $uuid $devices \
>                 > md$minor-script
>         echo /sbin/mdadm >&6
> }



Reply to: