VxVM to LVM conversion

 
J. Deverel
Occasional Advisor

VxVM to LVM conversion

Is there any way to convert a VxVM rootdg to LVM other than vgrestore ?

This server is hpux 11.23 and was built with VxVM long time ago. So, using vgrestore is not even an option I think.

If I take an ignite image and do an interactive restore, can I chose to have LVM instead of VxVM at the time of restore ? Or will I be required to take a filesystem backup, rebuild the system with LVM and restore from the image ?
3 REPLIES 3
Abid Iqbal
Regular Advisor

Re: VxVM to LVM conversion

boukari
Frequent Advisor

Re: VxVM to LVM conversion

Hi,
I copied this for you from an others post , it seem to contain what u want :
______________________________

Note: It is always recommended that prior to making any changes to the system to create an Ignite backup, fbackup and/or backup your system in the event you need to recover your system back to a usable stable state. You may obtain the latest Ignite product and associated PAX patch at the following URL:
http://www.docs.hp.com/en/IUX/

1) - Create another Ignite tape using make_tape_recovery â  x inc_entire=vg00 â  p. This will be the tape you will use to migrate from VxVM to LVM.

2) - Edit the /var/opt/ignite/recovery/latest/system_cfg file to remove the vxvm Disk/Filesystem Layout and replace it with LVM Disk/ Filesystem Layout.

3) - Continue creating the Ignite tape using make_tape_recovery â  r.

4) - Recover the system using the new Ignite tape with the LVM Disk/Filesystem Layout.


Editing the system_cfg file:
The only differences in the /var/opt/ignite/recovery/latest/system_cfg files between VxVM and LVM Disk/ Filesystem Layouts is the portion titled â  Disk and Filesystemsâ  . You will also notice that the order of the logical volumes in the VxVM system_cfg file do not reflect the numerical order you would see in the LVM system_cfg file. There is no need to reorder the lvols. Just make sure to use the correct minor number for each lvol especially lvol1, lvol2 and lvol3.

1) make_tape_recovery â  x inc_entire=vg00 -p
2) cd /var/opt/ignite/recovery/latest
3) cp system_cfg to system_cfg.orig
4) vi system_cfg
5) remove the line VxVM_hostid=â  loopbackâ Â
6) change volume_group=â  rootdgâ  to volume_group=â  vg00â Â
7) change the usage=â  VXVMâ  to usage=â  LVMâ Â
8) change logical_volume   standvol to logical_volume â  lvol1â Â
9) add line bad_block_relocate=false just after largefiles=false line
10) add line minor_number=0x01 just after stripe_size=0
11) Follow the same steps for swap and root lvols.


On the remaining lvols;
12) Edit the lvolname to reflect the default logical volume number.
13) Add line bad_block_relocate=true just after largefiles=false line â ¦ note that the bad_block_relocate line is false for lvol1 through lvol3
14) Change contiguous_allocation=true to contiguous_allocation=false
15) Add the minor_number=0x0# to reflect the proper minor number for that logical volume.


Defaults:
Mountpoint Logical Volume Minor Number
/stand lvol1 0x01
swap lvol2 0x02
/ lvol3 0x03
/tmp lvol4 0x04
/home lvol5 0x05
/opt lvol6 0x06
/usr lvol7 0x07
/var lvol8 0x08

Hope that helps you,
Best Regards,
BCS SW/HW GSC Engineer (L1)
IEEE Student Member
LPI 3 CORE & High Availability
VCP Vshpere 5 Datacenter
Novell CLA and Data Center specialist Certified
.....
Microsoft Partner & Microsoft student Partner
Karl Bull
Visitor

Re: VxVM to LVM conversion

I performed a VxVM to LVM conversion recently. A make_net_recovery image was taken of the entire vg00. During the interactive restore of that image you will find options to move away from VxVM and use LVM instead. It isn't obvious how you do it. Basically, perform an interactive restore of the make_net_recovery and delete the current VxVM definitions that appear under the FS menu system and define the LVM volumes you want to use. The process works well. I also resized and renamed each LV too.