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

Re: linux software RAID with hot-swap hardware



Russell Coker wrote:

> > > raid-extra-boot="/dev/sda,/dev/sdb"
> > >
> > > According to the documentation of lilo, this shouldn't be necessary,
> > > but apparently either the funcionality or the docs are buggy. Without
> > > that line I couldn't boot at all from the second disk,
> >
> > the way I've tested it also works with
> >
> > install-mbr /dev/md1
>
> Why would you want to use install-mbr on a RAID device?
>
> I use install-mbr for the MBR on the hard drive (/dev/sda and /dev/sdb in
> this case) and then have it load the real boot block from /dev/md1 which
> was created by LILO.

In my experience a lilo.conf such as this works:

    map=/boot/map
    install=/boot/boot.b
    boot=/dev/md1
    timeout=50
    prompt
    default=Linux

    image=/boot/vmlinuz-2.4.18-19.7.x
            label=Linux
            root=/dev/md4
            initrd=/boot/initrd-2.4.18-19.7.x.img
            read-only

Simply run lilo thereafter, you will see that it automatically installs boot 
sectors in both drives.  Like this:

    boot = /dev/hda, map = /boot/map.0301
    Added Linux *
    boot = /dev/hdc, map = /boot/map.1601
    Added Linux *

The above is from a Redhat 7.3 system but this worked back in Redhat 6.2, I 
have also done this with a sid system within the past month.

In the above case /dev/md1 is a 24MB partition mounted as /boot, consisting of 
/dev/hda1 and /dev/hdb1.  Since lilo is supposed to get past the 1024 
cylinder limit these days that is probably not relevant.

In testing I was able to boot with hda only (that one's obvious), I was able 
to boot with hdc only (both directly using BIOS and using lilo installed on 
floppy).

I'm 90% sure that I physically moved hdc so that it became hda and was able to 
boot perfectly but it was getting late and I lost track of what I was 
testing.

All partition types are set to RAID Autodetect (FD), I believe that may be 
important.

Fraser



Reply to: