Tested on Ubuntu Server 26.04.1 LTS with LVM 2.03.31 and an ext4 root filesystem.
Hi everyone, this time I’m continuing the Ubuntu Server 26.04 series with a problem that surprises almost everyone after a fresh install. You give the server a 60 GB disk, you log in, run df -h and the root partition says 29G. Where did the other half go? Nothing is broken and nothing is lost. The installer simply put that space aside, and it’s waiting for you inside LVM.
There are times when you only notice this the hard way. You pull a few Docker images or install something big, and suddenly apt stops with No space left on device. Even worse, many guides online give you one copy and paste line without checking anything first, mix up the steps that grow the volume and the steps that grow the filesystem, or use the wrong dashes in the device name so the command fails.
So, you’re ready to give your server the space it already owns? Read on to get guidance on how to extend LVM on Ubuntu Server 26.04. We’ll cover what PV, VG and LV actually mean in plain words, how to check how much free space you have, how to add a fixed amount first (I added 10 GB) and see why df doesn’t change until you grow the filesystem, and then how to hand over everything that’s left with one command. All of it happens while the server is running, with no reboot. Every step was done on a real server, and the screenshots come from that session.
Before You Start
You need a server running Ubuntu Server 26.04 that was installed with the default storage layout, which is LVM, and a user that can use sudo. If you followed my guide on how to install Ubuntu Server 26.04 LTS for SSH access, you already have exactly this setup. You can work on the console or over SSH, it makes no difference.
Growing a volume is one of the safer things you can do with storage, because nothing gets moved or deleted. Still, as always, I strongly recommend having a backup of anything important before you touch disks. And one thing this article won’t do is shrink a volume. Shrinking is a different story with real risk of data loss, so we only go up here.
What PV, VG and LV Mean
LVM stands for Logical Volume Manager. Think of it like this. Your disk partition is a bag of flour. LVM pours the flour into a big bowl, and from that bowl you scoop out portions for whatever you need to bake. You can add more to a portion later, as long as there’s still flour in the bowl.
The PV (physical volume) is the bag of flour, a real partition that LVM is allowed to use. On a default install that’s /dev/sda3. The VG (volume group) is the bowl, all PVs poured together, named ubuntu-vg. The LV (logical volume) is the portion you scooped out, named ubuntu-lv, and that’s where your root filesystem / lives. The Ubuntu installer creates a bowl as big as the disk but scoops out only about half of it for ubuntu-lv. The rest stays in the bowl as free space, and that’s what we’re going to use.
How to Check Your Disk and Free Space
Before changing anything, let’s look at what we have. These commands only read information, so you can’t break anything with them. Here’s what you do.
Check the root size and the filesystem type

lsb_release -d
uptime -p
df -hT /The server runs Ubuntu 26.04.1 LTS and had been up for 13 minutes. Keep an eye on that number, because at the end of this article it’ll prove that we didn’t reboot. df -hT shows the root filesystem /dev/mapper/ubuntu–vg-ubuntu–lv with type ext4 (1), a size of 29G and 20G available (2). The type matters, because ext4 is grown with resize2fs. If yours says xfs, you use xfs_growfs instead. If you want to understand every column here, my article on the df and du commands to check disk space in Linux explains them.
Look at the disk layout with lsblk

lsblkThis is where the problem becomes obvious. The disk sda is 60G (1). The partition sda3, which is the PV, is 58G (2). But ubuntu–vg-ubuntu–lv, the LV mounted on /, is only 29G (3). So the partition is fine, the space is just not handed to the LV yet. The loop lines at the top are snaps and the sr0 line is the CD drive, you can ignore them.
Check the PV, VG and LV with pvs, vgs and lvs

sudo pvs
sudo vgs
sudo lvsThese three commands show the three layers. pvs shows /dev/sda3 in ubuntu-vg with 29.00g PFree. vgs shows the bowl ubuntu-vg with a VSize of <58.00g and a VFree of 29.00g (1). That VFree column is the number you care about most. If it's 0, there's nothing to extend into and you'll need more disk first. lvs shows ubuntu-lv with an LSize of <29.00g (2). The < sign just means "slightly less than", because LVM rounds to whole extents of 4 MiB.
How to Extend LVM with a Fixed Size First
Now the fun part. You don’t have to give all the free space away at once. Some admins keep a few gigabytes in the VG on purpose, for example for an LVM snapshot before a big upgrade or for a separate volume later. So first I’ll add a fixed 10 GB and show you what really happens behind the scenes.
Extending is a two part job. lvextend makes the LV (the portion) bigger. resize2fs then stretches the ext4 filesystem inside it so it uses the new room. If you only do the first part, df won’t show anything new. Let’s see that with our own eyes. The process has several steps.
Asking for more than you have

sudo lvextend -L +100G /dev/ubuntu-vg/ubuntu-lvFirst, a mistake I made on purpose, so you know what it looks like. -L with a plus sign adds a size to the current one, and I asked for 100 GB extra. LVM refused with Insufficient free space: 25600 extents needed, but only 7424 available (1). An extent is a 4 MiB block, so 7424 extents is the 29 GB in the VG. Nothing was changed, so this error is harmless. Just ask for less.
Add 10 GB to the logical volume

sudo lvextend -L +10G /dev/ubuntu-vg/ubuntu-lv
sudo lvs
df -h /This time it worked. The output says Size of logical volume ubuntu-vg/ubuntu-lv changed from <29.00 GiB (7423 extents) to <39.00 GiB (9983 extents) and Logical volume ubuntu-vg/ubuntu-lv successfully resized. lvs confirms an LSize of <39.00g (1). But look at df: it still says 29G (2). The portion got bigger, but the filesystem inside doesn't know about it yet.
My experience: This is exactly what confuses people. On my server, lvs said 39 GB and df said 29 GB at the same time, both correct. I’ve seen forum threads where someone ran lvextend twice because df didn’t move, and the second run only answered that the size matches. The missing piece is always the filesystem.
Grow the ext4 filesystem with resize2fs

sudo resize2fs /dev/ubuntu-vg/ubuntu-lv
df -h /resize2fs reported Filesystem at /dev/ubuntu-vg/ubuntu-lv is mounted on /; on-line resizing required (1). That’s not an error. It means the filesystem is in use and resize2fs grows it live, while the system keeps running. A moment later it said the filesystem is now 10222592 (4k) blocks long, and df now shows 39G with 30G available (2). Because I gave no size after the device path, resize2fs grows the filesystem to fill the whole LV, which is exactly what we want.
Check what’s left in the volume group

sudo vgsVFree went from 29.00g down to 19.00g (1). The 10 GB moved from the bowl into the LV. If you’re happy with this, you can stop here and keep the 19 GB in reserve. I’ll use the rest in the next section.
How to Extend LVM to Use All Free Space
For most home labs and small servers there’s no reason to keep space in the VG, and having it all in / means you won’t run into a full disk surprise. This time we’ll do both parts in one command.
The trick is two options of lvextend. -l +100%FREE (small L) means “add 100 percent of the free extents in the VG”, so you don’t have to calculate anything. -r (or –resizefs) tells lvextend to grow the filesystem right after the LV, so you can’t forget resize2fs. Here’s how that should go.
Use all free space and resize the filesystem in one go

sudo lvextend -r -l +100%FREE /dev/ubuntu-vg/ubuntu-lvlvextend first detected File system ext4 found on ubuntu-vg/ubuntu-lv mounted at /. Then it changed the LV from <39.00 GiB (9983 extents) to <58.00 GiB (14847 extents), called resize2fs by itself (the same on-line resizing required message as before), and finished with resize2fs done, Extended file system ext4 and successfully resized (2). One command (1) did the job of two.
Note: The order of the options doesn’t matter, lvextend -l +100%FREE -r works just as well. Pay attention to the letters though. -L (capital) takes a size like +10G, -l (small) takes extents or a percentage like +100%FREE. Mixing them up gives you an error instead of a bigger disk.
Verify with df, vgs and lsblk

df -h /
sudo vgs
lsblk /dev/sda
uptime -pThis is the result we wanted. df shows / at 57G with 48G available (1), up from 29G and 20G. vgs shows a VFree of 0 (2), so every bit of the VG is now in use. lsblk shows ubuntu–vg-ubuntu–lv at 58G, the same as sda3. df says 57G because ext4 keeps some room for its own bookkeeping. And uptime says up 14 minutes (3): the whole thing was done online, without a reboot and without stopping any service.
Hopefully, your server now uses the whole disk as it should. Since the root filesystem has room again, this is also a good moment to think about a swap file, which I covered in how to add a swap file on Ubuntu 26.04.
What If the VG Has No Free Space?
Everything above works because the installer left free space in the VG. If vgs shows VFree 0 and df is still small, there are two other situations, and they need extra steps before lvextend.
The first is a disk that was made bigger afterwards, for example a cloud server where you resized the disk in the provider’s panel. Then the partition sda3 and the PV are still the old size. The usual fix is to grow the partition with growpart (from the cloud-guest-utils package), for example sudo growpart /dev/sda 3, then tell LVM with sudo pvresize /dev/sda3, and after that run the same lvextend -r -l +100%FREE as above. The second is a brand new disk, where you create a PV on it with pvcreate, add it to the bowl with vgextend ubuntu-vg and then run lvextend.
Warning: I did NOT test growpart, pvresize or vgextend for this article, because my disk wasn’t resized and I had no second disk. The commands above are the standard ones from the LVM and cloud-utils documentation. Check lsblk before and after every step on your own server, and make sure you have a backup.
Common Problems and How to Fix Them
These are the messages I ran into while extending the volume, plus the ones you’re most likely to see.
Insufficient free space: extents needed, but only … available
You asked lvextend for more than the VG has. Run sudo vgs and look at VFree, then ask for less, or use -l +100%FREE so LVM calculates the amount for you. Nothing is changed when this error appears.
New size matches existing size

sudo lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lvI got this when I ran the command again after everything was already used: New size (14847 extents) matches existing size (14847 extents) and No size change (1). It means the VG has no free space left. If df still shows a small root at this point, the LV is fine and only the filesystem is behind, so run sudo resize2fs /dev/ubuntu-vg/ubuntu-lv. If df is small and lsblk shows the LV is also small, the free space is outside LVM, see the section above.
Permission denied or failure to communicate with device-mapper

lvm version
sudo lvdisplay /dev/ubuntu-vg/ubuntu-lvWhen I ran lvm version without sudo, it printed /dev/mapper/control: open failed: Permission denied and Failure to communicate with kernel device-mapper driver (1), and only then the version, LVM 2.03.31 (2). It looks scary but it just means LVM wants root. With sudo, lvdisplay showed the full details, including LV Size <58.00 GiB (3). So always put sudo in front of pvs, vgs, lvs and lvextend.
resize2fs says Nothing to do

sudo resize2fs /dev/ubuntu-vg/ubuntu-lvThe filesystem is already 15203328 (4k) blocks long. Nothing to do! (1) means the filesystem already fills the LV. That’s good news. If you expected more space, the LV itself is not bigger yet, so run lvextend first.
df still shows the old size
You extended the LV but forgot the filesystem. Either run resize2fs on ext4, or sudo xfs_growfs / if df -hT says xfs. Next time just add -r to lvextend and it happens automatically.
The resize2fs path doesn’t exist
Copying commands from websites sometimes turns the double dash in /dev/mapper/ubuntu–vg-ubuntu–lv into a long dash, and then the device can’t be found. Use /dev/ubuntu-vg/ubuntu-lv instead. It points to the same volume and has only normal single dashes.
This concludes my guide on how to extend LVM on Ubuntu Server 26.04. You now know what PV, VG and LV mean, how to read pvs, vgs and lvs, why df doesn’t change until the filesystem is grown, how to add a fixed size with lvextend and resize2fs, and how to use all free space with a single lvextend -r -l +100%FREE, all without a reboot. Next, you would probably want to make sure the server stays updated on its own, and my guide on things to do after installing Ubuntu Server 26.04 is a good checklist for that. If lvextend or resize2fs gives you a different message on your server, drop it in the comments and we’ll figure it out together.












