[snip]


>  >
>>  Why not just make /boot RAID-1 with 3 disks?  I don't know anything
>>  about grub mind you, so that might not be feasible, but if I was using
>>  Lilo that's how I'd do it.
>
>
>That sounds like an idea - I hadn't thought about it. I'm not stuck on using
>grub either - I'll switch over to lilo in a second if that's what I need to
>do.
>
>I just was wondering if there was a way to write MBR information onto
>another drive. Sort of like:
>
>/sbin/lilo config=/etc/lilo-hde.conf device=/dev/hde
>/sbin/lilo config=/etc/lilo-hdg.conf device=/dev/hdg
>
>Does there exist a way to do this sort of thing or am I dreaming?
>
>Even though I've used Linux for about 3.5 years, my background is NOT in PC
>hardware at all so I've never really had to deal with this sort of stuff
>before. I'm used to a Mac where you can boot off any drive with the System
>on it.
>

[snip]


Well, there comes a time when every macuser has to face the reality 
of computing (I was there once :).  Yes, you can install MBRs on both 
of them.

This is outlined in the boot root raid howto.

This is from a production system.  2.2.17, raid 0.90, ide (for promise card).

The snippets below are an example of a working setup.  My numbers 
will not be the same as your numbers, read the tutorial on why things 
are setup the way they are.

What this does, essentially, is keeps /boot raid1'd, and has two lilo 
config files (one for each disk), which each get written when i run 
/boot/raidlilo.

It tells lilo the geometry of the disk and the sector at which the 
/boot partition starts, so it can find the kernel.

For some reason these disks have identical physical geometry, but 
because one is the bootdrive, I think the bios is doing some geometry 
mucking in the numbers it reports to the OS.  I used the numbers it 
gave me, and it seems to work OK, so i'm not complaining (although 
i'm a bit afraid to yank the first drive and watch it boot from the 
second one, as this is a semi-production server).

It writes an mbr though, and I'm confident that when a drive dies all 
will be alright.  (thank you, open-source software).

PS: don't forget to edit both lilo.conf.* files when you change stuff 
that affects both drives (i.e. a new kernel).

----------------------------------------------------------------------
/dev/md0 on / type ext2 (rw)
/dev/md1 on /boot type ext2 (rw)
/dev/md2 on /backup type ext2 (rw)
----------------------------------------------------------------------
troy:/boot# cat /proc/mdstat
Personalities : [raid1]
read_ahead 1024 sectors
md1 : active raid1 hdg1[0] hde1[1] 48768 blocks [2/2] [UU]
md0 : active raid1 hdg2[0] hde2[1] 4000128 blocks [2/2] [UU]
md2 : active raid1 hdg4[0] hde4[1] 976640 blocks [2/2] [UU]
unused devices: <none>
----------------------------------------------------------------------
troy:/boot# cat lilo.conf.hde
# lilo.conf.hde - primary ide master on promise card
disk=/dev/md0
bios=0x80
sectors=63
heads=255
cylinders=1868
partition=/dev/md1
start=63
boot=/dev/hde
map=/boot/map
install=/boot/boot.b

# boot image
         image=/boot/bzImage
         root=/dev/md0
         read-only
         label=LinuxRaid
----------------------------------------------------------------------
troy:/boot# cat lilo.conf.hdg
# lilo.conf.hdg - secondary ide master on promise card
disk=/dev/md0
bios=0x80
sectors=63
heads=16
cylinders=29777
partition=/dev/md1
start=63
boot=/dev/hdg
map=/boot/map
install=/boot/boot.b

# boot image
         image=/boot/bzImage
         root=/dev/md0
         read-only
         label=LinuxRaid
----------------------------------------------------------------------
troy:/boot# cat raidlilo
#!/bin/sh
echo -en "RAID-wrapper for lilo\n\n"

echo -en "Running lilo for /dev/hde:\n"
/sbin/lilo -v -C /boot/lilo.conf.hde
echo -en "Done with lilo for /dev/hde.\n\n"

echo -en "Running lilo for /dev/hdg:\n"
/sbin/lilo -v -C /boot/lilo.conf.hdg
echo -en "Done with lilo for /dev/hdg.\n\n"
----------------------------------------------------------------------
-- 

--------------------------------------------------
[EMAIL PROTECTED]        -             0xCD91A427
9907 3747 3CE9 11C5 2B1C  F141 D09F 488C CD91 A427
Note: key id 0x299450B6 is lost and inactive.
--------------------------------------------------
Copyright 2000 Jeffrey Paul.
The information contained in this message may be
privileged and confidential and protected from
disclosure.  If the reader of this message is not
the intended recipient, or an employee or agent
responsible for delivering this message to the
intended recipient, you are hereby notified that
any dissemination, distribution or copying of this
communication is strictly prohibited.  Thank you.
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to [EMAIL PROTECTED]

Reply via email to