I have a volume group that was created out of a 30Gb drive and a logical volume inside it with an ext3 filesystem.

Now the disk has magically "grown" another 30Gb to 60Gb (that is, I changed the physical device attached to the virtual machine...). Parted recognized the change and asked to fix itself (which I did).

How do I make the volume group expand (or "fix" itself) to match the new 60Gb drive?


Actually, I think I got the answer on this one. Having come from HP-UX where LVM is native - and there are no partitions, I forgot something: on PC-based systems, LVM considers a partition to be a "physical device", not the entire disk as is natural in HP-UX LVM.

Thus, when the "disk" was expanded from 30Gb to 60Gb, the partition table tool (parted) saw it - and repaired the "damage" nicely.

However, the "physical disk" that LVM used never changed as the partition never changed size. The proper way to expand the filesystem involved was to:

  1. Expand the volume group (using vgextend) to include the new partition.
  2. Expand the logical volume (using lvextend) to encompass the rest of the space in the new volume group.
  3. Expand the filesystem (in this case, by using resize2fs) to match the new space in the logical volume.

That did it for me.


Rather than creating a new partition you could have also changed the partition size in the partition table to match the new size and then run pvresize.

  • Interesting! I think this is Linux-specific; there is a man page for pvresize available online. – Mei Apr 21 '11 at 23:30

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.