Removing VxVM from a Solaris root disk

This post provides an example of how to remove Veritas Volume Manager (VxVM) from a Solaris root disk. For this example we are using a smurf that has two internal disks (c0t0d0 and c0t3d0) under VxVM control. The operating system is mirrored between the two devices.

  1. From the "ok" prompt, boot from the cdrom device into single-user mode:
  2. Perform a filesystem check on the root filesystem:
  3. Update the /a/etc/system file, removing references to the VxVM root device:
    # vi /a/etc/system
    The system must not boot from the Veritas volumes. You can either delete the following two lines or change them from:
    set vxio:vol_rootdev_is_volume=1
    * rootdev:/pseudo/vxio@0:0 
    * set vxio:vol_rootdev_is_volume=1
  4. Restore the pre-VxVM version of the vfstab file. Note that the vxinstall process makes a backup copy of the original vfstab file named vfstab.prevm. We'll make use of that backup now:
  5. If the install-db file exists, the VxVM daemons will not start on bootup:
    # touch /a/etc/vx/reconfig.d/state.d/install-db
  6. The root-done file indicates that the root disk has been encapsulated. Remove it now:
    # rm /a/etc/vx/reconfig.d/state.d/root-done
  7. Boot from the root device

At this point, the operating system is no longer under Veritas Volume Manager control. The disk c0t3d0 is unused, and the system would not survive the failure of c0t0d0 if it were to die now.

NOTE: Even though the operating system is no longer under system control, in some cases you might wish to continue running Veritas volume manager for non-os volumes. In this situation a few additional steps are required:

  1. Manually start up volume manager processes:
    # rm /etc/vx/reconfig.d/state.d/install-db 
    # vxiod set 10 
    # vxconfigd -m disable 
    # vxdctl enable
  2. Confirm that all previous root volumes are accessible:
  3. Remove the previous root volumes from VxVM:
    # vxedit -rf rm rootvol swapvol var
  4. Remove the root disk from VxVM:
    # vxdg rmdisk rootdisk
  5. Finally, restore the original vtoc to c0t0d0:

At this point the root disk c0t0d0 is completely free of VxVM, but any other Veritas volumes can be brought online and mounted if required.