I recently ran out of space on a VirtualBox VM (CentOS guest) managed by Vagrant. It was using a .vmdk image, so I couldn't dynamically resize it. Following these instructions, I cloned the old image to a new, much larger vdi image, then attempted to resize the old partition using the GParted LiveCD. Unfortunately, even though I can see that the backing device is much larger, the partition (which is managed by LVM, since it is a CentOS guest) is displayed with a lock icon, and I can't resize it. I don't understand why the partition is locked: I'm using a LiveCD, so the FS is shouldn't be mounted (at least as I understand these things). Any suggestions on what I've done wrong? Thanks.

  • 4
    I think your issue is that GParted doesnt manage LVM partitions. I am not sure how to solve this, but I think you may need to create another regular (extended) partition from the free space, add it to the volume group, then extend your LVM volume to cover the created space, and then finally extend the file system. Essentially a manual process with command line tools.
    – nwaltham
    May 4, 2012 at 14:24
  • 1
    @user859955 GParted still doesn't handle LVM partitions? :-( Thank you very much.
    – Hank Gay
    May 4, 2012 at 15:05

1 Answer 1


The process appears to be:

  1. create a new partition in your newly available free space; your choice of filesystem doesn't much matter, as we will change it later
  2. reboot into the system
  3. use cfdisk to flag the new partition as Linux LVM instead of whatever you chose above
  4. use pvcreate to flag your new partition as a physical volume for LVM
  5. use vgextend to add your new physical volume to your existing VolumeGroup
  6. use lvresize to expand your desired logical volume with the new space in its volume group
  7. use resize2fs to grow your fs to use the new space on your logical volume (I hope your filesystem supports online resizing)
  8. enjoy your now-spacious VM.
  • Rather than create a new partition, you should use use parted or fdisk in sector mode to delete the existing partition, and recreate it with the exact same starting sector, but a larger size. Then run pvresize to extend the pv, and then you can use lvresize and resize2fs.
    – psusi
    May 5, 2012 at 2:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .