Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

synchronizing a set of machines

14 views
Skip to first unread message
Message has been deleted
Message has been deleted

Art Werschulz

unread,
Mar 17, 2005, 12:47:01 PM3/17/05
to a...@dsm.fordham.edu
Hi.

# The original article had a slight error. I've cancelled the original
# article. The corrected version appears below.

I don't think I've seen this topic addressed in this newsgroup. I've
checked the archives, but couldn't find it. (OTOH, I may have used bad
search criteria.)

Our setup: We have 21 i686 boxes in our computer lab, all of which are
dual-boot machines, running Fedora FC3 and Windoze XP. The default
behavior is to run Fedora.

We would like the contents of these machines' hard disks to be essentially
identical. By "essentially", I mean that (e.g.) they obviously shouldn't
have the same IP address.

Rather than applying updates to all the machines, it seems that the best
way to keep the machines in synch would be to update one of the machines
(e.g., using autorpm or yum), and to then push the changes to all the other
machines.

It seems to me that the simplest way of doing this would be to use rsync.
Note that the hard disks on all these machines are partitioned as follows:
/dev/hda9 on / type ext3 (rw)
/dev/hda5 on /boot type ext3 (rw)
/dev/hda8 on /tmp type ext3 (rw)
/dev/hda6 on /usr/local type ext3 (rw)
/dev/hda2 on /winxp type ntfs (rw,umask=022)
The first four are Linux partitions, and the last is a WIndoze XP
partition.

I was thinking of using a script that looks like the following. Said
script would be run by root under cron at 2:00am.

---%<------%<------%<------%<--Cut-Here-%<------%<------%<------%<---
#!/bin/sh

remoteMachines=/usr/local/adm/clone/remoteMachines
excludedFiles=/usr/local/adm/clone/excludedFiles

export RSYNC_RSH=/usr/sbin/ssh
for machine in `cat $remoteMachines`
do
rsync -ax --delete --exclude-from=$excludedFiles / $machine:/
rsync -ax --delete /boot/ $machine:/boot/
rsync -ax --delete /usr/local/ $machine:/usr/local/
rsync -ax --delete /winxp/ $machine:/winxp/
done
---%<------%<------%<------%<--Cut-Here-%<------%<------%<------%<---

Here, excludedFiles would be a list of files that live on the root
partition, but should not be updated. The things that come to mind are the
following:
/etc/sysconfig/network-scripts/ifcfg-eth0
/etc/autorpm.d/autorpm.cron

So, before I wind up trashing a few machines, I thought I would ask the
experts in this newsgroup if I've omitted anything important.

Does this look OK? Or is there something I've overlooked?

Thanks.

--
Art Werschulz (8-{)} "Metaphors be with you." -- bumper sticker
GCS/M (GAT): d? -p+ c++ l u+(-) e--- m* s n+ h f g+ w+ t++ r- y?
Internet: agw STRUDEL cs.columbia.edu
ATTnet: Columbia U. (212) 939-7060, Fordham U. (212) 636-6325

Me Here

unread,
Mar 22, 2005, 4:00:08 PM3/22/05
to


...Why did you decide to use rsync instead of simply pointing up2date or
yum at your own custom repository server? The up2date/yum option is
much simpler and won't break a thing.

Just curious.

Me.

0 new messages