How to migrate bootable disk to VxVM
Migrating the bootable disk to VxVM requires a spare disk to clone the LVM bootable disk. Prior to VxVM Version 4.0, creation of rootdg disk group was mandatory. The standard practice is to use rootdg to allocate the bootable VxVM volume.
In the following example the LVM /dev/vg00 will migrate to /dev/vx/dsk/rootdg.
The system is using c3t2d0 as the current LVM bootable disk. The c3t3d0 will be use to allocate the new VxVM rootdg.
Contents
Check current system status[edit]
# uname -a HP-UX c3650 B.11.11 U 9000/785 2009676210 unlimited-user license
# strings /etc/lvmtab /dev/vg00 /dev/dsk/c3t2d0
# vgdisplay -v /dev/vg00 --- Volume groups --- VG Name /dev/vg00 VG Write Access read/write VG Status available Max LV 255 Cur LV 9 Open LV 9 Max PV 16 Cur PV 1 Act PV 1 Max PE per PV 4393 VGDA 2 PE Size (Mbytes) 8 Total PE 4383 Alloc PE 2139 Free PE 2244 Total PVG 0 Total Spare PVs 0 Total Spare PVs in use 0 --- Logical volumes --- LV Name /dev/vg00/lvol1 LV Status available/syncd LV Size (Mbytes) 512 Current LE 64 Allocated PE 64 Used PV 1 LV Name /dev/vg00/lvol2 LV Status available/syncd LV Size (Mbytes) 4096 Current LE 512 Allocated PE 512 Used PV 1 LV Name /dev/vg00/lvol3 LV Status available/syncd LV Size (Mbytes) 512 Current LE 64 Allocated PE 64 Used PV 1 LV Name /dev/vg00/lvol9 LV Status available/syncd LV Size (Mbytes) 512 Current LE 64 Allocated PE 64 Used PV 1 LV Name /dev/vg00/lvol4 LV Status available/syncd LV Size (Mbytes) 4096 Current LE 512 Allocated PE 512 Used PV 1 LV Name /dev/vg00/lvol5 LV Status available/syncd LV Size (Mbytes) 200 Current LE 25 Allocated PE 25 Used PV 1 LV Name /dev/vg00/lvol6 LV Status available/syncd LV Size (Mbytes) 2072 Current LE 259 Allocated PE 259 Used PV 1 LV Name /dev/vg00/lvol7 LV Status available/syncd LV Size (Mbytes) 512 Current LE 64 Allocated PE 64 Used PV 1 LV Name /dev/vg00/lvol8 LV Status available/syncd LV Size (Mbytes) 4600 Current LE 575 Allocated PE 575 Used PV 1 --- Physical volumes --- PV Name /dev/dsk/c3t2d0 PV Status available Total PE 4383 Free PE 2244 Autoswitch On Proactive Polling On
# swlist -l product VRTSvxvm # Initializing... # Contacting target "c3650"... # # Target: c3650:/ # VRTSvxvm 3.5m Base VERITAS Volume Manager 3.5 for HP-UX
# ioscan -fnkC disk Class I H/W Path Driver S/W State H/W Type Description ======================================================================= disk 0 10/0/14/0.0.0 sdisk CLAIMED DEVICE TSSTcorpCDDVDW SH-S202J /dev/dsk/c0t0d0 /dev/rdsk/c0t0d0 disk 3 10/0/15/1.0.0 sdisk CLAIMED DEVICE MAXTOR ATLAS10K4_36WLS /dev/dsk/c3t0d0 /dev/rdsk/c3t0d0 disk 4 10/0/15/1.1.0 sdisk CLAIMED DEVICE MAXTOR ATLAS10K4_36WLS /dev/dsk/c3t1d0 /dev/rdsk/c3t1d0 disk 5 10/0/15/1.2.0 sdisk CLAIMED DEVICE MAXTOR ATLAS10K4_36WLS /dev/dsk/c3t2d0 /dev/rdsk/c3t2d0 disk 6 10/0/15/1.3.0 sdisk CLAIMED DEVICE MAXTOR ATLAS10K4_36WLS /dev/dsk/c3t3d0 /dev/rdsk/c3t3d0
Migrate system to VxVM[edit]
Converting the root volume group from LVM to VxVM is acomplish using the vxcp_lvmroot command. This commands don't convert the existing volume group to VxVM, it use an spare drive to initializates VxVM and clone the data to the new diskgroup dgroot.
/etc/vx/bin/vxcp_lvmroot [-m mirror_root_da_name] [-R percent] [-v] [-b] [-D] new_root_da_name
If VxVM has not yet been enabled using vxinstall, vxcp_lvmroot enables it before initializing the new disks for VxVM use.
# /etc/vx/bin/vxcp_lvmroot -v c3t3d0 vxcp_lvmroot 01:01: Gathering information on LVM root volume group vg00 vxcp_lvmroot 01:01: Checking specified disk(s) for usability vxcp_lvmroot 01:01: Starting up VxVM vxcp_lvmroot 01:01: Preparing disk c3t3d0 as a VxVM root disk vxcp_lvmroot 01:01: Adding disk c3t3d0 to rootdg as DM rootdisk01 vxcp_lvmroot 01:01: Copying /dev/vg00/lvol1 (hfs) to /dev/vx/dsk/rootdg/standvol vxcp_lvmroot 01:01: Cloning /dev/vg00/lvol2 (swap) to /dev/vx/dsk/rootdg/swapvol vxcp_lvmroot 01:01: Copying /dev/vg00/lvol3 (vxfs) to /dev/vx/dsk/rootdg/rootvol vxcp_lvmroot 01:01: Copying /dev/vg00/lvol9 (vxfs) to /dev/vx/dsk/rootdg/softwarevol vxcp_lvmroot 01:01: Copying /dev/vg00/lvol4 (vxfs) to /dev/vx/dsk/rootdg/optvol vxcp_lvmroot 01:07: Copying /dev/vg00/lvol5 (vxfs) to /dev/vx/dsk/rootdg/tmpvol vxcp_lvmroot 01:07: Copying /dev/vg00/lvol6 (vxfs) to /dev/vx/dsk/rootdg/usrvol vxcp_lvmroot 01:10: Copying /dev/vg00/lvol7 (vxfs) to /dev/vx/dsk/rootdg/homevol vxcp_lvmroot 01:10: Copying /dev/vg00/lvol8 (vxfs) to /dev/vx/dsk/rootdg/varvol vxcp_lvmroot 01:12: Setting up disk c3t3d0 as a boot disk vxcp_lvmroot 01:12: Installing fstab and fixing dev nodes on new root FS vxcp_lvmroot 01:12: Installing bootconf & rootconf files in new stand FS vxcp_lvmroot 01:12: Disk c3t3d0 is now a VxVM rootable boot disk
# setboot Primary bootpath : 10/0/15/1.6.0 Alternate bootpath : 10/0/15/1.2.0 Autoboot is ON (enabled) Autosearch is OFF (disabled)
# setboot -p 10/0/15/1.3.0 # setboot Primary bootpath : 10/0/15/1.3.0 Alternate bootpath : 10/0/15/1.2.0 Autoboot is ON (enabled) Autosearch is OFF (disabled)
Check VxVM status after reboot[edit]
# bdf Filesystem kbytes used avail %used Mounted on /dev/vx/dsk/rootdg/rootvol 524288 137655 362522 28% / /dev/vx/dsk/rootdg/standvol 513000 38359 423341 8% /stand /dev/vx/dsk/rootdg/varvol 4710400 888391 3583173 20% /var /dev/vx/dsk/rootdg/usrvol 2121728 1228566 837354 59% /usr /dev/vx/dsk/rootdg/tmpvol 204800 1167 190910 1% /tmp /dev/vx/dsk/rootdg/softwarevol 524288 194112 309546 39% /software /dev/vx/dsk/rootdg/optvol 4194304 2732933 1370047 67% /opt /dev/vx/dsk/rootdg/homevol 524288 25504 467641 5% /home
# vxprint -rht Disk group: rootdg DG NAME NCONFIG NLOG MINORS GROUP-ID DM NAME DEVICE TYPE PRIVLEN PUBLEN STATE RV NAME RLINK_CNT KSTATE STATE PRIMARY DATAVOLS SRL RL NAME RVG KSTATE STATE REM_HOST REM_DG REM_RLNK V NAME RVG KSTATE STATE LENGTH READPOL PREFPLEX UTYPE PL NAME VOLUME KSTATE STATE LENGTH LAYOUT NCOL/WID MODE SD NAME PLEX DISK DISKOFFS LENGTH [COL/]OFF DEVICE MODE SV NAME PLEX VOLNAME NVOLLAYR LENGTH [COL/]OFF AM/NM MODE DC NAME PARENTVOL LOGVOL SP NAME SNAPVOL DCO dg rootdg default default 0 1202281276.1025.c3650 dm rootdisk01 c3t3d0 simple 1024 35911593 - v homevol - ENABLED ACTIVE 524288 SELECT - fsgen pl homevol-01 homevol ENABLED ACTIVE 524288 CONCAT - RW sd rootdisk01-08 homevol-01 rootdisk01 12288000 524288 0 c3t3d0 ENA v optvol - ENABLED ACTIVE 4194304 SELECT - fsgen pl optvol-01 optvol ENABLED ACTIVE 4194304 CONCAT - RW sd rootdisk01-05 optvol-01 rootdisk01 5767168 4194304 0 c3t3d0 ENA v rootvol - ENABLED ACTIVE 524288 SELECT - root pl rootvol-01 rootvol ENABLED ACTIVE 524288 CONCAT - RW sd rootdisk01-03 rootvol-01 rootdisk01 4718592 524288 0 c3t3d0 ENA v softwarevol - ENABLED ACTIVE 524288 SELECT - fsgen pl softwarevol-01 softwarevol ENABLED ACTIVE 524288 CONCAT - RW sd rootdisk01-04 softwarevol-01 rootdisk01 5242880 524288 0 c3t3d0 ENA v standvol - ENABLED ACTIVE 524288 SELECT - fsgen pl standvol-01 standvol ENABLED ACTIVE 524288 CONCAT - RW sd rootdisk01-01 standvol-01 rootdisk01 0 524288 0 c3t3d0 ENA v swapvol - ENABLED ACTIVE 4194304 SELECT - swap pl swapvol-01 swapvol ENABLED ACTIVE 4194304 CONCAT - RW sd rootdisk01-02 swapvol-01 rootdisk01 524288 4194304 0 c3t3d0 ENA v tmpvol - ENABLED ACTIVE 204800 SELECT - fsgen pl tmpvol-01 tmpvol ENABLED ACTIVE 204800 CONCAT - RW sd rootdisk01-06 tmpvol-01 rootdisk01 9961472 204800 0 c3t3d0 ENA v usrvol - ENABLED ACTIVE 2121728 SELECT - fsgen pl usrvol-01 usrvol ENABLED ACTIVE 2121728 CONCAT - RW sd rootdisk01-07 usrvol-01 rootdisk01 10166272 2121728 0 c3t3d0 ENA v varvol - ENABLED ACTIVE 4710400 SELECT - fsgen pl varvol-01 varvol ENABLED ACTIVE 4710400 CONCAT - RW sd rootdisk01-09 varvol-01 rootdisk01 12812288 4710400 0 c3t3d0 ENA