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

Re: xen, raid and initramfs failure



On Tue, Jul 10, 2007 at 08:40:46AM +0200, martin f krafft wrote:
> also sprach martin f krafft <madduck@debian.org> [2007.07.10.0834 +0200]:
> > Can I please see your mdadm.conf file and the generated initramfs?
> > Please put them somewhere where I can download them instead of
> > attaching them to an email. If it turns out to be what I think it
> > is, it should be a trivial bug to fix.
> 
> Try the following patch agaist
> /usr/share/initramfs-tools/hooks/mdadm. It ensures that RAID levels
> include the word 'raid'. I think your mdadm.conf may say stuff like
> level=5, when it should say level=raid5 or not specify level= at
> all.
> 
> Index: hook
> ===================================================================
> --- hook        (revision 351)
> +++ hook        (working copy)
> @@ -198,7 +198,7 @@
>        [ -n "${dev:-}" ] || continue
>        echo -n "${dev}:"
>        if [ -n "${level:-}" ]; then
> -        echo -n "$level"
> +        echo -n "raid${level#raid}"
>        else
>          echo -n "$($MDADM --detail $dev | sed -rne 's,[[:space:]]+Raid Level : ,,p')"
>        fi

patch works. here is set -x output from a domU boot with new initramfs


Begin: Running /scripts/local-top ...
+ PREREQ=udev_helper
+ prereqs
+ echo udev_helper
+ exit 0
+ PREREQ=udev_helper
+ . /scripts/functions
+ [ -e /scripts/local-top/md ]
+ MDADM=/sbin/mdadm
+ [ -x /sbin/mdadm ]
+ MD_DEVS=all
+ MD_MODULES=linear multipath raid0 raid1 raid456 raid5 raid6 raid10

once again, MD_MODULES as set in /scripts/local-top/mdadm ...

+ [ -s /conf/md.conf ]
+ . /conf/md.conf
+ MD_HOMEHOST=bigmomma
+ MD_DEVPAIRS=/dev/md1:raid5 /dev/md0:raid1 /dev/md11:raid1
/dev/md12:raid1 /dev/md10:raid0 /dev/md2:raid5
+ MD_LEVELS=raid5 raid1 raid1 raid1 raid0 raid5
+ MD_DEVS=all
+ MD_MODULES=raid0 raid1 raid456

... and there it is reset by sourcing md.conf, but md.conf has been
fixed by your patch. nice. 

+ verbose
+ return 0
+ log_begin_msg Loading MD modules
+ [ -x /sbin/usplash_write ]
+ _log_msg Begin: Loading MD modules ...
+ [ n = y ]
+ echo Begin: Loading MD modules ...
Begin: Loading MD modules ...
+ modprobe --syslog -v raid0
insmod /lib/modules/2.6.18-3-xen-686/kernel/drivers/md/md-mod.ko
md: md driver 0.90.3 MAX_MD_DEVS=256, MD_SB_DISKS=27
md: bitmap version 4.39
insmod /lib/modules/2.6.18-3-xen-686/kernel/drivers/md/raid0.ko
md: raid0 personality registered for level 0
+ verbose
+ return 0
+ log_success_msg loaded module raid0.
+ _log_msg Success: loaded module raid0.
+ [ n = y ]
+ echo Success: loaded module raid0.
Success: loaded module raid0.


... weeee....

[ snip successful loading of raid1 and raid456 ]

+ log_begin_msg Assembling all MD arrays
+ [ -x /sbin/usplash_write ]
+ _log_msg Begin: Assembling all MD arrays ...
+ [ n = y ]
+ echo Begin: Assembling all MD arrays ...
Begin: Assembling all MD arrays ...
+ extra_args=
+ [ -n bigmomma ]
+ extra_args=--homehost='bigmomma' --auto-update-homehost
+ /sbin/mdadm --assemble --scan --run --auto=yes --homehost='bigmomma'
--auto-update-homehost
mdadm: No devices listed in conf file were found.
+ log_failure_msg failed to assemble all arrays.
+ _log_msg Failure: failed to assemble all arrays.
+ [ n = y ]
+ echo Failure: failed to assemble all arrays.
Failure: failed to assemble all arrays.

this failure is appropriate as this domU doesn't have access to the
raid arrays.

I'm off now to fix my mdadm.conf and undo my script hackery...

thanks martin

A

Attachment: signature.asc
Description: Digital signature


Reply to: