Extending a LVM partition

Recently I needed to extend/increase a LVM partition to give it more space:

  1. Create a partition on the additional disk: cfdisk /dev/sdb
  2. Create a physical volume on the partition: pvcreate /dev/sdb1
  3. Add the physical volume to the existing volume group: vgextend vg-foo /dev/sdb1
  4. 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