When you have virtual machines, the size of disks can be changed, and specifically, increased. That makes the problem of resizing LVM a bit more complex than on a physical server.

There are three possibilities that come to mind :

  • Extend the virtual disk, either by :
    • Creating a new partition on the disk using the new blocks created, create a new Physical Volume, and add it to the VolumeGroup
    • Extending the partition, and then its Physical Volume with pvresize and so on.
  • Add a new virtual disk, create a partition, a physical volume and add it to the VolumeGroup

My limited experience of production environnements doesn't help me figure out if there is drawbacks in some of those solutions in terms of long-time maintainability, risks of extended outages, risks of data loss.

From your experiences, which of those solutions would have less drawbacks in order to become the "production best practice" ?


Not sure how well it applies to Linux, but resize operations on VMs don't really having any drawbacks when dealing with Windows VMs(on VMware). I've done all three of the above scenarios within Server 2012, and suffer no ill effects from any of them. I do know that adding an entirely new virtual disk results in a new 'vmdk' file being created in the case of VMware, but otherwise nothing really changes.

Typically we keep adding space to the primary virtual disk, and create new logical partitions to serve as the 'drives' within the OS. The keeps our VMs within a single file(so to speak) and makes it easier to deal with a by-hand migration should something occur. There are a some cases where we created new virtual disks though, such as our main SQL DB. It really depends on what you are planning for. From what I have encountered, it seems most Orgs try and keep their VMs with one virtual disk and add space/partitions to that, unless they have a good reason to do otherwise.

| improve this answer | |
  • Thanks for the general insights. In my case, it's the Oracle partition that needs to be extended most of the time. I'll wait for answers about the particular case of LVM, though. – mveroone Apr 15 '14 at 7:42
  • Understandable, just figured I'd let you know what it looks like on this side of the fence. – Lee Harrison Apr 15 '14 at 15:25

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.