Resizing a LVM LV

The goal is to extend the size of a logical volume by resizing the size of the underlying disk or by adding a new one.

If the disk has been resized (a virtual disk)

parted /dev/sdx resize N 100%
pvresize /dev/sdxN

If a disk has been added

fdisk /dev/sdy
pvcreate /dev/sdyN
vgextend myvg /dev/sdyN

Finally extend the size of the LV

lvextend -l +100%FREE /dev/mapper/myvg-mylv 
resize2fs /dev/mapper/myvg-mylv # for extX
xfs_grows /dev/mapper/myvg-mylv # for xfs