From: Conor Daly (conor.daly at domain oceanfree.net)
Date: Wed 31 Jul 2002 - 18:33:10 IST
On Tue, Jul 30, 2002 at 03:47:40PM +0100 or so it is rumoured hereabouts,
Niall O Broin thought:
> I'm installing warm standby disks on a number of boxes. These disks will be
> the same size (sometimes bigger) than the main disk. The idea is that every
> night I'll rsync the partitions on the main disk to the standby disk so that
> in the case of disaster, the first port of call, before the tapes, is the
> standby disk. (We did consider running Linux md RAID on the disks but RAID
> gives you no protection against slips of the finger)
> So, in the event of finger slips we can mount the relevant partition and
> retrieve the banjaxed file. In the case of a disk crash, the plan is that
> we'll put the standby disk in place of the main disk and the workstation
> will be back up ASAP. Then we can deal with replacing the disk without the
> pressure of a broken box on our back.
> However, I'm stumped as to how to install LILO on the backup disk. Let's say
> the master disk is /dev/hda and the backup disk is /dev/hdb. lilo.conf
> currently looks like this:
> boot = /dev/hda
> menu-scheme = Wg:kw:Wg:Wg
> timeout = 80
> message = /boot/message
> image = /boot/vmlinuz
> label = linux
> root = /dev/hda3
> vga = 791
> initrd = /boot/initrd
> There are a couple more boot stanzas, but they're not germane. As you can
> see, / is on /dev/hda3 and /boot is on /dev/hda1. So if for instance I had
> booted from a CD and wanted to re-install LILO on this disk I'd do something
> mount /dev/hda3 /mnt
> mount /dev/hda1 /mnt/boot
> lilo -r /mnt
> which is OK because I'm installing lilo on /dev/hda and I want it to boot
> from /dev/hda so it'll plug in all the right numbers.
> However, in the case of the standby disk, I'll have to do something like
> mount /dev/hdb3 /mnt
> mount /dev/hdb1 /mnt/boot
> lilo -r /mnt
> But I'm obviously going to have to do something different here because I
> want to install onto /dev/hdb in such a way that the disk will boot when it
> becomes /dev/hda after a disaster (like the one I had this morning :-( -
> shutting the stable door was on the to-do list, but the bloody horse decided
> to do a bunk early). The machine already has its spare disk - just hadn't
> yet been used :-(
> I thought perhaps I should just do lilo -b /dev/hdb -r /mnt but I think
> that -b is analogous to the boot keyword in lilo.conf. Or will this just
> work automagically ? i.e. boot = /dev/hda tells lilo what numbers to poke
> where, and it figures out where the disk is from the -r ?
from the Hard Disk Upgrade Mini HOWTO :
8. Prepare LILO to boot the new disk
(Thanks to Rick Masters for helping with this.)
We're assuming that LILO is installed on the hard disk's Master Boot
Record (MBR); this seems to be the most common configuration. You want
to install LILO on what's presently the second hard disk but will
become the first hard disk.
Edit the file /new-disk/etc/lilo.conf as follows:
disk=/dev/hdb bios=0x80 # Tell LILO to treat the second
# disk as if it were the first
# disk (BIOS ID 0x80).
boot=/dev/hdb # Install LILO on second hard
map=/new-disk/boot/map # Location of "map file".
install=/new-disk/boot/boot.b # File to copy to hard disk's
# boot sector.
prompt # Have LILO show "LILO boot:"
timeout=50 # Boot default system after 5
# seconds. (Value is in tenths of
image=/new-disk/boot/vmlinuz # Location of Linux kernel. The
# actual name may include a version
# number, for example
label=linux # Label for Linux system.
root=/dev/hda1 # Location of root partition on
# new hard disk. Modify this as
# appropriate for your system.
# Note that you must use the name
# of the future location, once the
# old disk has been removed.
read-only # Mount partition read-only at
# first, to run fsck.
PS. Um, what does
> menu-scheme = Wg:kw:Wg:Wg
-- Conor Daly <conor.daly at domain oceanfree.net> Domestic Sysadmin :-) --------------------- Faenor.cod.ie 6:04pm up 69 days, 3:22, 0 users, load average: 0.00, 0.00, 0.00 Hobbiton.cod.ie 5:50pm up 12 days, 27 min, 1 user, load average: 0.00, 0.00, 0.00
This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:18:08 GMT