Expand lvm disk fresh install
Sometimes when you install a fresh Ubuntu 18.04 and 20.04 and choose the LVM option it doesn’t expand the volume and therefore the size remains 4GB even though the LVM is a lot bigger.
Connect to your machine and switch user to root sudo -s
First find out what your LVM volume is named with lvdisplay, the default for ubuntu is /dev/ubuntu-vg/ubuntu-lv
Then run lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv and the logical volume should extend to the maximum size available.
Then run resize2fs /dev/ubuntu-vg/ubuntu-lv to resize the filesystem to volumesize
Last updated