|
2. SGI IRIX
2.1 Disks and File Systems
2.1.1 Disk Copy
Create a directory to mount the empty disk partition, e.g. /disk2, and mount the empty partition at that point. If you are copying several partitions, e.g. root partition and usr partitions, then the mount and diskcopy procedure has to be followed separately for each partition.
For example, if you would like to copy the entire partition /dev/dsk/dks0d1s0 (which usually is the boot disk with the root directory) to a second disk /dev/dsk/dks0d2s0, then:
mount /dev/dsk/dks0d2s0 /disk2
For XFS File Systems, the command to copy the root directory to a disk mounted on /disk2 is:
xfsdump -l0 - /dev/root | xfsrestore - /disk2
or, if using the full device name:
xfsdump -l0 - /dev/dsk/dks0d1s0 | xfsrestore - /disk2
If you are copying a partition other than the root partition, e.g. the
usr slice 7:
xfsdump -l0 - /dev/dsk/dks0d1s7 | xfsrestore - /disk2
For EFS File Systems, the command to copy the root directory to a disk mounted on /disk2 is:
dump 0f - / | (cd /disk2; restore xf -)
If you are copying a usr partition that is mounted, e.g. at /usr/local:
dump 0f - /usr/local | (cd /disk2; restore xf -)
The following set of commands should be applied to every disk copied, either in XFS or EFS mode. The commands establish the
Volume Header for a disk drive. In this example, the target disk is /dev/rdsk/dks0d2
/etc/dvhtool -v get sgilabel /stand/sgilabel /etc/dvhtool -v get sash /stand/sash /etc/dvhtool -v get ide /stand/ide /etc/dvhtool -v list /dev/rdsk/dks0d2vh /etc/dvhtool -v creat /stand/sgilabel sgilabel /dev/rdsk/dks0d2vh /etc/dvhtool -v creat /stand/sash sash /dev/rdsk/dks0d2vh /etc/dvhtool -v creat /stand/ide ide /dev/rdsk/dks0d2vh /etc/dvhtool -v list /dev/rdsk/dks0d2vh
The first 3 commands create 3 files (
sgilabel, sash, ide). The contents of these files is then stored on the target drive in commands 5 through 7. The 4th and 8th line serve as check points to see what the contents of the current Volume Header of the target drives are.
|