[ale] rsync and link files

hirsch at zapmedia.com hirsch at zapmedia.com
Tue Jan 22 14:43:16 EST 2002


Okay, that is what I thought.  I still think the bios= options are the
key, but here's an ugly way that should work:

The poor man's approach to the bios= option is to put in the backup
disk as sda and boot off of a floppy or CD.  Mount sda and chroot to
it.  Now run lilo.  There should be no need to do the bios= stuff.

--Michael

Michael Still (mikes) writes:
 > Let me explain a little more.  This system is an HP Netserver LPr that has a
 > 2-slot hot-swap SCA backplane.  In a failure of sda I can pull out the first
 > disk and replace it with the 2nd.  My fstab remains the same and requires
 > almost no intervention to get the system running again.  That is as long as
 > something like this mirror works.
 > 
 > The backup disk will be sda when it is placed in the first slot because it
 > gets it's SCSI address via the backplane.
 > 
 > I have tried the bios= options to no avail.  
 > 
 > My little script does do a chroot to the new disk so that pathnames are
 > relative to the mirrored system.  I tried both methods of chrooting (lilo -r
 > /path and traditional chroot) and it still doesn't work properly.  I do
 > think the chroot is required though.  Lilo also does not complain about
 > anything when it is run.
 > 
 > I will take a look at grub as well.
 > 
 > --------------------------------------
 > Michael Still (MikeS at McBurney.com)
 > System Administrator
 > The McBurney Corporation
 > --------------------------------------
 > 
 > 
 > -----Original Message-----
 > From: hirsch at zapmedia.com [mailto:hirsch at zapmedia.com]
 > Sent: Tuesday, January 22, 2002 1:56 PM
 > To: Michael Still (mikes)
 > Cc: 'aaron at pd.org'; ALE
 > Subject: RE: [ale] rsync and link files
 > 
 > 
 > Michael Still (mikes) writes:
 >  > Are you using the -a switch?   
 >  > 
 >  > On another rsync note.. I have a system here that I'm trying to do local
 >  > rsync with to make 'poor man's mirror' of my disk.
 >  > 
 >  > I have 2 identical 18G SCSI hd's on sda and sdb and partitioned exactly
 > the
 >  > same with a /boot and a / (no swap..yeah I know), but the problem is that
 >  > when I reboot with this disk to test my mirror lilo gives LI 01 01 01
 > 01...
 >  > So there is a problem somewhere.
 >  > 
 >  > Any ideas?  Better ways to do this?
 > 
 > Sure.  First, this gets much easier if you use grub instead of lilo.
 > You don't need to rerun grub after any kernel change because grub
 > understands filesystems (ext2 and reiserfs).
 > 
 > Second, how are you planning to use this disk?  It looks like sda2 is
 > your current root disk, so is this backup disk sdb2?  And will it be
 > sdb2 or sda2 when you try to boot off it?
 > 
 > Assuming, since I don't know your exact situation, that it is
 > currently sdb2 but it will be sda2 when you boot off it, you have the
 > correct 'root=/dev/sda2' line in lilo.conf, but I think you also have
 > tell lilo which disk it is going to be at boot up.  You use the
 > "disk=xx" for this.
 > 
 > Something like:
 > disk=/dev/sda
 > 	bios=0x80
 > 
 > I'm sorry I don't know the exact command you need.  I'd need to know
 > your exact situation--and then I'd need to play with it for a while.
 > It is poorly documented in the lilo.conf man page.  I think it is
 > better described in some HOWTO somewhere.
 > 
 > --Michael
 > 
 >  > -begin lilo.conf:
 >  > boot = /dev/sdb
 >  > timeout = 50
 >  > prompt
 >  > default = mike
 >  > vga = normal
 >  > read-only
 >  > map=/boot/map
 >  > install=/boot/boot.b
 >  > 
 >  > image = /boot/bzImage-mike
 >  >         label = mike
 >  >         root = /dev/sda2
 >  > -end lilo.conf
 >  > 
 >  > -beging sync.sh:
 >  > mount /mnt/backup/root
 >  > mount /mnt/backup/root/boot
 >  > /usr/bin/rsync --delete -xav / /mnt/backup/root
 >  > /usr/bin/rsync --delete -xav /boot/ /mnt/backup/root/boot
 >  > #/usr/sbin/chroot /mnt/backup/root /sbin/lilo -C /root/sync/lilo.conf
 >  > /sbin/lilo -r /mnt/backup/root -v -v -v -C /root/sync/lilo.conf
 >  > sync ; sync ; sync
 >  > umount /mnt/backup/root/boot
 >  > umount /mnt/backup/root
 >  > -end sync.sh
 >  > 
 >  > # fdisk -l /dev/sda
 >  > 
 >  > Disk /dev/sda: 255 heads, 63 sectors, 2213 cylinders
 >  > Units = cylinders of 16065 * 512 bytes
 >  > 
 >  >    Device Boot    Start       End    Blocks   Id  System
 >  > /dev/sda1   *         1        13    104391   83  Linux
 >  > /dev/sda2            14      2211  17655435   83  Linux
 >  > 
 >  > # fdisk -l /dev/sdb
 >  > 
 >  > Disk /dev/sdb: 255 heads, 63 sectors, 2213 cylinders
 >  > Units = cylinders of 16065 * 512 bytes
 >  > 
 >  >    Device Boot    Start       End    Blocks   Id  System
 >  > /dev/sdb1   *         1        13    104391   83  Linux
 >  > /dev/sdb2            14      2211  17655435   83  Linux
 >  > 
 >  > --------------------------------------
 >  > Michael Still (MikeS at McBurney.com)
 >  > System Administrator
 >  > The McBurney Corporation
 >  > --------------------------------------
 >  > 
 >  > 
 >  > -----Original Message-----
 >  > From: aaron [mailto:aaron at pd.org]
 >  > Sent: Tuesday, January 22, 2002 1:16 PM
 >  > To: ALE
 >  > Subject: [ale] rsync and link files
 >  > 
 >  > 
 >  > 
 >  > Was trying to use "rsync" to locally mirror my RH 7.1 hard drive (and 
 >  > create a long overdue backup) before updating to RH 7.2
 >  > 
 >  > For the most part, rsync is being a gem.  However, I would like to 
 >  > maintain the various soft, hard and absolute link files in most 
 >  > directories and rsync is not transfering or recreating any of the links.
 >  > 
 >  > I have reviewed the man and tried several combinations of the link 
 >  > handling options listed there with no success. Anyone have a clue
 >  > what I might be missing to get the links to be mirrored with the regular 
 >  > files??
 >  > 
 >  > thanks...
 >  > aaron
 >  > 
 >  > 
 >  > ---
 >  > This message has been sent through the ALE general discussion list.
 >  > See http://www.ale.org/mailing-lists.shtml for more info. Problems should
 > be
 >  > 
 >  > sent to listmaster at ale dot org.
 >  > 
 >  > ---
 >  > This message has been sent through the ALE general discussion list.
 >  > See http://www.ale.org/mailing-lists.shtml for more info. Problems should
 > be 
 >  > sent to listmaster at ale dot org.




---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list