Hi all,
and thank you for all the most valuable hints, especially Rick Hummers, Paul
Sinclair, Joe Fletcher, Jef HamLin, William Bochnik and alan_at_nabeth (hope i
forgot nobody ;o) )
Problem was:
Having two perfectly identical systems, the running one should be cloned to
the
"new" one to act as a perfectly identical backup at the time the copy is made
if necessary.
Both systems have Storage Works Raid Array 200 controllers with 6 x 2,1 GB
Disks, defined as 1 JBOD (System) and 5 RAID5 (data). Both systems have one
slot in the raid array free.
Suggested procedures:
----------------------------------------------------------------------------
------------------
a) Rick Hummers
I made a standard system (your existing system), patched completely to the
appropriate level, installed all my local customizations (NIS setup,
ntp.config,
hosts files, and, ...). Then I added in a disk to this system (call it my
gold
disk) and did vdumps of each partition (/, /usr/, /var ) into files on the G
partition of the new disk
(vdump -0f /gold-disk/root.vdump /). I also did a vdump | restore (see the
vrestore
man page where it discusses the -f option and pipes) of the root partition
into
the A
partition of my gold disk to make it bootable (you could just use an
installation
CDROM). I added a small B partition as swap space. I also made disklabel
proto
files for any system disk or set of disks that I would find for all my
restores
and wrote them into the G partition
(remember to include swap space). I put the gold disk in a 3-slot SCSI BA353
and I
could then take this gold disk to any system, plug it onto the internal SCSI
and boot
the genvmunix kernel on it in single user mode (say rz5)
(>>> boot -fl s -fi genvmunix dka500). Once booted mount the root
read/write
(mount -u /dev/rz5a /)
mount the gold partition and add small swap space
(mkdir /gold-disk
mount /dev/rz5g /gold-disk
swapon /dev/rz5b)
prepare the new disk (say rz0 is a RZ29B) for system
(disklabel -rwR /gold-disk/RZ29B.label /deb/rrz0c RZ29B
newfs /dev/rrz0a
newfs /dev/rrz0g
newfs /dev/rrz0h)
Mount the new disk and restore the partitions
(mkdir /new_root
mkdir /new_usr
mkdir /new_var
cd /new_root
vrestore -xf /gold-disk/root.vdump
cd /new_usr
vrestore -xf /gold-disk/usr.vdump
cd /new_var
vrestore -xf /gold-disk/var.vdump)
Shut down and then boot the new disk (genvmunix again)
(shutdown -h now
>>> boot -fl s -fi genvmunix dka0
mount -u /dev/rz0a
mount /dev/rz0g /usr
mount /dev/rz0h /var
swapon /dev/rz0b
Now change this system in rc.config to be a new Network node name and build a
new kernel
(rcmgr set HOSTNAME new
rcmgr set IFCONFIG_0 "16.22.33.44 netmask 255.255.0.0")
choosing an appropriate new name, ip address and netmask)
ed /etc/hosts and add 16.22.33.44 new
doconfig -c NEW
...
mv the new kernel into /
boot the new system disk.
Once on the net then nfs mount the 'data disks' and do a dump | restore
(again
see the restore man page for -f sent to a pipe) copy of them to your new
system.
----------------------------------------------------------------------------
------------------
b) by Paul Sinclair
Use /sys/bin/btcreate
This will take system image to tape and allow you to rebuild another
machine!
----------------------------------------------------------------------------
------------------
c) by Joe Fletcher
Dead easy really. Partition your clone system disk and make sure you
install the boot block. The diskconfig GUI will do this quite nicely
or copy the disklabel from the original to the new disk.
If you are using ADVFS create domains and filesets corresponding to the
partitions on the new disk eg root2_domain, usr2_domain etc. Mount the new
disk domains and just copy the contents of the existing disk onto the
new partitions using vdump.vdump will copy ufs partitions as well if need
to. The just dismount and unplug the disk and plug it into the new box.
----------------------------------------------------------------------------
------------------
d) by Jef HamLin
Shut down to single user mode
disklabel -z rzYY (rzYY being the disk you wish to copy TO, of course)
dd if=/dev/rzXXc of=/dev/rzYYc bs=2048b (rzXXc being the original, rzYYc the
copy)
One word of caution, if you have other partitions on "rzXX", they will go,
too. This is a good thing in our case as our "/usr" is also on the rzXX
disk and so we get the entire system with one "dd", BUT we had one occasion
when a partition from another disk was added to the /usr AdvFS partition and
when we did the copy, the two pieces were out of sync and it ended up being
a heck of a mess!
----------------------------------------------------------------------------
------------------
e) by alan_at_nabeth
You can do this semi-online by running the backup to a pipe
and have the restore read from that:
# create the target file system
# mount it somewhere, /mnt for example
For UFS:
# dump 0f - / | ( cd /mnt ; restore rf - )
For AdvFS:
# vdump 0f - / | ( cd /mnt ; vrestore xf - )
Repeat for each file system. Once done you can edit the
startup files for the new disk. There are close interactions
between CDE and the network support that may require booting
the new system disk under the old name and then using the
network setup scripts to change the name and address.
----------------------------------------------------------------------------
------------------
f) by William Bochnik
tar or dumping the / and /usr to the second machine; You would have to
tweak a
couple of files so that the other machine doesnt have the same name
----------------------------------------------------------------------------
------------------
YS, CW
------------------------------------------
Dr. Christian Wessely
christian.wessely_at_kfunigraz.ac.at
<
http://www-theol.kfunigraz.ac.at/>http:// www-theol.kfunigraz.ac.at
PGP Public Keys deposed there
Received on Wed Dec 13 2000 - 12:37:32 NZDT