For this example the primary device "rootdisk" is mirrored to "rootdg01".
#vxprint -ht -g rootdg
dm rootdisk c0t0d0s2 sliced 3023 16836624 -
dm rootdg01 c1t14d0s2 sliced 3199 17908800 -
v opt - ENABLED ACTIVE 4547088 ROUND - fsgen
pl opt-01 opt ENABLED ACTIVE 4547088 CONCAT - RW
sd rootdisk-05 opt-01 rootdisk 12289535 4547088 0 c0t0d0 ENA
pl opt-02 opt ENABLED ACTIVE 4547200 CONCAT - RW
sd rootdg01-01 opt-02 rootdg01 0 4547200 0 c1t14d0 ENA
v rootvol - ENABLED ACTIVE 3072384 ROUND - root
pl rootvol-01 rootvol ENABLED ACTIVE 3072384 CONCAT - RW
sd rootdisk-B0 rootvol-01 rootdisk 16836623 1 0 c0t0d0 ENA
sd rootdisk-02 rootvol-01 rootdisk 0 3072383 1 c0t0d0 ENA
pl rootvol-02 rootvol ENABLED ACTIVE 3073600 CONCAT - RW
sd rootdg01-02 rootvol-02 rootdg01 4547200 3073600 0 c1t14d0 ENA
v swapvol - ENABLED ACTIVE 2036160 ROUND - swap
pl swapvol-01 swapvol ENABLED ACTIVE 2036160 CONCAT - RW
sd rootdisk-01 swapvol-01 rootdisk 3084479 2036160 0 c0t0d0 ENA
pl swapvol-02 swapvol ENABLED ACTIVE 2036800 CONCAT - RW
sd rootdg01-03 swapvol-02 rootdg01 7620800 2036800 0 c1t14d0 ENA
v usr - ENABLED ACTIVE 3072384 ROUND - fsgen
pl usr-01 usr ENABLED ACTIVE 3072384 CONCAT - RW
sd rootdisk-04 usr-01 rootdisk 5120639 3072384 0 c0t0d0 ENA
pl usr-02 usr ENABLED ACTIVE 3073600 CONCAT - RW
sd rootdg01-04 usr-02 rootdg01 9657600 3073600 0 c1t14d0 ENA
v var - ENABLED ACTIVE 4096512 ROUND - fsgen
pl var-01 var ENABLED ACTIVE 4096512 CONCAT - RW
sd rootdisk-03 var-01 rootdisk 8193023 4096512 0 c0t0d0 ENA
pl var-02 var ENABLED ACTIVE 4097600 CONCAT - RW
sd rootdg01-05 var-02 rootdg01 12731200 4097600 0 c1t14d0 ENA
#FORMAT Partition table printout for rootdisk:
* First Sector Last
* Partition Tag Flags Sector Count Sector Mount Directory
0 2 00 0 3072384 3072383
1 3 01 3084480 2036160 5120639
2 5 00 0 16839648 16839647
3 9 00 12289536 4547088 16836623
4 4 00 5120640 3072384 8193023
5 7 00 8193024 4096512 12289535
6 14 01 0 16839648 16839647
7 15 01 16836624 3024 16839647
Procedure:
1. Ensure the system is booted off the primary boot disk so the mirror can be removed.
# prtconf -vp | grep bootpath
2. Remove all the mirror plexes for the boot volumes in rootdg that belong to the secondary disk. This will remove the secondary plexes that belong to the mirror disk(note -02 for the plex):
Example:
# vxplex -o rm dis opt-02
# vxplex -o rm dis rootvol-02
# vxplex -o rm dis swapvol-02
# vxplex -o rm dis usr-02
# vxplex -o rm dis var-02
Note the secondary plexes have been removed:
# vxprint -htg rootdg
v opt - ENABLED ACTIVE 4547088 ROUND - fsgen
pl opt-01 opt ENABLED ACTIVE 4547088 CONCAT - RW
sd rootdisk-05 opt-01 rootdisk 12289535 4547088 0 c0t0d0 ENA
v rootvol - ENABLED ACTIVE 3072384 ROUND - root
pl rootvol-01 rootvol ENABLED ACTIVE 3072384 CONCAT - RW
sd rootdisk-B0 rootvol-01 rootdisk 16836623 1 0 c0t0d0 ENA
sd rootdisk-02 rootvol-01 rootdisk 0 3072383 1 c0t0d0 ENA
v swapvol - ENABLED ACTIVE 2036160 ROUND - swap
pl swapvol-01 swapvol ENABLED ACTIVE 2036160 CONCAT - RW
sd rootdisk-01 swapvol-01 rootdisk 3084479 2036160 0 c0t0d0 ENA
v usr - ENABLED ACTIVE 3072384 ROUND - fsgen
pl usr-01 usr ENABLED ACTIVE 3072384 CONCAT - RW
sd rootdisk-04 usr-01 rootdisk 5120639 3072384 0 c0t0d0 ENA
v var - ENABLED ACTIVE 4096512 ROUND - fsgen
pl var-01 var ENABLED ACTIVE 4096512 CONCAT - RW
sd rootdisk-03 var-01 rootdisk 8193023 4096512 0 c0t0d0 ENA
3. Ensure every volume has an underlying slice otherwise upon reboot the missing partition will not mount. Verify that the plex sector count matches an underlying partition sector "Count" from the format output.
Example plex output:
pl opt-01 opt ENABLED ACTIVE 4547088 <- Verify that these sector numbers match to the format Count column
pl rootvol-01 rootvol ENABLED ACTIVE 3072384
pl swapvol-01 swapvol ENABLED ACTIVE 2036160
pl usr-01 usr ENABLED ACTIVE 3072384
pl var-01 var ENABLED ACTIVE 4096512
FORMAT Partition table output:
* Partition Tag Flags Sector Count Sector Mount Directory
0 2 00 0 3072384 3072383 /root = rootvol-01
1 3 01 3084480 2036160 5120639 /swap = swapvol-01
2 5 00 0 16839648 16839647 whole disk
3 9 00 12289536 4547088 16836623 /opt = opt-01
4 4 00 5120640 3072384 8193023 /usr = usr-01
5 7 00 8193024 4096512 12289535 /var = var-01
6 14 01 0 16839648 16839647 volume manager public region
7 15 01 16836624 3024 16839647 volume manager private region
4. Once step 3 has been verified. Run the vxunroot command to un-encapsulate the primary rootdisk:
# /etc/vx/bin/vxunroot
This operation will convert the following file systems from volumes to regular partitions:
rootvol swapvol usr var opt
Replace the volumes in root disk to partitions. This operation will require a system reboot. If you choose to continue with this operation, system configuration will be updated to discontinue use of the volume manager for your root and swap devices.
Do you wish to do this now [y,n,q,?] (default: y) y
Restoring kernel configuration...
A shutdown is now required to install the new kernel.
You can choose to shutdown now, or you can shutdown later, at your convenience.
Do you wish to shutdown now [y,n,q,?] (default: n)y
5. Verify you are booted off of native slices by doing a df -k
# df -k
6. To re-encapsulate the boot drive run the vxdiskadm command selecting option 2.
# vxdiskadm (option 2)
7. After encapsulation, and rebooting, add the rootmirror device back to rootdg, and mirror with vxdiskadm option 6 if desired.
# vxdg -g rootdg adddisk rootmirror=c#t#d#
# vxdiskadm (option 6)