LVM Cheatsheet

Just for me to remember the most basic commands:

pvdisplay List physical devices.
vgdisplay List volume groups.
lvdisplay List logical volumes.

lvmdiskscan List devices that may be used as physical volumes

lvextend Extend logical volume (by percent, up to specified size or by amount)
resize2fs Resize file system after extending a logical volume

pvcreate Create physical volume
vgcreate Create volume group
lvcreate Create logical volume (Size in GB or 100% of Free space)
vgextend Add physical volume to group (“Extend volume group”)

If you add a new logical volume that you want to mount on startup, do not forget to add a line to /etc/fstab:

$ vim /etc/fstab
# <logical-volume-name> <mount-point> <file-system-type> <options> <dump> <pass>
/dev/mapper/vg00-root   /    ext4    defaults        1 1

Commands roughly taken from these links:

Some more in-depth readings:

Here is some insight into /etc/fstab: