tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* SUMMARY: Creating bare-metal recovery disks
@ 2004-02-23 13:54 Dr. Hans Ekkehard Plesser
  2004-02-23 14:43 ` SUMMARY 2: " Dr. Hans Ekkehard Plesser
  0 siblings, 1 reply; 2+ messages in thread
From: Dr. Hans Ekkehard Plesser @ 2004-02-23 13:54 UTC (permalink / raw)


-----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 
   (mirroring), synchronize the disks, and then remove one disk of the pair
   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 = /dev/disk/dsk14b

D. John Lanier provided the following, very detailed instructions:

<<<begin procedure>>>

HowTo: How to make a bootable copy of your boot disk. 
OPERATING SYSTEM OR PRODUCT NAME : Compaq Tru64 UNIX 
VERSION : 4.x and 5.x
DESCRIPTION OF TASK OR ACTIVITY : How to create another bootable disk. 
HOWTO PERFORM THE DESIRED TASK OR ACTIVITY :

1.)
To create an ADVFS root and /usr partition, you first need to 
create the disklabel.  

4.x
===
Assuming that your new disk is "disk: rz28d" (top of "disklabel -r rz1"
output) 
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
===
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:
====
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, 
  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:
====
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, 
  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:
====
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 
    exists it is a link to your swapspace.  You will want to relink this
to 
    the correct disk.
        ln -s /dev/rz1b 

3.  If ufs file systems, change the /root2/etc/fstab file to reflect the
new 
        location of the root, and usr partions. 
 
        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. 
        cd /root2/etc/fdmns/root_domain
        rm rz0a
        ln -s /dev/rz1a rz1a
        cd ../usr_domain
        rm rz0g
        ln -s /dev/rz1g rz1g    

5.x:
====

mount root2_domain#root /root2

1.  You do NOT have to edit the /root2/etc/fstab file in this procedure
to change your 
    swap space to the new disk.

2.  In 5.x, the swap device is included in the "vm" subsystem:

EX:
- -->sysconfig -q vm swapdevice 
vm:
swapdevice = /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)

<cut>

vm:
        swapdevice = /dev/disk/dsk0b <---This is what you need to change
to
                                     <---"/dev/disk/dsk1b"..
<cut>

:wq

3.  If ufs file systems, change the /root2/etc/fstab file to reflect the
new 
        location of the root and usr partions.
  
        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")
 
***
  By default, "root" is partition "a" of the disk, "swap" is partition
"b" of the disk, 
  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. 
        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
        
If you are using another combination such as root = ufs, usr = advfs 
then you should do the commands above that apply to your system.  

Once complete, you should be able to boot the new disk from the 
console prompt.

<<<end procedure>>>


- -- 
Dr. Hans Ekkehard Plesser
Associate Professor            

Department of Mathematical Sciences and Technology
Agricultural University of Norway

Phone +47 6494 8832
Fax +47 6494 8810
Home http://arken.nlh.no/~imfhep 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQFAOgYtbuXhp9E3LTsRAsKPAJwMO2xvw75yKu8xgzA6AyklwCdFUgCgwNIc
MB4nTykOYVuRRZ3rOiVBxUI=
=TWvS
-----END PGP SIGNATURE-----



^ permalink raw reply	[flat|nested] 2+ messages in thread

* SUMMARY 2: Creating bare-metal recovery disks
  2004-02-23 13:54 SUMMARY: Creating bare-metal recovery disks Dr. Hans Ekkehard Plesser
@ 2004-02-23 14:43 ` Dr. Hans Ekkehard Plesser
  0 siblings, 0 replies; 2+ messages in thread
From: Dr. Hans Ekkehard Plesser @ 2004-02-23 14:43 UTC (permalink / raw)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Hi!

After my first Summary posting, I received a further hint from Thomas 
Sjolshagen.  He pointed me to some scripts by Robert Urban.  For more 
information, see

	http://www.unix-wissen.de/Tru64/cloning/

(Don't worry, the information is in English).

Hans

- -- 
Dr. Hans Ekkehard Plesser
Associate Professor            

Department of Mathematical Sciences and Technology
Agricultural University of Norway

Phone +47 6494 8832
Fax +47 6494 8810
Home http://arken.nlh.no/~imfhep 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQFAOhF7buXhp9E3LTsRAlSxAKCb5SJPVreVP9XR1d6aIfTCuvGSkACglcrH
V2hSbnvHKhmqGuS0E7IEuAI=
=BgZS
-----END PGP SIGNATURE-----



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-02-23 14:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-23 13:54 SUMMARY: Creating bare-metal recovery disks Dr. Hans Ekkehard Plesser
2004-02-23 14:43 ` SUMMARY 2: " Dr. Hans Ekkehard Plesser

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox