| |
 |
|
Owl River Company
|
|
|
|
Your IP is: 38.107.191.112
|
Up More Tips
http://www.owlriver.com/tips/rsync-cookbook/
From herrold@owlriver.com Wed Dec 5 13:54:48 2001
Date: Wed, 5 Dec 2001 13:32:05 -0500 (EST)
From: R P Herrold <herrold@owlriver.com>
Reply-To: k12linux@riverdale.k12.or.us
To: k12linux <k12linux@riverdale.k12.or.us>
Subject: Rsync copies cookbook was: Re: K12Linux: A bunch of servers.
On Wed, 5 Dec 2001, jamie wrote:
> So for the other machines you just boot off a floppy format the drives and
> then rsync the rest of the files?
Easier than that ... see below
> > but I usually just build and tweak one, and rsync that master
> > to a copy across the lan or HD to HD ... It is faster ...
Here is a cookbook:
===================
Easier than that (I assume IDE drives and Lilo for simplicity
in this example):
1. Build a unit and admin and configure to taste -- use DHCP
to avoid having to mess with IP and hostname setup
2. Power down and hang another drive at Secondary Master --
-- use fdisk and mkfs to build the /dev/hdc partition
structure on the new drive
I usually hang:
1 /boot
2 /
3 <swap>
4 <extended>
5 /usr
6 /tmp
7 /var
8 /var/log
9 /var/spool
10 /home
... for reasons not relevant here.
3. I mkfs and mkswap as appropiate ...
... again details are outside our present scope
4. Mount thus (this looks harder than it is -- it is
completely repetitive):
mount /dev/hdc2 /mnt/build
cd /mnt/build
mkdir proc
mkdir boot
mkdir usr
mkdir tmp
mkdir var
mkdir home
mount /dev/hdc1 /mnt/build/boot
mount /dev/hdc5 /mnt/build/usr
mount /dev/hdc2 /mnt/build/tmp
mount /dev/hdc2 /mnt/build/var
cd var
mkdir log
mkdir spool
mount /dev/hdc2 /mnt/build/var/log
mount /dev/hdc2 /mnt/build/var/spool
mount /dev/hdc2 /mnt/build/home
5. Move back to the mountpoint and suck the content across --
a careful person does this in single user mode, but it can be
done on hot systems, and with the -e ssh option to rsync, one
can salvage a dying hard drive to a good one in a new remote
chassis -- (I know -- I had to do it on a box 200 miles away
as the hard drive was dying one day -- the customers did not
even notice)
cd /mnt/build
rsync -av --exclude /proc --exclude /mnt/build /. ./.
[This basically photocopies the drive]
hit up-arrow and do the rsync again
6. If the partitioning numbers differ on the new drive from
your master, edit /mnt/build/etc/fstab appropiately
7. If using lilo, and the / partition has moved, edit
/mnt/build/etc/lilo.conf appropiately -- Grub instructions are
slightly different
8. Make a boot floppy -- just in case
9. shutdown -h now and move the copied drive to its new
chassis
10. Boot from the floppy into single user mode
11. Run lilo -v and ldconfig -v (or GRUB commands ...)
12. Troubleshoot as appropiate -- but there should be no
issues
13. Hot test a reboot without the floppy -- kudzu can handle
minor hardware variances
14. All done; Next ...
========================================
-- Russ
--
end
==================================
.-- -... ---.. ... -.- -.--
Copyright (C) 2001 R P Herrold
herrold@owlriver.com NIC: RPH5 (US)
My words are not deathless prose,
but they are mine.
Owl River Company
"The World is Open to Linux (tm)"
... Open Source LINUX solutions ...
info@owlriver.com
Columbus, OH
========================================
This message was sent from the K12Linux Listserv.
For information on subscribing and unsubscribing,
see http://www.riverdale.k12.or.us/linux/listserv.html
or send mail to pnelson@riverdale.k12.or.us
Other approaches:
No-one has bugged us for details on
the grub variant at step 11, but it is essentially the
same.
- rev 021014 RPH - grub comment before kplug post
- initial 011205 RPH
http://www.owlriver.com/tips/rsync-cookbook/
Up More Tips
Back to Top Page
Last modified: Mon, 14 Oct 2002 14:19:26 -0400
http://www.owlriver.com/tips/rsync-cookbook/index.php