20.04

Ubuntu 20.04 LVM Partition Extension

Today part of my Lab requirement, I have installed Ubuntu 20.0.6 on my Esxi as a VM

and allocated space of 450GB – But when installation time I have not made close attention to what was installed as part of the installation.

After installation finished, I only saw my root/partition allocated space only 100GB – I was surprised where the rest space went.

So I was reading the Ubuntu documentation and found, (i made the mistake of not making evident attention when it was mentioned LVM partition size) as per the below screenshot.

Ubuntu 20. 04 lvm partition extension 11
Sponsored

So I found what are defaults from google.com

The default settings in the Ubuntu installation, then the storage for your Linux OS is probably using the Logical Volume Manager (LVM). LVM is an abstraction framework that exists between your physical (or virtual) disks and your Linux file system. It is used to group separate block devices (partitions) together into Volume Groups (VGs), and then chop those VGs up into logical block devices, or Logical Volumes (LVs). LV’s are the abstracted block devices upon which your usable file system resides.

Visualization of how LVM works.

Example: we have 5 different disks, each with a single partition mapped to Physical Volumes (PVs), all being grouped into a single Volume Group (VG). The Volume Group is chopped up into two different Logical Volumes (LVs) and each LV is being used for a filesystem.

Ubuntu 20. 04 lvm partition extension 12

Using a similar visualization, the below diagram shows how the Ubuntu installer (using all default options) divided up my 100GB disk.

Ubuntu 20. 04 lvm partition extension 13

So let’s use rest of the free space into / (root) partition :

df -h will show how much space is used in what partition.

Sponsored
Find out what is my original space vgdisplay
Ubuntu 20. 04 lvm partition extension 14

check the Logical Volume display :

Now we will extend maximum use of lvm which can be used free space

#lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv

Ubuntu 20. 04 lvm partition extension 15

Now LVM show correct size :

Ubuntu 20. 04 lvm partition extension 16

Now we increased the LVM but df -h show still same size :

Ubuntu 20. 04 lvm partition extension 17

now we run to resize the disk space :

#resize2fs /dev/mapper/ubuntu–vg-ubuntu–lv

Now I have the disk space that I was intending to use.

This post originally appeared onBalaji Bandi.

Ubuntu Server Admin

Recent Posts

Canonical Releases Ubuntu 25.04 Plucky Puffin

The latest interim release of Ubuntu introduces “devpacks” for popular frameworks like Spring, along with…

3 days ago

Ubuntu 25.04 (Plucky Puffin) Released

Ubuntu 25.04, codenamed “Plucky Puffin”, is here. This release continues Ubuntu’s proud tradition of integrating…

3 days ago

Extended Security Maintenance for Ubuntu 20.04 (Focal Fossa) begins May 29, 2025

Ubuntu released its 20.04 (Focal Fossa) release 5 years ago, on March 23, 2020. As…

4 days ago

Ubuntu 20.04 LTS End Of Life – activate ESM to keep your fleet of devices secure and operational

Focal Fossa will reach the End of Standard Support in May 2025, also known as…

5 days ago

Ubuntu MATE 25.04 Release Notes

Ubuntu MATE 25.04 is ready to soar! 🪽 Celebrating our 10th anniversary as an official…

5 days ago

Ubuntu Weekly Newsletter Issue 887

Welcome to the Ubuntu Weekly Newsletter, Issue 887 for the week of April 6 –…

6 days ago