From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <97671103417429.tru64-unix-managers.marc@archive.invalid> From: Christian Wessely Date: Wed, 13 Dec 2000 12:35:57 +0000 To: tru64-unix-managers Subject: SUMMARY: cloning complete server / DU 4.0d X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=97671103417429 Hi all,=20 and thank you for all the most valuable hints, especially Rick Hummers, Paul Sinclair, Joe Fletcher, Jef HamLin, William Bochnik and alan@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= =20 appropriate level, installed all my local customizations (NIS setup, ntp.config,=20 hosts files, and, ...).=A0 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= =20 partition of the new disk=20 (vdump -0f /gold-disk/root.vdump /).=A0=A0 I also did a vdump | restore (see= the vrestore=20 man page where it discusses the -f option and pipes) of the root partition into the A=20 partition of my gold disk to make it bootable (you could just use an installation=20 CDROM).=A0 I added a small B partition as swap space.=A0 I also made= disklabel proto=20 files for any system disk or set of disks that I would find for all my restores and wrote them into the G partition=20 (remember to include swap space).=A0=A0 I put the gold disk in a 3-slot SCSI= BA353 and I=20 could then take this gold disk to any system, plug it onto the internal SCSI and boot=20 the genvmunix kernel on it in single user mode (say rz5)=20 (>>> boot -fl s -fi genvmunix dka500).=A0=A0=A0 Once booted mount the root= =A0 read/write=20 (mount -u /dev/rz5a /)=20 mount the gold partition and add small swap space=20 (mkdir /gold-disk=20 mount /dev/rz5g /gold-disk=20 swapon /dev/rz5b)=20 prepare the new disk (say rz0 is a RZ29B) for system=20 (disklabel -rwR /gold-disk/RZ29B.label /deb/rrz0c RZ29B=20 newfs /dev/rrz0a=20 newfs /dev/rrz0g=20 newfs /dev/rrz0h)=20 Mount the new disk and restore the partitions=20 (mkdir /new_root=20 mkdir /new_usr=20 mkdir /new_var=20 cd /new_root=20 vrestore -xf /gold-disk/root.vdump=20 cd /new_usr=20 vrestore -xf /gold-disk/usr.vdump=20 cd /new_var=20 vrestore -xf /gold-disk/var.vdump)=20 Shut down and then boot the new disk (genvmunix again)=20 (shutdown -h now=20 >>> boot -fl s -fi genvmunix dka0=20 mount -u /dev/rz0a=20 mount /dev/rz0g /usr=20 mount /dev/rz0h /var=20 swapon /dev/rz0b=20 Now change this system in rc.config to be a new Network node name and build= a=20 new kernel=20 (rcmgr set HOSTNAME new=20 rcmgr set IFCONFIG_0 "16.22.33.44 netmask 255.255.0.0")=20 choosing an=A0 appropriate new name, ip address and netmask)=20 ed /etc/hosts and add 16.22.33.44 new=20 doconfig -c NEW=20 ...=20 mv the new kernel into /=20 boot the new system disk.=20 Once on the net then nfs mount the 'data disks' and do a dump | restore (again=20 see the restore man page for -f sent to a pipe) copy of them to your new system.=20 ---------------------------------------------------------------------------- ------------------ 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=20 to. The just dismount and unplug the disk and plug it into the new box. =20 ---------------------------------------------------------------------------- ------------------ 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=3D/dev/rzXXc of=3D/dev/rzYYc bs=3D2048b (rzXXc being the original,= rzYYc the copy) One word of caution, if you have other partitions on "rzXX", they will go, too.=A0 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@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.=A0 Once done you can edit the startup files for the new disk.=A0 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@kfunigraz.ac.at http:// www-theol.kfunigraz.ac.at PGP Public Keys deposed there =20