System Administration Guide, Volume 1

Label Multiple Disks by Using the prtvtoc and fmthard Commands

Use the prtvtoc and fmthard commands to label multiple disks with the same disk geometry.

Use this for loop in a script to copy a disk label from one disk and replicate it on multiple disks.


# for i in x y z
> do
> prtvtoc /dev/rdsk/cwtxdysz | fmthard -s - /dev/rdsk/cwt${i}d0s2
> done

Example--Labeling Multiple Disks

In this example, the disk label from c2t0d0s0 is copied to four other disks.


# for i in 1 2 3 5
> do
> prtvtoc /dev/rdsk/c2t0d0s0 | fmthard -s - /dev/rdsk/c2t${i}d0s2
> done
fmthard:  New volume table of contents now in place.
fmthard:  New volume table of contents now in place.
fmthard:  New volume table of contents now in place.
fmthard:  New volume table of contents now in place.
#