Use the prtvtoc(1M) command to get a listing of partitioning information for a disk.
# prtvtoc /dev/rdsk/c2t0d0s0 > /tmp/vtoc |
In this example, the information for disk c2t0d0 is redirected to a file on disk.
Create and run a script similar to the following, making use of the fmthard(1M) command.
for i in 1 2 3 5 do fmthard -s /tmp/vtoc /dev/rdsk/c2t${i}d0s2 done |