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.
- Mount the [original rootdg] root filesystem on /a. If root is mirrored, this must be the mirror
which is going to be booted from.
-
Edit the /a/etc/system and /a/etc/vfstab files back to their original
states.
-
Temporarily comment out all other /dev/vx volumes from the /a/etc/vfstab
file.
-
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.
-
Boot the system.
-
Remove the /etc/vx/reconfig.d/state.d/install-db file (and the "root-done"
file if it exists).
- Run these:
# vxiod set 10
# vxconfigd
-
Bring up vxva & remove root volumes recursively from rootdg.
-
Remove the root disk (which has no subdisks on it anymore) from the rootdg
disk group using
AdvancedOpts->DiskGroup->RemoveDisks (or vxdiskadm).
-
Uncomment the "other" (non root) vx entries in the /etc/vfstab file.
-
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.
-
Using 'format', remove the public & private region partitions.
-
Run 'vxdctl enable'.
-
Encapsulate and re-mirror root disk. (vxdiskadm or gui)