Mailing List Archive

silo and root on raid1
Installed Gentoo-2004.3 on sparc Blade 1000.
All works like a charm, until I started configuring software raid:

the SILO loader seems to have problems installing when running / on
raid1:

This is what I did:

* Installed Gentoo on sda1 (/), sda2 (swap), sda4 (/var)
* Kernel including md and raid1 support (using genkernel --menuconfig)
* Then partitioned sdb exactly as sda, partition types: fd
* mdadm --create /dev/md[0,1,2] --level=1 --raid-devices=2 /dev/sdb
[1,2,4] missing
* Created swap on /dev/md1, ext3 on md0 and md2
* cp -ax / /mnt/tmp/md0 && cp -ax /var/* /mnt/tmp/md2
* added image: kernel boot initrd real_root=/dev/md0 and run silo
* modified md0:/etc/fstab to use md-devices
* reboot: OK,
* change partition type of sda[1,2,4] to fd
* mdadm /dev/md[0,1,2] -a /dev/sda[1,2,4]
* raid1 arrays rebuild OK
* edit /etc/silo.conf and removed original image entry booting
from /dev/sda1
* rerun silo
* reboot: SILO load failed: memory alignment error...

Any ideas or experiences?

Lieven
--
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Lieven Van Acker e-mail: Lieven.VanAcker@UGent.be
Directie ICT, Afdeling Infrastructuur
Groep Systemen tel: +32 9 264 4732
Universiteit Gent fax: +32 9 264 4994
Krijgslaan 281, gebouw S9, 9000 Gent, Belgie www.UGent.be
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --


--
gentoo-sparc@gentoo.org mailing list
Re: silo and root on raid1 [ In reply to ]
i tried doing this for hours but could never get it to work.

these links seem to have some good info(and/or links to info)
http://www.ultralinux.org/faq.html#q_5_40
http://forums.gentoo.org/viewtopic-t-8813-highlight-raid.html
found this link just now i may go over it more thoroughly here shortly
http://forums.gentoo.org/viewtopic-t-304150-highlight-raid.html

what i found is the community is solidly divided on this. half will say it
is impossible and be adamant about that. others will say they did it but
are not truly booting off the raid they boot one side of the mirror and do
some unmounting and re mounting to get it to work. then there are a few
that swear they have done the true boot off the raid but can't seem to
explain how, whether it be they are not at the box or it was an old box
they dont have anymore or they will give you one line of a setting to add
to silo.conf and say that should do it. i tried for weeks in chat rooms
and forums to get a complete answer but was never able to get it to boot
off the raid.
right now i periodically copy sda to sdb, i know its a sad way to do it
but thats what i got.

if others have a working version can we pleeeeaaase have a complete answer
of how to do it?

thanks,
pilage




On Thu, 10 Mar 2005 21:03:17 +0100, Lieven Van Acker
<Lieven.VanAcker@UGent.be> wrote:

> Installed Gentoo-2004.3 on sparc Blade 1000.
> All works like a charm, until I started configuring software raid:
>
> the SILO loader seems to have problems installing when running / on
> raid1:
>
> This is what I did:
>
> * Installed Gentoo on sda1 (/), sda2 (swap), sda4 (/var)
> * Kernel including md and raid1 support (using genkernel --menuconfig)
> * Then partitioned sdb exactly as sda, partition types: fd
> * mdadm --create /dev/md[0,1,2] --level=1 --raid-devices=2 /dev/sdb
> [1,2,4] missing
> * Created swap on /dev/md1, ext3 on md0 and md2
> * cp -ax / /mnt/tmp/md0 && cp -ax /var/* /mnt/tmp/md2
> * added image: kernel boot initrd real_root=/dev/md0 and run silo
> * modified md0:/etc/fstab to use md-devices
> * reboot: OK,
> * change partition type of sda[1,2,4] to fd
> * mdadm /dev/md[0,1,2] -a /dev/sda[1,2,4]
> * raid1 arrays rebuild OK
> * edit /etc/silo.conf and removed original image entry booting
> from /dev/sda1
> * rerun silo
> * reboot: SILO load failed: memory alignment error...
>
> Any ideas or experiences?
>
> Lieven



--
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/


--
gentoo-sparc@gentoo.org mailing list
Re: silo and root on raid1 [ In reply to ]
On Thu, 10 Mar 2005 15:27:44 -0600
Pilage <pilage@drizzt.com> wrote:

> if others have a working version can we pleeeeaaase have a complete answer
> of how to do it?

SILO simply has zero knowledge about RAID, so simply place your
/boot on a non-raided partition.

Hacking it into working in these various cheesy ways is nothing
more than a waste of time and asking for trouble and at worst
a non-bootable system.

--
gentoo-sparc@gentoo.org mailing list
Re: silo and root on raid1 [ In reply to ]
Isn't bootin from a RAID1 partition the same as booting from a RAID0
partition? Both use /dev/md0 (or any other /dev/md*).

I haven't used my U60 in a while, but if I remember correctly it boots from
/dev/md0 perfectly.
Why I have a RAID0 for /boot is beyond me atm, but it seems to work.
If I am not too tired tonight I will have a look at it.


> On Thu, 10 Mar 2005 15:27:44 -0600
> Pilage <pilage@drizzt.com> wrote:
>
> > if others have a working version can we pleeeeaaase have a complete
> answer
> > of how to do it?
>
> SILO simply has zero knowledge about RAID, so simply place your
> /boot on a non-raided partition.
>
> Hacking it into working in these various cheesy ways is nothing
> more than a waste of time and asking for trouble and at worst
> a non-bootable system.
>
> --
> gentoo-sparc@gentoo.org mailing list
>

--
DSL Komplett von GMX +++ Supergünstig und stressfrei einsteigen!
AKTION "Kein Einrichtungspreis" nutzen: http://www.gmx.net/de/go/dsl

--
gentoo-sparc@gentoo.org mailing list
Re: silo and root on raid1 [ In reply to ]
Problem seems to be in writing the loaders to the device
containing /boot. If that is a raid device, silo incorrectly installs
the loaders, I suppose. So upon installing silo, /boot should be on a
simple device. That is the conclusion from several tests I did.

Lieven



Op vr, 11-03-2005 te 09:37 +0100, schreef freshy98:
> Isn't bootin from a RAID1 partition the same as booting from a RAID0
> partition? Both use /dev/md0 (or any other /dev/md*).
>
> I haven't used my U60 in a while, but if I remember correctly it boots from
> /dev/md0 perfectly.
> Why I have a RAID0 for /boot is beyond me atm, but it seems to work.
> If I am not too tired tonight I will have a look at it.
>
>
> > On Thu, 10 Mar 2005 15:27:44 -0600
> > Pilage <pilage@drizzt.com> wrote:
> >
> > > if others have a working version can we pleeeeaaase have a complete
> > answer
> > > of how to do it?
> >
> > SILO simply has zero knowledge about RAID, so simply place your
> > /boot on a non-raided partition.
> >
> > Hacking it into working in these various cheesy ways is nothing
> > more than a waste of time and asking for trouble and at worst
> > a non-bootable system.
> >
> > --
> > gentoo-sparc@gentoo.org mailing list
> >
>
--
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Lieven Van Acker e-mail: Lieven.VanAcker@UGent.be
Directie ICT, Afdeling Infrastructuur
Groep Systemen tel: +32 9 264 4732
Universiteit Gent fax: +32 9 264 4994
Krijgslaan 281, gebouw S9, 9000 Gent, Belgie www.UGent.be
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --


--
gentoo-sparc@gentoo.org mailing list
Re: silo and root on raid1 [ In reply to ]
Well, it all works fine for me with raid0 on root and raid1 on boot.
I'm using kernel-2.4 on sparc32. I know you have to jump through a ton
of hoops on 2.2, but 2.4 and 2.6 are fairly painless:

1) Make sure the hard drive partitions are type 'fd' in fdisk. This
tells the kernel to look for the raid superblock and construct the raid
at boot (instead of waiting for raidstart or mdadm to be called).

2) construct the raid using mdadm or raidtools. If you did this before
setting the partition type, it's safe to change the partition type after
the raid is constructed. Additionally, make sure you tell mdadm or
raidtools to create an md superblock on the array.

Here's my silo.conf:
---
partition = 1
root = /dev/md1 # This is raid0
timeout = 20

image = /boot/kernel
label = linux
image = /boot/image-2.4.21-smp
label = linux-2.4.21-smp
image = /boot/image-2.4.25-smp
label = linux-2.4.25-smp
image = /boot/image-2.4.29-sparc
label = linux-2.4.29-sparc-smp
---



On Thu, 2005-03-10 at 15:27 -0600, Pilage wrote:
> i tried doing this for hours but could never get it to work.
>
> these links seem to have some good info(and/or links to info)
> http://www.ultralinux.org/faq.html#q_5_40
> http://forums.gentoo.org/viewtopic-t-8813-highlight-raid.html
> found this link just now i may go over it more thoroughly here shortly
> http://forums.gentoo.org/viewtopic-t-304150-highlight-raid.html
>
> what i found is the community is solidly divided on this. half will say it
> is impossible and be adamant about that. others will say they did it but
> are not truly booting off the raid they boot one side of the mirror and do
> some unmounting and re mounting to get it to work. then there are a few
> that swear they have done the true boot off the raid but can't seem to
> explain how, whether it be they are not at the box or it was an old box
> they dont have anymore or they will give you one line of a setting to add
> to silo.conf and say that should do it. i tried for weeks in chat rooms
> and forums to get a complete answer but was never able to get it to boot
> off the raid.
> right now i periodically copy sda to sdb, i know its a sad way to do it
> but thats what i got.
>
> if others have a working version can we pleeeeaaase have a complete answer
> of how to do it?
>
> thanks,
> pilage
>
>
>
>
> On Thu, 10 Mar 2005 21:03:17 +0100, Lieven Van Acker
> <Lieven.VanAcker@UGent.be> wrote:
>
> > Installed Gentoo-2004.3 on sparc Blade 1000.
> > All works like a charm, until I started configuring software raid:
> >
> > the SILO loader seems to have problems installing when running / on
> > raid1:
> >
> > This is what I did:
> >
> > * Installed Gentoo on sda1 (/), sda2 (swap), sda4 (/var)
> > * Kernel including md and raid1 support (using genkernel --menuconfig)
> > * Then partitioned sdb exactly as sda, partition types: fd
> > * mdadm --create /dev/md[0,1,2] --level=1 --raid-devices=2 /dev/sdb
> > [1,2,4] missing
> > * Created swap on /dev/md1, ext3 on md0 and md2
> > * cp -ax / /mnt/tmp/md0 && cp -ax /var/* /mnt/tmp/md2
> > * added image: kernel boot initrd real_root=/dev/md0 and run silo
> > * modified md0:/etc/fstab to use md-devices
> > * reboot: OK,
> > * change partition type of sda[1,2,4] to fd
> > * mdadm /dev/md[0,1,2] -a /dev/sda[1,2,4]
> > * raid1 arrays rebuild OK
> > * edit /etc/silo.conf and removed original image entry booting
> > from /dev/sda1
> > * rerun silo
> > * reboot: SILO load failed: memory alignment error...
> >
> > Any ideas or experiences?
> >
> > Lieven
>
>
Re: silo and root on raid1 [ In reply to ]
In case anyone's curious, here's it working... It requires no initrd
because it's detected/started by the kernel (because partition type is
0xfd and it has an md superblock).

silo-1.4.8

~ $ df | grep md
/dev/md1 4057280 1211992 2639184 32% /
/dev/md0 15367 10716 3858 74% /boot

~ $ cat /proc/mdstat
Personalities : [raid0] [raid1]
read_ahead 1024 sectors
md0 : active raid1 scsi/host0/bus0/target3/lun0/part1[1]
scsi/host0/bus0/target1/lun0/part1[0]
15872 blocks [2/2] [UU]

md1 : active raid0 scsi/host0/bus0/target3/lun0/part2[1]
scsi/host0/bus0/target1/lun0/part2[0]
4122112 blocks 8k chunks

unused devices: <none>

~ $ uname -a
Linux tifa 2.4.21-smp #5 SMP Tue Mar 15 08:04:40 Local time zone must be
set--see zic sparc sun4m ROSS HyperSparc RT625 or RT626 GNU/Linux
Re: silo and root on raid1 [ In reply to ]
thanks for the info Jeremy.

my sparc/gentoo box is currently my main webserver so it may not be right
away before i try this out but i will certainly put it on my list.

Thanks again

Pilage


On Fri, 18 Mar 2005 11:35:42 -0800, Jeremy Huddleston
<eradicator@gentoo.org> wrote:

> In case anyone's curious, here's it working... It requires no initrd
> because it's detected/started by the kernel (because partition type is
> 0xfd and it has an md superblock).
>
> silo-1.4.8
>
> ~ $ df | grep md
> /dev/md1 4057280 1211992 2639184 32% /
> /dev/md0 15367 10716 3858 74% /boot
>
> ~ $ cat /proc/mdstat
> Personalities : [raid0] [raid1]
> read_ahead 1024 sectors
> md0 : active raid1 scsi/host0/bus0/target3/lun0/part1[1]
> scsi/host0/bus0/target1/lun0/part1[0]
> 15872 blocks [2/2] [UU]
> md1 : active raid0 scsi/host0/bus0/target3/lun0/part2[1]
> scsi/host0/bus0/target1/lun0/part2[0]
> 4122112 blocks 8k chunks
> unused devices: <none>
>
> ~ $ uname -a
> Linux tifa 2.4.21-smp #5 SMP Tue Mar 15 08:04:40 Local time zone must be
> set--see zic sparc sun4m ROSS HyperSparc RT625 or RT626 GNU/Linux



--
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/


--
gentoo-sparc@gentoo.org mailing list