2

In RedHat Linux, can I grow a filesystem using space from another volume group ? The space on the existing VG is filling up but I have an additional VG that has sufficient space. However, I dont want to destory the existing filesystem ; I just want to extend/grow it into the additional VG.

  • More detail. What's the server setup? You may have options to expand the VG. – ewwhite Jan 29 '18 at 20:10
3

Volume groups are separate and distinct from each other, and it is not possible to have a single logical volume in more than one volume group.

Volume groups are comprised of one or more physical volumes; it is physical volumes that a volume group is a group of.

In order to gain more space in one volume group, you will need to either enlarge one of its physical volumes, or add another physical volume to it.

In order to reduce space used by one volume group, you will need to either remove a physical volume from it, or shrink one of its physical volumes. Both of these operations must be performed carefully in order to avoid data loss.

Given your circumstances, it is probably not possible to do what you want. You might describe your storage setup in more detail, though, and it may be possible to find a solution.

  • Could you use a logical volume in one volume group as a physical volume for another volume group? – Peter Green Jan 29 '18 at 19:50
  • 1
    Volumes all the way down? Maybe, but it sounds like a recipe for confusion and eventual disaster. I wouldn't even consider it without some evidence that it wouldn't crash and burn spectacularly in some way... – Michael Hampton Jan 29 '18 at 19:53
2

No. One volume can belong to only to one volume group, that is the point of a volume group.

But you can merge 2 volume groups into 1:

  1. Umount all filesystems first which come from the 2 volume groups!
  2. Deactivate the 2nd volumegroup (vg02):

    vgchange -an vg02

  3. merge vg02 into vg01:

    vgmerge vg01 vg02

  4. activate the volume(s) were merged from vg02:

    lvchange -ay vg01/lv02

1

Generally, I believe the answer is no, that a single filesystem, and the underlying logical volume cannot span a volume group. There are filesystems like ZFS that could do this though it wouldn't be a good idea, and you almost certainly aren't using that on LVM, that would be extremely unusual.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.