LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to split volume group (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-split-volume-group-838245/)

thandarsuresh 10-15-2010 07:33 AM

how to split volume group
 
i have created two physical volumes, later added volume group to it and then created logical volume and formated the logical volume n mounted it on directory now now i wanted to split the volume group but am unable to do it.If i tries it error msg displayed as existing volume group is active and i have to inactive that volume group how to do it pls help?

rayfordj 10-15-2010 07:39 AM

- ensure that all LV are unmounted
run lvs and look for o under the Attr column.
example: -wi-ao
example: -wi-a-
what you want is for the LVs in the VG you want to split to be like the 2nd example

- run vgchange -an <VolumeGroupName>
this will deactivate the VG that you want to split
you should then be able to proceed

catkin 10-15-2010 08:09 AM

I'm not sure what you mean by "split a VG"; you can remove PVs from it and add PVs to it. Before removing a PV from a VG you have to move any LVs in it to (an)other PV(s) in the VG. The pvmove command can do that.

rayfordj 10-15-2010 04:19 PM

Quote:

Originally Posted by catkin (Post 4128446)
I'm not sure what you mean by "split a VG"; you can remove PVs from it and add PVs to it. Before removing a PV from a VG you have to move any LVs in it to (an)other PV(s) in the VG. The pvmove command can do that.

While not directly stated, my assumption was thandarsuresh intends to use the vgsplit command which helps automate some of the steps that you are referring and retains the LV(s).

Quote:

Originally Posted by man 8 vgsplit
NAME
vgsplit - split a volume group into two

...

DESCRIPTION
vgsplit moves one or more physical volumes from SourceVolumeGroupName
into DestinationVolumeGroupName. The physical volumes moved can be
specified either explicitly via PhysicalVolumePath, or implicitly by -n
LogicalVolumeName, in which case only physical volumes underlying the
specified logical volume will be moved.

...


catkin 10-16-2010 08:36 AM

Thanks rayfordj :)


All times are GMT -5. The time now is 11:19 PM.