RAID-root on AC3

Dave Mason dmason at sarg.ryerson.ca
Mon Jun 13 23:01:30 UTC 2005


I have the following setup:
    /dev/hda1 /dev/hdd1  - /boot non-raid, to be copied every night
    /dev/hda2            - / currently, will be added to /dev/md2 once 
it boots
    /dev/hdd2            - /dev/md2, with a copy of / on it

I can boot fine off the /dev/hda2 disk.  So I made /dev/md2 be a copy 
of it, changing its /etc/fstab to expect /dev/md2 to contain /

But I get an error (similar to below, except I get error 6 mounting 
ext3).  I figured that I needed an initrd that understands raid, so I 
mount --bind /dev and /proc to the mounted /dev/md2, and then do
	chroot /mnt mkinitrd --preload=dm-mod /boot/initrd...raid 2.3...
and then copy the created initrd to the /boot filesystem.

Here's a stripped version of the /init script that initrd makes:
    insmod raid1, jdb, ext3
    /sbin/udevstart
    raidautorun /dev/md2
    mkrootdev /dev/root
    mount --ro -t ext3 /dev/root /sysroot
    switchroot /sysroot
    umount /initrd/dev

..which looks fine, and /dev/md2 is in the initrd as it should be.  
Then I try to start up with an aboot line like:
     /vmlinuz-... initrd=/initrd....raid root=/dev/md2

I see the modules loaded, raid1 personality is registered, autorun 
starts and ends, creates the root device, but when it attempts to mount 
the root filesystem I get:
    EXT3-fs: unable to read superblock
    mount: error 22 mounting ext3
and then, of course, switchroot fails and I get a kernel panic as init 
exits.

It seems pretty close, and I've wasted a ton of time on this... any 
suggestions?

Also I have seen some hints on the list (with much older kernels) that 
/boot can be on a raid too (with md=??? boot options).  I'd love to 
have my /boot be raid too to prevent me getting out of sync some time.

../Dave




More information about the axp-list mailing list