Problem
How to break off a mirror of a VxVM root disk to create a separate root disk
Solution
The vxbrk_rootmir utility is introduced with VxVM 3.5 patch08 patch PHCO_33362 for HP-UX 11iv1 and it is embedded with Storage Foundation 4.1/5.0 for HP-UX 11iv2 and 11iv3.
For HP-UX 11.23 on 3.5, the vxbrk_rootmir utility can be obtained by applying vm-hpux1123-3.5RP9, the relavant HP-UX patches are PHKL_41281 and PHCO_41280.
The vxbrk_rootmir command creates a mirror of a VERITAS Volume Manager (VxVM) rootable boot disk, breaks the mirror, and then makes the broken-off mirror into a completely separate root disk that is suitable for booting by itself. It is highly recommended prior to making major changes such as installing software/patches or making kernel changes.
1. Create the break-off root disk
# /etc/vx/bin/vxbrk_rootmir -vb daname|dmname
Options
-b Uses the setboot command to set the alternate boot disk to the specified disk.
-v Displays verbose output, including timestamps for operations that are in progress.
daname Specifies the disk to be used as the broken off mirror by its disk access name (such as c0t2d0)
dmname Specifies the disk to be used as the broken off mirror by its disk media name (such as rootdisk02)
2. Boot off the break off root disk to make sure it is bootable.
3. Install software/patches or make kernel changes which would occur only on the primary disk.
4. If the system is not bootable after software/patch installation or kernel changes, boot off the break-off root disk (since the changes have no impact on the break-off root disk)
5. If the system comes up fine, re-mirror the root disk via /etc/vx/bin/vxrootmir utility
dg rootdg default default 4293000 1235408321.26.mtvrp401
dm rootdisk01 c2t0d0 auto 1024 71684200 -
dm rootdisk02 c2t1d0 auto 1024 71684200 -
v homevol - ENABLED ACTIVE 114688 SELECT - fsgen
pl homevol-01 homevol ENABLED ACTIVE 114688 CONCAT - RW
sd rootdisk01-08 homevol-01 rootdisk01 34816000 114688 0 c2t0d0 ENA
pl homevol-02 homevol ENABLED ACTIVE 114688 CONCAT - RW
sd rootdisk02-08 homevol-02 rootdisk02 34816000 114688 0 c2t1d0 ENA
v optvol - ENABLED ACTIVE 6144000 SELECT - fsgen
pl optvol-01 optvol ENABLED ACTIVE 6144000 CONCAT - RW
sd rootdisk01-04 optvol-01 rootdisk01 11763712 6144000 0 c2t0d0 ENA
pl optvol-02 optvol ENABLED ACTIVE 6144000 CONCAT - RW
sd rootdisk02-04 optvol-02 rootdisk02 11763712 6144000 0 c2t1d0 ENA
v rootvol - ENABLED ACTIVE 1540096 SELECT - root
pl rootvol-01 rootvol ENABLED ACTIVE 1540096 CONCAT - RW
sd rootdisk01-03 rootvol-01 rootdisk01 10223616 1540096 0 c2t0d0 ENA
pl rootvol-02 rootvol ENABLED ACTIVE 1540096 CONCAT - RW
sd rootdisk02-03 rootvol-02 rootdisk02 10223616 1540096 0 c2t1d0 ENA
v standvol - ENABLED ACTIVE 1835008 SELECT - fsgen
pl standvol-01 standvol ENABLED ACTIVE 1835008 CONCAT - RW
sd rootdisk01-01 standvol-01 rootdisk01 0 1835008 0 c2t0d0 ENA
pl standvol-02 standvol ENABLED ACTIVE 1835008 CONCAT - RW
sd rootdisk02-01 standvol-02 rootdisk02 0 1835008 0 c2t1d0 ENA
v swapvol - ENABLED ACTIVE 8388608 SELECT - swap
pl swapvol-01 swapvol ENABLED ACTIVE 8388608 CONCAT - RW
sd rootdisk01-02 swapvol-01 rootdisk01 1835008 8388608 0 c2t0d0 ENA
pl swapvol-02 swapvol ENABLED ACTIVE 8388608 CONCAT - RW
sd rootdisk02-02 swapvol-02 rootdisk02 1835008 8388608 0 c2t1d0 ENA
v tmpvol - ENABLED ACTIVE 524288 SELECT - fsgen
pl tmpvol-01 tmpvol ENABLED ACTIVE 524288 CONCAT - RW
sd rootdisk01-05 tmpvol-01 rootdisk01 17907712 524288 0 c2t0d0 ENA
pl tmpvol-02 tmpvol ENABLED ACTIVE 524288 CONCAT - RW
sd rootdisk02-05 tmpvol-02 rootdisk02 17907712 524288 0 c2t1d0 ENA
v usrvol - ENABLED ACTIVE 6144000 SELECT - fsgen
pl usrvol-01 usrvol ENABLED ACTIVE 6144000 CONCAT - RW
sd rootdisk01-06 usrvol-01 rootdisk01 18432000 6144000 0 c2t0d0 ENA
pl usrvol-02 usrvol ENABLED ACTIVE 6144000 CONCAT - RW
sd rootdisk02-06 usrvol-02 rootdisk02 18432000 6144000 0 c2t1d0 ENA
v varvol - ENABLED ACTIVE 10240000 SELECT - fsgen
pl varvol-01 varvol ENABLED ACTIVE 10240000 CONCAT - RW
sd rootdisk01-07 varvol-01 rootdisk01 24576000 10240000 0 c2t0d0 ENA
pl varvol-02 varvol ENABLED ACTIVE 10240000 CONCAT - RW
sd rootdisk02-07 varvol-02 rootdisk02 24576000 10240000 0 c2t1d0 ENA
# /etc/vx/bin/vxbrk_rootmir -v rootdisk02
VxVM vxbrk_rootmir INFO V-5-2-4023 10:42: Checking specified disk(s) for presence and type
VxVM vxbrk_rootmir INFO V-5-2-4025 10:42: DA c2t1d0, DM rootdisk02 is a valid root mirror
VxVM vxbrk_rootmir INFO V-5-2-4052 10:42: Saving configuration data for later restoration
VxVM vxbrk_rootmir INFO V-5-2-4022 10:42: Breaking off root mirror on DA c2t1d0
VxVM vxbrk_rootmir INFO V-5-2-4054 10:42: Setting broken off mirror on c2t1d0 as unique root disk
VxVM vxbrk_rootmir INFO V-5-2-2566 10:42: Preparing disk c2t1d0 as a VxVM root disk
VxVM vxbrk_rootmir INFO V-5-2-4046 10:42: Patching devnodes, fstab and volboot file in new Root FS
VxVM vxbrk_rootmir INFO V-5-2-4045 10:42: Patching /stand/bootconf file to contain new root disk
VxVM vxbrk_rootmir INFO V-5-2-4055 10:42: Setting dg_name field to rootdg on new root disk c2t1d0
VxVM vxbrk_rootmir INFO V-5-2-4028 10:42: Disk c2t1d0 is now a broken off root disk
#vxdisk -o alldgs list | grep rootdg
c2t0d0 auto:hpdisk rootdisk01 rootdg online
c2t1d0 auto:hpdisk - (rootdg) online