I'm building out a VM image in VMWare/CentOS that will be copied and brought up a multiple boxes. When I initially set it up, I made the disk size too small, but did not realize it until all the configuration was done. I expanded the disk in VMWare, and it shows up in the VM fine.

I realize I can create a new partition with the space and add that to the Volume group. My issue with that is I want to keep this as clean as possible and would rather not have to carry around that extra partition for the next 5 years.

Can I resize the existing /dev/sda2 "Linux LVM" partition that the volume group is already using, then "vgextend" the volume group to use the expanded underlying partition. Something like "resize2fs" for volume groups?


Yes, you can absolutely resize the existing partition. Just make sure that the new/resized partition starts from the same location. After that (and rebooting, so that Linux recognizes the new size of the in-use partition) run pvresize on the PV and after that vgs or vgdisplay should show more space.

| improve this answer | |
  • Perfect - I was missing the pvresize. That worked – John P Dec 6 '13 at 18:00
  • The best way to thank is to vote up and mark the question as answered – ptman Dec 6 '13 at 18:01

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.