For example, if you would like to copy the entire partition /dev/dsk/c0t0d0s0 (which usually is the boot disk with the root directory) to a second disk /dev/dsk/c0t1d0s0, then:
mount /dev/dsk/c0t1d0s0 /disk2 To copy the root directory to a disk mounted on /disk2:
ufsdump 0f - /dev/dsk/c0t0d0s0 | ( cd /disk2 ; ufsrestore xf -) To copy the usr partition 7 to a disk mounted on /disk2:
ufsdump 0f - /dev/dsk/c0t0d0s7 | ( cd /disk2 ; ufsrestore xf -) The following command must be run in order to prepare the root partition for booting. This tends to be done on the 0'th slice. In this example, the target disk is /dev/rdsk/c0t1d0s0:
installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk /dev/rdsk/c0t1d0s0 The single quotes (accent grave) surrounding uname -i are the quotes found on the tilde (~) key.
All commands can be found under /usr/sbin.
Root slices on FC-AL drives can be duplicated using ufsdump/ufsrestore/installboot; however, the architecture of FC-AL drives requires additional steps before the copied counterparts can be used as bootable slices. FC-AL drives contain a unique WWN (World Wide Name), which is used in fibre channel networks. The device directory of a bootable FC-AL slice needs to be rebuilt and the boot device setting in the system's EEPROM must be updated before the copied slice can be used as a bootable entity.
The WWN of an FC-AL drive can be found in the /dev/dsk device directory. SCSI disk slices are linked to device names such as c1t3d0s0 -> ../../devices/pci@8,700000/scsi@6,1/sd@3,0:a , whereas FC-AL slices are linked to the physical disk including the WWN, e.g.: c2t1d0s0 -> ../../devices/pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w2100002037a52c7c,0:a . In this example, 2100002037a52c7c is the 64-bit WWN. For a bootable FC-AL slice, this device name including the WWN appears under boot-device.
Depending on whether (1) the copied disk is used to replace an existing disk in the same slot (physical location in the FC chain) or (2) is used as a bootable entity in a new slot, different preparation is required.
share -F nfs -o rw=eiffel:telford -d "home dir" /usr/local/home
rw and ro specify whether the file system is read/write or read-only for the clients.
Hostnames that are allowed to mount the directory are enumerated after rw= and ro=. Hostnames are separated by : (colons).
-d "..." is used to describe the file system. It is not a required option.
The absolute path name to be shared on the network is specified as the last argument to the command share.
To start NFS on the server:
mach:/usr/local/home - /usr/local/home nfs - yes -
Network File Systems tend to be used in conjunction with NIS in order to preserve user and group information.