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
pvresizeand 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" ?