xfs
[Top] [All Lists]

Re: XFS on md (RAID1) with devfs fixed

To: Russell Cattelan <cattelan@xxxxxxxxxxx>
Subject: Re: XFS on md (RAID1) with devfs fixed
From: Simon Matter <simon.matter@xxxxxxxxxxxxxxxx>
Date: Wed, 09 May 2001 18:16:04 +0200
>received: from mobile.sauter-bc.com (unknown [10.1.6.21]) by basel1.sauter-bc.com (Postfix) with ESMTP id 4536A57306; Wed, 9 May 2001 18:21:44 +0200 (CEST)
Cc: linux-xfs <linux-xfs@xxxxxxxxxxx>
Organization: Sauter AG, Basel
References: <3AF8E3BA.1F2D9397@xxxxxxxxxxxxxxxx> <3AF9617C.37F1F1EE@xxxxxxxxxxx>
Sender: owner-linux-xfs@xxxxxxxxxxx
Sorry, I'm very confused by now. It seems we are going to have some
troubles because of the two different device file types.

Russell Cattelan schrieb:
> 
> Simon Matter wrote:
> 
> > I did an install of XFS/RedHat on two IDE disks configured
> > as RAID 1 the following way:
> >
> > /dev/md0  /
> > /dev/md1  /boot
> > /dev/md2  swap
> >
> > The second thing is that booting the system wasn't possible when
> > the install was finished. Everybody knows now that with
> > devfs=nomount as boot parameter, the system will boot but without
> > devfs. I was wondering what really makes the troubles and I
> > found it in the initrd image. Then I did the following:

Here I just changed the linuxrc script in the initrd. I did not
create a /dev/md/0 in the initrd. In your patch you are trying to
create , why? Why does it work for me anyway? Are you
creating /dev/md/0 as old device file so it will allways exist and
will be overwritten by devfs, if enabled. I'm confused...

> > gunzip the initrd-XXXX.img
> > mount it somewhere as loop
> > edit the bootup script linuxrc:
> > raidautostart /dev/md0 to raidautostart /dev/md/0
> > unmounted initrd, gzipped it

The /dev/md/0 hack is just to let lilo know we have the root device.
Otherwise it won't install the MBR. At the time I did this I was
running with devfs=nomount and therefore /dev/md/0 did not exist.
I couldn't find a way to force lilo to install anyway, am I blind?

> > important step: mkdir /dev/md ; cp -a /dev/md0 /dev/md/0
> > edit /etc/lilo.conf:  root=/dev/md0 to root=/dev/md/0
> > wrote new MBR with lilo
> > rmoved the device with rm -r /dev/md
> > rebooted the system
> 
> good catch...
> You might want to try this patch to mkinitrd
> it should rebuild your initrd correctly.
> Check it before rebooting just to be sure.
> 
> --- mkinitrd~   Fri Mar 23 15:21:08 2001
> +++ mkinitrd    Wed May  9 10:22:14 2001
> @@ -396,8 +396,9 @@
>  fi
> 
>  if [ -n "$startraid" ]; then
> -    cp -a /dev/md0 $MNTIMAGE/dev
> -    echo "raidautorun /dev/md0" >> $RCFILE
> +    mkdir $MNTIMAGE/dev/md

What are you doing here? Since we don't have devfs at this time, we
can't copy /dev/md/0 to the initrd???

> +    cp -a /dev/md/0 $MNTIMAGE/dev/md
> +    echo "raidautorun /dev/md/0" >> $RCFILE
>  fi
> 
>  chmod +x $RCFILE
> 
Maybe linuxrc solution could be easier:

raidautorun /dev/md/0
raidautorun /dev/md0

If we don't have devfs, the first line won't do anything but the
second statement should do the job. I'll try it later, maybe I'm
completely wrong...

-- 
Simon Matter              Tel:  +41 61 695 57 35
Fr.Sauter AG / CIT        Fax:  +41 61 695 53 30
Im Surinam 55
CH-4016 Basel             [mailto:simon.matter@xxxxxxxxxxxxxxxx]



<Prev in Thread] Current Thread [Next in Thread>