- Check the size of your physical volume (PV) and volume group (VG) using
sudo pvdisplay
andsudo vgdisplay
commands. Note the free space available in your VG. - Extend your PV to use the extra disk space using
sudo pvresize /dev/sda5
command. This will resize your PV to match the size of your partition /dev/sda5. - Check the size of your LV using
sudo lvdisplay
command. Note the current size and path of your LV. - Extend your LV to use the free space in your VG using
sudo lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv
command. This will resize your LV to use all the available space in your VG. - Resize the file system on your LV using
sudo resize2fs /dev/ubuntu-vg/ubuntu-lv
command. This will expand the file system to match the size of your LV.
You can verify the new size of your LV and file system using sudo lvdisplay
and df -h
commands. I hope this helps. 😊