Technology / Software / 

02 Apr 2017

Expanding an LVM Volume

This is the “quick method” — it doesn’t specify the physical volume, so it defaults to the current PV that the LV is on, if it has enough space. If you only have one PV, well, that’s not likely to be a problem.

lvextend -L200G /dev/myserver/video

Where 200G is the total size, and /dev/myserver/video is the VG. To increase size by a specific amount rather than specifying the LV total, do -L+10G to increase by 10GiB.

This increases the size of the virtual disk (block device), after which you need to increase the formatted capacity:

resize2fs /dev/myserver/video

Note: This takes a significant amount of time and creates a lot of disk I/O.