Resize your LVM on your Ubuntu or Debian Server VPS to use all available free space

First, find the logical volume name you would like to resize:

lvdisplay --maps

For this run, we will assume it is /dev/ubuntu-vg/ubuntu-lv

Resize the logical volume to use all the existing and free space of the volume group:


You are now within the confines of the LVM administration tool. Let’s extend our logical volume and exit:

lvm> lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv
lvm> exit

Now we need to use resize the actual filesystem to use the newly acquired free space:

resize2fs /dev/ubuntu-vg/ubuntu-lv

Expect an output that looks something like this:

resize2fs 1.44.1 (24-Mar-2018)
Filesystem at /dev/ubuntu-vg/ubuntu-lv is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 58
The filesystem on /dev/ubuntu-vg/ubuntu-lv is now 120784896 (4k) blocks long.

Finally, let’s see the fruit of our labour:

df -h

With a possible output of:

Filesystem Size Used Avail Use% Mounted on
udev 3.9G 0 3.9G 0% /dev
tmpfs 786M 1.2M 785M 1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv 454G 3.8G 432G 1% /