How to Extend an LVM Logical Volume with lvextend

lvextend grows a logical volume by taking free extents from its volume group. The filesystem inside the LV must grow too — resize2fs for ext4, xfs_growfs for XFS — or df still shows the old size.

Published

Updated

Read time 8 min read

Reviewed byDeepak Prasad

How to Extend an LVM Logical Volume with lvextend
About lvextend grows a logical volume by taking free extents from its volume group. The filesystem inside the LV must grow too — resize2fs for ext4, xfs_growfs for XFS — or df still shows the old size.
Tested on Ubuntu 25.04 (Plucky Puffin); LVM 2.03.27(2); kernel 7.0.0-27-generic
Package lvm2 (apt/deb) · lvm2 (dnf/rpm)
Man page lvextend(8)
Privilege root / sudo
Distros

All Linux distros with LVM2 (lvm2 package).

Shrink again with lvreduce.

Related guide

lvextend — quick reference

Pre-checks

When to use Command
List logical volumes and sizes sudo lvs
Check free extents in the volume group sudo vgs
Show one LV in detail sudo lvdisplay VG/LV
See filesystem type and mount point df -Th or lsblk -f

Extend by size (-L)

When to use Command
Add megabytes to current LV size sudo lvextend -L +48M /dev/VG/LV
Set new absolute LV size sudo lvextend -L 200M /dev/VG/LV
Add gigabytes sudo lvextend -L +10G /dev/VG/LV

Extend by extents (-l)

When to use Command
Add a fixed number of extents sudo lvextend -l +10 /dev/VG/LV
Add percentage of total VG size sudo lvextend -l +10%VG /dev/VG/LV
Consume all free VG space sudo lvextend -l +100%FREE /dev/VG/LV

Grow filesystem

When to use Command
Grow ext4 on the LV device (mounted OK) sudo resize2fs /dev/VG/LV
Grow XFS on the mount point sudo xfs_growfs /mount/point
Try LV + FS in one step (may need helper package) sudo lvextend -r -L +size /dev/VG/LV

Help

When to use Command
Show built-in usage lvextend --help
Same operation via lvresize sudo lvresize -L +48M /dev/VG/LV

lvextend — command syntax

Synopsis from lvextend --help on Ubuntu 25.04 (LVM 2.03.27):

text
lvextend -L|--size [+]Size[m|UNIT] LV
	[ -l|--extents [+]Number[PERCENT] ]
	[ -r|--resizefs ]
	[ COMMON_OPTIONS ]
	[ PV ... ]

lvextend only grows the LV block device. + means add (-L +48M); no + sets total size (-L 200M). After lvextend, grow ext4 with resize2fs on the device or XFS with xfs_growfs on the mount point unless -r succeeds on your host. Needs sudo. The examples below use a practice volume group on loop-backed storage.


lvextend — command examples

Essential Build a practice VG and ext4 LV for extend tests

The examples below use a practice volume group on loop-backed storage. Extend data volumes on spare disks first; plan carefully before growing a root logical volume.

Run the commands:

bash
mkdir -p /tmp/lvm-extend-lab/mnt
dd if=/dev/zero of=/tmp/lvm-extend-lab/disk.img bs=1M count=512 status=none
LOOP=$(sudo losetup -f --show /tmp/lvm-extend-lab/disk.img)
sudo pvcreate "$LOOP"
sudo vgcreate lab_vg "$LOOP"
sudo lvcreate -L 48M -n lab_lv lab_vg
sudo mkfs.ext4 -F /dev/lab_vg/lab_lv
sudo mount /dev/lab_vg/lab_lv /tmp/lvm-extend-lab/mnt
sudo lvs lab_vg
sudo vgs lab_vg

Sample output:

text
LV     VG     Attr       LSize
  lab_lv lab_vg -wi-ao---- 48.00m
  VG     #PV #LV #SN Attr   VSize   VFree
  lab_vg   1   1   0 wz--n- 508.00m 460.00m

Teardown later: sudo umount /tmp/lvm-extend-lab/mnt, sudo lvremove -y lab_vg/lab_lv, sudo vgremove lab_vg, sudo pvremove "$LOOP", sudo losetup -d "$LOOP", rm -rf /tmp/lvm-extend-lab.

Essential Add 48M with lvextend, then grow ext4 online

This is the standard two-step grow: LV first, filesystem second.

Run the commands:

Check mount-point usage and filesystem types with df; the df and du covers -h, -T, and filtering pseudo-filesystems.

bash
sudo lvextend -L +48M /dev/lab_vg/lab_lv
sudo resize2fs /dev/lab_vg/lab_lv
df -h /tmp/lvm-extend-lab/mnt
sudo lvs lab_vg/lab_lv

Sample output:

text
Size of logical volume lab_vg/lab_lv changed from 48.00 MiB (12 extents) to 96.00 MiB (24 extents).
  Logical volume lab_vg/lab_lv successfully resized.
The filesystem on /dev/lab_vg/lab_lv is now 24576 (4k) blocks long.
Filesystem                 Size  Used Avail Use% Mounted on
/dev/mapper/lab_vg-lab_lv   89M  156K   86M   1% /tmp/lvm-extend-lab/mnt
  LV     VG     Attr       LSize
  lab_lv lab_vg -wi-ao---- 96.00m

df may show slightly less than the LV size because of ext4 metadata and reserved blocks.

Common Set absolute LV size with -L (no plus)

Use absolute -L 200M when you want the LV exactly that large, not “add 200M”.

Run the commands:

bash
sudo lvextend -L 200M /dev/lab_vg/lab_lv
sudo resize2fs /dev/lab_vg/lab_lv
sudo lvs lab_vg/lab_lv

The new size must be larger than lvs shows now. If you pick a smaller number, LVM refuses the operation.

Common Extend by extents and by %VG

Extents match how LVM allocates physical chunks inside the VG.

Run the commands:

bash
sudo lvextend -l +10 /dev/lab_vg/lab_lv
sudo lvextend -l +10%VG /dev/lab_vg/lab_lv
sudo lvs lab_vg/lab_lv

Sample output:

text
Size of logical volume lab_vg/lab_lv changed from 96.00 MiB (24 extents) to 136.00 MiB (34 extents).
  Logical volume lab_vg/lab_lv successfully resized.

Run resize2fs after each grow if you need the filesystem to follow immediately.

Common Use every free extent with +100%FREE

This drains VFree in the VG into one LV — common when a data volume should absorb leftover space.

Run the commands:

bash
sudo lvextend -l +100%FREE /dev/lab_vg/lab_lv
sudo vgs lab_vg
sudo resize2fs /dev/lab_vg/lab_lv

Sample output:

text
Size of logical volume lab_vg/lab_lv changed from 136.00 MiB (34 extents) to 508.00 MiB (127 extents).
  VG     #PV #LV #SN Attr   VSize   VFree
  lab_vg   1   1   0 wz--n- 508.00m    0

Afterward VFree should be 0 (or nearly zero).

Common Error when the volume group has no room

lvextend cannot invent space — it only reallocates free extents already in the VG.

Run the commands:

bash
dd if=/dev/zero of=/tmp/lvm-extend-lab/small.img bs=1M count=64 status=none
LOOP2=$(sudo losetup -f --show /tmp/lvm-extend-lab/small.img)
sudo pvcreate "$LOOP2" && sudo vgcreate tiny_vg "$LOOP2"
sudo lvcreate -L 50M -n tiny_lv tiny_vg
sudo lvextend -L +20M /dev/tiny_vg/tiny_lv

Sample output:

text
Insufficient free space: 5 extents needed, but only 2 available

Fix by adding a disk (pvcreate, vgextend), growing the PV (pvresize), or freeing space from another LV.

Advanced lvextend -r — one-step FS grow (helper may be missing)

-r / --resizefs asks LVM to grow a supported filesystem after extending the LV. On Ubuntu 25.04 the helper may be absent.

Run the commands:

bash
sudo lvextend -r -L +16M /dev/lab_vg/lab_lv

If you see lvresize_fs_helper: execvp failed, the LV still grew — run sudo resize2fs /dev/lab_vg/lab_lv manually. Prefer the explicit two-step path in production scripts.

Advanced Check free space before extending a volume group

Listing LVs and VGs does not change sizes — safe on live systems before you plan a grow window.

Run the commands:

bash
sudo lvs
sudo vgs
sudo pvs

Sample output:

text
LV        VG        Attr       LSize
  ubuntu-lv ubuntu-vg -wi-ao----  58.41g
  VG        #PV #LV #SN Attr   VSize   VFree
  ubuntu-vg   2   1   0 wz--n-  58.41g    0

If VFree is 0, extend the VG before lvextend.


lvextend — when to use / when not

Use lvextend when Use something else when
  • The filesystem is on LVM and the volume group has free extents
  • You need to grow a data LV or root LV online (ext4/XFS grow while mounted in normal use)
  • You added disk space to the VG with pvcreate / vgextend or pvresize
  • You want to absorb all spare VG space into one LV (-l +100%FREE)
  • You need less space → lvreduce (filesystem first on ext4)
  • VFree is zero → add PV or shrink another LV before lvextend
  • The disk is a plain partition without LVM → grow the partition (growpart, parted) and filesystem tools
  • Btrfs on a partition (no LVM) → btrfs filesystem resize
  • You only need a temporary larger block device → loop file or attach cloud volume

lvextend vs lvresize

lvextend lvresize
Direction Grow only Grow or shrink
Mental model “Add space to this LV” Generic resize to a target
Typical follow-up resize2fs / xfs_growfs Same for grow; shrink needs FS first on ext4

lvextend is shorthand for growing with lvresize -L +size.


Command One line
lvextend Grow a logical volume (this page)
lvcreate Create a new logical volume
vgcreate Create a volume group
Manage logical volumes Full LVM workflow guide

Browse the full index in our Linux commands reference.


lvextend — interview corner

Do you need to reboot after lvextend?

No for a typical online grow. lvextend changes the LV in place. ext4 and XFS usually grow while mounted.

You still must grow the filesystem (resize2fs, xfs_growfs, or working -r) or df stays at the old size. Reboot is not the mechanism that applies the extra space.

A strong answer is:

"No reboot for a normal online grow — lvextend extends the LV live; I still run resize2fs or xfs_growfs so df matches."

What is the difference between lvextend -L +100M and -L 100M?

-L +100M adds 100 MiB to the current LV size.

-L 100M sets the LV to exactly 100 MiB total, which must be greater than the present size.

The same rule applies to -l extents: +10 adds ten extents; -l 10 sets total extent count.

A strong answer is:

"Plus means add to current size; without plus sets absolute total — both must end larger than lvs shows now."

Why does df show the old size after lvextend succeeds?

lvextend grows the block device (/dev/VG/LV). The filesystem inside still occupies the old length until you expand it.

Run resize2fs /dev/VG/LV for ext2/3/4, or xfs_growfs /mount/point for XFS. Then compare lvs and df.

A strong answer is:

"lvextend only grows the LV — the filesystem needs resize2fs or xfs_growfs; if lvs grew but df didn't, I skipped that step."

What if the volume group has no free space?

lvextend only moves existing free extents in the VG. It cannot create space.

Options: add a disk (pvcreate, vgextend), grow an underlying partition and pvresize, or shrink/remove another LV to free extents.

A strong answer is:

"Check vgs VFree — if zero, add or resize a PV or free space from another LV; lvextend won't help until VFree is non-zero."

Can you extend a mounted logical volume?

Yes for grow operations on ext4 and XFS in normal use: extend the LV, then grow the filesystem on the mounted device or mount point.

Always confirm the LV path with lvs and take a backup or snapshot before production changes.

A strong answer is:

"Yes for online grow on ext4/XFS — lvextend then resize2fs on the device or xfs_growfs on the mount point, after verifying VFree and the LV name."


Troubleshooting

Symptom Likely cause Fix
Insufficient free space VFree too small vgs; vgextend / pvresize / shrink another LV
df unchanged Filesystem not grown resize2fs or xfs_growfs after lvextend
resize2fs wants e2fsck -f ext metadata sudo e2fsck -f /dev/VG/LV, then resize2fs
Wrong LV grew Typo in path Double-check lvs before every lvextend
xfs_growfs fails Unmounted XFS or wrong argument Mount XFS; pass mount point not raw device
-r helper failed Missing lvresize_fs_helper LV may still be extended — run resize2fs manually
New size smaller than current Used -L 100M without + by mistake Use -L +100M to add, or pick a larger absolute size

References

Rohan Timalsina

is a technical writer and Linux enthusiast who writes practical guides on Linux commands and system administration. He focuses on simplifying complex topics through clear explanations.