Contributed by Doug Hughes


This procedure was given to me by a Sun engineer after the primary rootdg had failed, I was running off the mirror, and I had somehow bolloxed up replacement of the rootdg disk with vxdiskadm. I ended up creating a new clean set of filesystems on the replaced disk with tar and using this procedure.

Other situations where this might be useful: The fact that rootdisk is encapsulated, means that replacing it by just using vxdiskadm doesn't work very well. It will replace the disk, but the result will no longer be encapsulated. You'll have a vm-ified rootdisk which can make upgrades of the VM software in place difficult if not impossible. This procedure is useful for that situation.

  1. Mount the [original rootdg] root filesystem on /a. If root is mirrored, this must be the mirror which is going to be booted from.
  2. Edit the /a/etc/system and /a/etc/vfstab files back to their original states.
  3. Temporarily comment out all other /dev/vx volumes from the /a/etc/vfstab file.
  4. Touch /a/etc/vx/reconfig.d/state.d/install-db. WHY? Because IF the root disk contains mirrors, and the system boots up, the mirrors will get resynced, corrupting the changes we just made. If there is no mirror, there's no reason to do this step, or steps 6, or 7 below.
  5. Boot the system.
  6. Remove the /etc/vx/reconfig.d/state.d/install-db file (and the "root-done" file if it exists).
  7. Run these:
    # vxiod set 10
    # vxconfigd
  8. Bring up vxva & remove root volumes recursively from rootdg.
  9. Remove the root disk (which has no subdisks on it anymore) from the rootdg disk group using AdvancedOpts->DiskGroup->RemoveDisks (or vxdiskadm).
  10. Uncomment the "other" (non root) vx entries in the /etc/vfstab file.
  11. Reboot the system. WHY? So that all the bootup time recovery happens with the volumes, and just to prove to yourself and to customer that the system can boot fine. Also, the other daemons need to be started.
  12. Using 'format', remove the public & private region partitions.
  13. Run 'vxdctl enable'.
  14. Encapsulate and re-mirror root disk. (vxdiskadm or gui)