Extending a LVM partition
Recently I needed to extend/increase a LVM partition to give it more space:
- Create a partition on the additional disk: cfdisk /dev/sdb
- Create a physical volume on the partition: pvcreate /dev/sdb1
- Add the physical volume to the existing volume group: vgextend vg-foo /dev/sdb1
- Extend the logical volume to use 100% of the new free space in the volume group (and directly resize the filesystem accordingly): lvextend -r -l +100%FREE /dev/vg-foo/lv-bar