How to resize a logical volume with 4 simple LVM commands

    1st step

    • Increase/resize disque from GUI console of your hypervisor

    2nd step

    Extend physical drive partition check free space: sudo fdisk -l

    • Extend physical drive partition: growpart /dev/sda 3 
    • See phisical drive: pvdisplay
    • Instruct LVM that disk size has changed: sudo pvresize /dev/sda3
    • Check physical drive if has changed: pvdisplay

    3rd step

    Extend Logical volume

    • View starting LV: sudo lvdisplay
    • Resize LV: sudo lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv
    • View changed LV: sudo lvdisplay

    4th step

    • Resize Filesystem: resize2fs /dev/ubuntu-vg/ubuntu-lv
    • Confirm results: fdisk -l

    Pin It on Pinterest

    Share This