From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Dr. Hans Ekkehard Plesser" Newsgroups: gmane.os.tru64.managers Subject: SUMMARY: Creating bare-metal recovery disks Date: Mon, 23 Feb 2004 14:54:52 +0100 Organization: IMT, Agricultural University of Norway Sender: tru64-unix-managers-owner@ornl.gov Message-ID: <200402231454.54441.hans.ekkehard.plesser@nlh.no> Reply-To: hans.ekkehard.plesser@nlh.no NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1077544564 23880 80.91.224.253 (23 Feb 2004 13:56:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 23 Feb 2004 13:56:04 +0000 (UTC) Original-X-From: tru64-unix-managers-owner-gotm-tru64-unix-managers=m.gmane.org@sws1.ctd.ornl.gov Mon Feb 23 14:55:57 2004 Return-path: Original-Received: from sws1.ornl.gov ([160.91.1.101]) by deer.gmane.org with smtp (Exim 3.35 #1 (Debian)) id 1AvGYu-00077H-00 for ; Mon, 23 Feb 2004 14:55:56 +0100 Original-Received: (qmail 18940 invoked by uid 5); 23 Feb 2004 13:55:42 -0000 Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 18925 invoked by uid 49493); 23 Feb 2004 13:55:42 -0000 Original-Received: from hans.ekkehard.plesser@nlh.no by sws1 by uid 49491 with qmail-scanner-1.16 (iscan: v3.1/v5.600-1011/622/49252. clamscan: 20030605. spamassassin: 2.55. Clear:SA:0(-7.5/5.0):. Processed in 32.032487 secs); 23 Feb 2004 13:55:42 -0000 Original-Received: from unknown (HELO emroute1.cind.ornl.gov) (160.91.4.119) by 0 with SMTP; 23 Feb 2004 13:55:10 -0000 Original-Received: from emroute1.cind.ornl.gov (localhost [127.0.0.1]) by emroute1.cind.ornl.gov (PMDF V6.2-X17 #30669) with ESMTP id <0HTJ00FE7INVGY@emroute1.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Mon, 23 Feb 2004 08:55:09 -0500 (EST) Original-Received: from bukk.nlh.no (bukk.nlh.no [128.39.176.2]) by emroute1.cind.ornl.gov (PMDF V6.2-X17 #30669) with SMTP id <0HTJ001IDINKXP@emroute1.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Mon, 23 Feb 2004 08:54:57 -0500 (EST) Original-Received: (qmail 31752 invoked by uid 3620); Mon, 23 Feb 2004 13:54:32 +0000 Original-Received: from hans.ekkehard.plesser@nlh.no by bukk by uid 501 with qmail-scanner-1.20 (fsecure: 4.11/3190/2004-02-18/2002-12-17. 2004-02-18/. Clear:RC:1 (128.39.178.174):. Processed in 0.023508 secs); Mon, 23 Feb 2004 13:54:32 +0000 Original-Received: from imt-hep-lt.nlh.no (HELO itf-hep-lt) (128.39.178.174) by bukk.nlh.no with SMTP; Mon, 23 Feb 2004 13:54:32 +0000 Original-To: tru64-unix-managers@ornl.gov User-Agent: KMail/1.4.3 Xref: main.gmane.org gmane.os.tru64.managers:6493 X-Report-Spam: http://spam.gmane.org/gmane.os.tru64.managers:6493 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi! Thanks to John Lanier, Bob Marcan, Isaac Chute, and Michael Polnick. I received several suggestions: A. Isaac Chute of HP says that HP is working on better documentation of and tools for creating backup disks. B. Bob Marcan recommends to install the system partitions on RAID 1 disks= =20 (mirroring), synchronize the disks, and then remove one disk of the pa= ir to save storage. C. Michael Polnick provided the following recipe: 1. disklabel it: # disklabel -wr -t advfs dsk14 2. make file domains: # mkfdmn -r /dev/disk/dsk14a root_backup # mkfset root_backup root # mkfdmn /dev/disk/dsk14g usr_backup # mkfset usr_backup usr # mkfset usr_backup var 3. Copy system disk # mount root_backup#root /mnt # vdump 0f - / | vrestore -xf - -D /mnt also for /usr and /var 4. make disk bootable change file domains in /mnt/etc/fstab to root_backup#root / advfs rw 0 1 usr_backup#usr /usr advfs rw 0 2 usr_backup#var /var advfs rw 0 2 5. make swap # disklabel -s /dev/rdisk/dsk14b swap edit /mnt/etc/sysconfigtab vm: swapdevice =3D /dev/disk/dsk14b D. John Lanier provided the following, very detailed instructions: <<>> HowTo: How to make a bootable copy of your boot disk.=20 OPERATING SYSTEM OR PRODUCT NAME : Compaq Tru64 UNIX=20 VERSION : 4.x and 5.x DESCRIPTION OF TASK OR ACTIVITY : How to create another bootable disk.=20 HOWTO PERFORM THE DESIRED TASK OR ACTIVITY : 1.) To create an ADVFS root and /usr partition, you first need to=20 create the disklabel. =20 4.x =3D=3D=3D Assuming that your new disk is "disk: rz28d" (top of "disklabel -r rz1" output)=20 and is the rz1 disk: disklabel -wr -t advfs rz1 rz28d mkfdmn -r /dev/rz1a root2_domain mkfset root2_domain root mkfdmn /dev/rz1g usr2_domain mkfset usr2_domain usr 5.x =3D=3D=3D Assuming that your new disk is "disk: BB00921B91" (top of "disklabel -r dsk1" output) and is the "dsk1" disk: disklabel -wr -t advfs dsk1 BB00921B91 mkfdmn -r /dev/disk/dsk1a root2_domain mkfset root2_domain root mkfdmn /dev/disk/dsk1g usr2_domain mkfset usr2_domain usr Next you are going to need to make the following mount points: mkdir /root2 mkdir /rootclone mkdir /usr2 mkdir /usrclone If you have the Advanced Utilities for ADVFS you can do the following: clonefset root_domain root rootclone clonefset usr_domain usr usrclone mount root_domain#rootclone /rootclone mount root2_domain#root /root2 mount usr_domain#usrclone /usrclone mount usr2_domain#usr /usr2 vdump -0 -f - -D /rootclone |vrestore -xf - -D /root2 vdump -0 -f - -D /usrclone |vrestore -xf - -D /usr2 umount /rootclone umount /usrclone rmfset root_domain rootclone rmfset usr_domain usrclone If you do not have the Advanced Utilities for ADVFS, do the following: shutdown now mount -u / mount /usr mount root2_domain#root /root2 mount usr2_domain#usr /usr2 vdump -0 -f - -D / |vrestore -xf - -D /root2 vdump -0 -f - -D /usr |vrestore -xf - -D /usr2 2:) To create UFS Root and /usr Partitions 4.x: =3D=3D=3D=3D Assuming that your new disk is an rz28d and is the rz1 disk disklabel -wr -t ufs rz1 rz28d newfs /dev/rz1a newfs /dev/rz1g mkdir /root2 mkdir /usr2 shutdown now mount -u / mount /dev/rz1a /root2 mount /usr mount /dev/rz1g /usr2 vdump -0 -f - -D / |vrestore -xf - -D /root2 vdump -0 -f - -D /usr |vrestore -xf - -D /usr2 *** By default, "root" is partition "a" of the disk, "swap" is partition "b" of the disk,=20 and "usr" is partition "g" of the disk. Sometimes the "h" partition is reserved for var; you can confirm this from "disklabel -r" output) *** 5.x: =3D=3D=3D=3D Assuming that your new disk is a BB00921B91 and is the "dsk1" disk disklabel -wr -t ufs dsk1 BB00921B91 newfs /dev/dsk1a newfs /dev/dsk1g mkdir /root2 mkdir /usr2 shutdown now mount -u / mount /dev/disk/dsk1a /root2 mount /usr mount /dev/disk/dsk1g /usr2 vdump -0 -f - -D / |vrestore -xf - -D /root2 vdump -0 -f - -D /usr |vrestore -xf - -D /usr2 *** By default, "root" is partition "a" of the disk, "swap" is partition "b" of the disk,=20 and "usr" is partition "g" of the disk. Sometimes the "h" partition is reserved for var; you can confirm this from "disklabel -r" output) *** Some important changes to make to the new root disk: 4.x: =3D=3D=3D=3D mount root2_domain#root /root2 1. In the /root2/etc/fstab file change your swap space to the new disk. change /dev/rz0b swap1 ufs sw 0 2 to /dev/rz1b swap1 ufs sw 0 2 2. In /root2/sbin directory may be a file called swapdefault. If this file=20 exists it is a link to your swapspace. You will want to relink this to=20 the correct disk. ln -s /dev/rz1b=20 3. If ufs file systems, change the /root2/etc/fstab file to reflect the new=20 location of the root, and usr partions.=20 =20 Change for example /dev/rz0a / ufs rw 1 1 to read /dev/rz1a / ufs rw 1 1 4. For advfs you will need to change the links in /root2/etc/fdmns. root_domain and usr_domain links should point to the new boot disk.=20 cd /root2/etc/fdmns/root_domain rm rz0a ln -s /dev/rz1a rz1a cd ../usr_domain rm rz0g ln -s /dev/rz1g rz1g =20 5.x: =3D=3D=3D=3D mount root2_domain#root /root2 1. You do NOT have to edit the /root2/etc/fstab file in this procedure to change your=20 swap space to the new disk. 2. In 5.x, the swap device is included in the "vm" subsystem: EX: - -->sysconfig -q vm swapdevice=20 vm: swapdevice =3D /dev/disk/dsk0b You can edit the /etc/sysconfigtab file to reflect the new swap device: cd /root2 vi /etc/sysconfigtab (or your editor of choice) vm: swapdevice =3D /dev/disk/dsk0b <---This is what you need to chang= e to <---"/dev/disk/dsk1b".. :wq 3. If ufs file systems, change the /root2/etc/fstab file to reflect the new=20 location of the root and usr partions. =20 Change, for example: /dev/disk/dsk0a / ufs rw 1 1 To read: /dev/disk/dsk1a / ufs rw 1 1 (Do the same for "/dev/disk/dsk1g") =20 *** By default, "root" is partition "a" of the disk, "swap" is partition "b" of the disk,=20 and "usr" is partition "g" of the disk. Sometimes the "h" partition is reserved for var; you can confirm this from "disklabel -r" output) *** 4. For advfs you will need to change the links in /root2/etc/fdmns. root_domain and usr_domain links should point to the new boot disk.=20 cd /root2/etc/fdmns/root_domain rm dsk0a ln -s /dev/disk/dsk1a dsk1a cd /root2/etc/fdmns/usr_domain rm dsk0g ln -s /dev/disk/dsk1g dsk1g =20 If you are using another combination such as root =3D ufs, usr =3D advfs=20 then you should do the commands above that apply to your system. =20 Once complete, you should be able to boot the new disk from the=20 console prompt. <<>> - --=20 Dr. Hans Ekkehard Plesser Associate Professor =20 Department of Mathematical Sciences and Technology Agricultural University of Norway Phone +47 6494 8832 Fax +47 6494 8810 Home http://arken.nlh.no/~imfhep=20 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQFAOgYtbuXhp9E3LTsRAsKPAJwMO2xvw75yKu8xgzA6AyklwCdFUgCgwNIc MB4nTykOYVuRRZ3rOiVBxUI=3D =3DTWvS -----END PGP SIGNATURE-----