Next | Prev | Up | Top | Contents | Index
Creating a New System Disk by Cloning
This procedure describes how to turn an option disk into an exact copy of a system disk. Use this procedure when you want to set up two or more systems with identical system disks. The systems must have identical processor and graphics types.
Caution: The procedure in this section destroys all data on the option disk. If the option disk contains files that you want to save, back up all files on the option disk to tape or another disk before beginning this procedure.
You must perform this procedure as superuser. To ensure that the system disk that you create is identical to the original system disk, the system should be in single user mode.
- List the disk partitioning of the system disk, for example:
# prtvtoc /dev/rdsk/dks0d1vh
...
Partition Type Fs Start: sec (cyl) Size: sec (cyl) Mount Directory
0 efs yes 3048 ( 4) 51054 ( 67) /
1 raw 54102 ( 71) 81534 ( 107)
6 efs yes 135636 ( 178) 1941576 (2548) /usr
8 volhdr 0 ( 0) 3048 ( 4)
10 volume 0 ( 0) 2077212 (2726)
- List the disk partitioning of the option disk that is to be the clone, for example:
# prtvtoc /dev/rdsk/dks0d2vh
...
Partition Type Fs Start: sec (cyl) Size: sec (cyl) Mount Directory
0 efs 3024 ( 4) 50652 ( 67)
1 raw 53676 ( 71) 81648 ( 108)
6 efs 135324 ( 179) 1925532 (2547)
8 volhdr 0 ( 0) 3024 ( 4)
10 volume 0 ( 0) 2060856 (2726)
- Compare the disk partitioning of the two disks. They must have the same layout for the root and (if used) the usr partition. If they are not the same, repartition the option disk to match the system disk using the procedure in the section "Repartitioning a Disk With fx" in this chapter.
- Use the procedure in the section "Adding Files to the Volume Header With dvhtool" in this chapter to check the contents of the volume header of the option disk and add programs, if necessary, by copying them from the system disk.
- Make a new filesystem on the root partition of the option disk. For example, to make an XFS filesystem with a 4 KB block size and a 1000 block internal log (the default values), give this command:
# mkfs /dev/dsk/dks0d2s0
As another example, to make an EFS filesystem, give this command:
# mkfs -t efs /dev/rdsk/dks0d2s0
For additional instructions on making an XFS filesystem, see the sections "Making an XFS Filesystem" and "Making an EFS Filesystem" in Chapter 4. For additional instructions on making an EFS filesystem, see the section "Making an EFS Filesystem" in Chapter 4. There is no need to mount the filesystems after making them.
- If there is a separate usr partition, make a new filesystem on the usr partition of the option disk.
- Create a temporary mount point for the option disk filesystems, for example:
# mkdir /clone
- Mount the Root filesystem of the option disk and change directories to the mount point, for example:
# mount /dev/dsk/dks0d2s0 /clone
# cd /clone
- Use dump (for EFS filesystems) or xfsdump (for XFS filesystems) to copy the Root filesystem on the system disk to the Root filesystem of the option disk. The dump command is:
# dump 0f - / | restore xf -
The xfsdump command is:
# xfsdump -l 0 - / | xfsrestore - .
- If the disks do not have a usr partition, skip to step 13.
- In preparation for copying the Usr filesystem, mount the Usr filesystem instead of the Root filesystem:
# cd ..
# umount /clone
# mount /dev/dsk/dks0d2s6 /clone
# cd /clone
- Use dump (for EFS filesystems) or xfsdump (for XFS filesystems) to copy the Usr filesystem on the system disk to the Usr filesystem of the option disk. The dump command is:
# dump 0f - /usr | restore xf -
The xfsdump command is:
# xfsdump -l 0 - /usr | xfsrestore - .
- Unmount the filesystem mounted at the temporary mount point and remove the mount point, for example:
# cd ..
# umount /clone
# rmdir /clone
The option disk is now an exact copy of the system disk. It can be moved to a system with the same hardware configuration.
Next | Prev | Up | Top | Contents | Index