Solaris Tips

Copying a disk VTOC from the command line

If you have some experience with Solaris on Sun hardware, you already know that almost all machines lack hardware RAID. Instead, you use Solstice DiskSuite, renamed in Solaris 9 to Sun Volume Manager.

As Solstice Disk Suite/Sun Volume Manager mirrors slice by slice, we need to copy the VTOC (read "partition table") from one disk to another.

This method is quick, and it is documented in a lot of places, but I find it so useful I have to include it.

The procedure

I assume your system disk is c0t0d0 and it will be mirrored in c0t1d0.

  1. Just run, as root:
    # prtvtoc /dev/rdsk/c0t0d0s2 | fmthard -s - /dev/rdsk/c0t1d0s2
    
  2. You are done!

Quick and easy.

If you are new to Solaris and come from Linux, it would be useful to read my page about the naming of disk devices.

1