Operating System - HP-UX
1832616 Members
3370 Online
110043 Solutions
New Discussion

Re: To merge two volume groups into one

 
Deepu Chakravarty
Regular Advisor

To merge two volume groups into one

I have two volume groups (/dev/vg08 and /dev/vg11). /vg08 has 10238 mb total PE available. /vg11 has 15357 mb total PE available. Both have PE Size (Mbytes)is 4.
My objective is to merge these two vgs into anyone(either to /vg08 or to /vg11). So that after merger I will have 100 GB available in any one vg(whereever merger takes place).
Help is required to achieve this objective.
Thanks.
5 REPLIES 5
Pedro Cirne
Esteemed Contributor

Re: To merge two volume groups into one

Hi,

Do you want to keep the information you have on VG, or simply erase everything and make a new one?

Enjoy :)

Pedro
DCE
Honored Contributor

Re: To merge two volume groups into one

About the only way to do this is remove(destroy) one of the volume groups, and then add the disks to the remaining VG

Back up your data

remove all the disks from the VG you no longer want


Add the disks to the desired VG

Depending on your comfort level, this can be done with SAM or the command line

command line (do a man for further info)
lvremove
vgreduce
vgremove

vgextend
lvcreate
lvextend
baiju_3
Esteemed Contributor

Re: To merge two volume groups into one

You have to distroy one of the VG .Which ever having less important data you select for this .

Find out PVs belonging to VG with VG display .
Unmount file systems ,
vgchange -a n vg
vgexport vg
pvcreate -f rdisks.

vgextend the other volume group with these freed disks from other VG.

Hope this will help.
Thanks,
BL.
Good things Just Got better (Plz,not stolen from advertisement -:) )
Bill Hassell
Honored Contributor

Re: To merge two volume groups into one

You'll have to destroy one of the VGs so you can remove the disk(s). Than use vgextend to add the removed disks. All of this depends on whether your current VG has enough extent capacity to handle the additional disks. You'll find out when you add the disks with vgextend. If the extent count exceeds the capacity of the current VG, you'll have to destroy the VG and recreate a new VG.


Bill Hassell, sysadmin
Pete Randall
Outstanding Contributor

Re: To merge two volume groups into one

I suspect that your max PE and PE size is going to prevent expansion of either one of the Volume groups to a size necessary to accomodate both. Your only choice, then is to destroy both and recreate a new VG from scratch, then restoring your data into the new VG.


Pete

Pete