How to Extend an LVM Logical Volume with lvextend

Use lvextend to grow a Linux logical volume: pre-checks, size syntax (-L and -l), grow ext4 with resize2fs or XFS with xfs_growfs, post-checks, and what to do when the volume group is full.

Published

Updated

Read time 9 min read

Reviewed byDeepak Prasad

How to Extend an LVM Logical Volume with lvextend

When a logical volume (LV) on Linux runs low on space, lvextend pulls free extents from the volume group (VG) and attaches them to the LV. That is only half the job: the filesystem inside the LV must grow too, or df will still show the old size. This guide walks through pre-checks, every lvextend size style we use in production, filesystem growth for ext4 and XFS, post-checks, and the cases that trip people up when the VG is already full.

The commands below are the same ones we have used on test systems; terminal output is shown in text fences so you can compare your host line by line.

Tested on: Ubuntu with LVM2 (lvm2 package); lvextend and resize2fs 1.45.x-era output.


Before you extend: pre-checks

Run these checks before you change anything. They take a minute and prevent resizing the wrong LV.

Confirm the LV path and current size

List logical volumes with lvs or lvdisplay. Note the VG/LV name and LSize:

bash
lvs
text
LV    VG      Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  lvol  vol_grp -wi-a-----  48.00m
  lvol0 vol_grp -wi-a-----  20.00m
  lvol1 vol_grp -wi-a-----  60.00m
  lvol2 vol_grp -wi-a-----  52.00m

Device paths look like /dev/vol_grp/lvol1 or /dev/mapper/vol_grp-lvol1.

Confirm free space in the volume group

lvextend only reallocates extents that are already free in the VG. Check with vgs or vgdisplay:

bash
vgs
text
VG      #PV #LV #SN Attr   VSize   VFree
  vol_grp   1   4   0 wz--n- 508.00m 356.00m

VFree must cover the growth you plan. If it is 0, see When the volume group has no free space before running lvextend.

Note the filesystem type and mount point

The grow tool depends on the filesystem:

Filesystem Grow command Typical target
ext2, ext3, ext4 resize2fs LV device (/dev/vol_grp/lvol1)
XFS xfs_growfs Mount point (/data), not the raw device
Btrfs on LVM btrfs filesystem resize Mount point

Use df -Th or lsblk -f on the mount point you care about.

Snapshot and backup

WARNING
Growing an LV is safer than shrinking, but a bad path or typo can still destroy data. Take a backup or LVM snapshot before you extend production volumes.

You need root (or sudo). For a deeper LVM refresher, see Understand LVM Architecture and Manage Logical Volume in Linux.


Things to consider

  • Live expansion. You do not need to reboot or drop to rescue mode to extend a data LV, and many root LVs grow online as well. The filesystem must be grown after lvextend unless you use -r (see the hint below).
  • LV size ≠ usable disk space. lvextend changes the block device size. Until resize2fs, xfs_growfs, or the Btrfs resize command runs, applications and df still see the old filesystem size.
  • + means add; no + means set total size. lvextend -L +48M adds 48 MiB. lvextend -L 100M sets the LV to 100 MiB total (must be larger than now). The same rule applies to -l extents.
  • Mounted vs unmounted. ext4 and XFS usually support online grow on mounted filesystems. If resize2fs asks for e2fsck -f first, run the check, then resize—see the workflow section.
  • Shrinking is a different guide. This article only covers grow. To reduce an LV safely, see shrink an LVM logical volume.
HINT
lvextend -r (or --resizefs) can extend the LV and grow a supported filesystem in one step on many systems. The examples below use explicit resize2fs / xfs_growfs so you can see each stage; try -r on a test LV if you want a shorter path.

lvextend command syntax

Basic form:

bash
lvextend option LV_path

Examples use VG vol_grp and paths like /dev/vol_grp/lvol. Replace with your vgs / lvs names.

If lvs shows nothing, create an LV first with lvcreate command examples.

Size options at a glance

Goal Example Meaning
Add megabytes lvextend -L +48M /dev/vol_grp/lvol Increase LV by 48 MiB
Set megabytes lvextend -L 100M /dev/vol_grp/lvol2 Set LV size to 100 MiB total
Add extents lvextend -l +10 /dev/vol_grp/lvol0 Add 10 physical extents
Add % of VG lvextend -l +10%VG /dev/vol_grp/lvol0 Add 10% of total VG size (rounded to extents)
Use all free VG space lvextend -l +100%FREE /dev/vol_grp/lvol1 Consume remaining VFree

lvextend examples by size type

1. Extend by megabytes (-L)

With a leading +, the size is added to the current LV:

bash
lvextend -L +48M /dev/vol_grp/lvol

Sample Output:

text
Size of logical volume vol_grp/lvol changed from 48.00 MiB (12 extents) to 96.00 MiB (24 extents).
  Logical volume vol_grp/lvol successfully resized.

Without +, the value is the new absolute size (must exceed the current size):

bash
lvextend -L 100M /dev/vol_grp/lvol2

Sample Output:

text
Size of logical volume vol_grp/lvol2 changed from 52.00 MiB (13 extents) to 100.00 MiB (25 extents).
  Logical volume vol_grp/lvol2 successfully resized.

2. Extend by logical extents (-l)

Add a fixed number of extents:

bash
lvextend -l +10 /dev/vol_grp/lvol0

OR

bash
lvextend --extents +10 /dev/vol_grp/lvol0
text
Size of logical volume vol_grp/lvol0 changed from 20.00 MiB (5 extents) to 60.00 MiB (15 extents).
  Logical volume vol_grp/lvol0 successfully resized.

Without +, the extent count becomes the new total size of the LV.

3. Extend by percentage of the volume group (%VG)

+10%VG adds 10% of the VG total size, rounded up to whole extents:

bash
lvextend -l +10%VG /dev/vol_grp/lvol0

Sample Output:

text
Size of logical volume vol_grp/lvol0 changed from 60.00 MiB (15 extents) to 110.80 MiB (28 extents).
  Logical volume vol_grp/lvol0 successfully resized.

4. Use all remaining free space (%FREE)

This consumes every free extent in the VG:

bash
lvextend -l +100%FREE /dev/vol_grp/lvol1

Sample Output:

text
Size of logical volume vol_grp/lvol1 changed from 60.00 MiB (15 extents) to 384.00 MiB (96 extents).
  Logical volume vol_grp/lvol1 successfully resized.

Afterward vgs should show little or no VFree:

bash
vgs vol_grp

Sample Output:

text
VG      #PV #LV #SN Attr   VSize   VFree
  vol_grp   1   4   0 wz--n- 508.00m    0

Grow the filesystem after lvextend

Pick the tool that matches your filesystem.

ext2, ext3, or ext4: resize2fs

Run against the LV device (mounted grow is normal for ext4):

bash
resize2fs /dev/vol_grp/lvol1

If you see:

text
resize2fs 1.45.5 (07-Jan-2020)
Please run 'e2fsck -f /dev/vol_grp/lvol1' first.

Run a forced check, then resize again:

bash
e2fsck -f /dev/vol_grp/lvol1
resize2fs /dev/vol_grp/lvol1

Successful grow looks like:

text
resize2fs 1.45.5 (07-Jan-2020)
Resizing the filesystem on /dev/vol_grp/lvol1 to 51200 (4k) blocks.
The filesystem on /dev/vol_grp/lvol1 is now 51200 (4k) blocks long.

XFS: xfs_growfs

XFS must be mounted. Pass the mount point, not the device:

bash
xfs_growfs /mount/point

You should see metadata and data sections grow in the command output. Then confirm with df -h /mount/point.


End-to-end workflow: extend an LV safely

This is the full sequence: check space, extend the LV, grow ext4, verify. The example grows lvol1 from 60 MiB to 200 MiB on vol_grp.

Step 1: Check LV and VG size

bash
lvs vol_grp/lvol1

Sample Output:

text
LV    VG      Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  lvol1 vol_grp -wi-a-----  60.00m
bash
vgs

Sample Output:

text
VG      #PV #LV #SN Attr   VSize   VFree
  vol_grp   1   4   0 wz--n- 508.00m 328.00m

VSize is total VG capacity; VFree is what lvextend can use. Here lvol1 is 60 MiB and 328 MiB is free—enough for a grow to 200 MiB.

Step 2: Extend the logical volume

bash
lvextend -L 200M /dev/vol_grp/lvol1

Sample Output:

text
Size of logical volume vol_grp/lvol1 changed from 60.00 MiB (15 extents) to 200.00 MiB (50 extents).
  Logical volume vol_grp/lvol1 successfully resized.

Step 3: Grow the ext4 filesystem

bash
resize2fs /dev/vol_grp/lvol1

If resize2fs demands e2fsck -f, run the check shown in the previous section, then rerun resize2fs.

Step 4: Mount (if needed) and confirm

If the LV was unmounted for maintenance, mount it again:

bash
mount /dev/vol_grp/lvol1 /test
df -h /test

Sample Output:

text
Filesystem                  Size  Used Avail Use% Mounted on
/dev/mapper/vol_grp-lvol1   193M   52K  183M   1% /test

df may show slightly less than 200 MiB because of filesystem overhead and reserved blocks—that is expected on ext4.


Post-check: verify LV and filesystem size

After any extension, confirm both layers grew:

bash
lvs /dev/vol_grp/lvol1
df -h /path/to/mount

Sample Output:

text
LV    VG      Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  lvol1 vol_grp -wi-a----- 200.00m
  • lvs → LV block device size (should match what you set with lvextend).
  • df → filesystem size visible to users (should be close; XFS and ext4 reserve differ slightly).

If lvs grew but df did not, you skipped the filesystem grow step.


When the volume group has no free space

lvextend cannot invent extents. Options:

  1. Add disk space to the VG — partition a new disk, pvcreate, then vgextend vol_grp /dev/sdXN. See check disk and partition space and vgcreate / LVM setup.
  2. Grow an existing PV — if the underlying partition was enlarged, pvresize /dev/sdX1 first, then check vgs for new VFree.
  3. Free space from another LV — shrink or remove a non-critical LV (LVM shrink guide), then extend the target LV.

Only after VFree is non-zero should you rerun lvextend.


Troubleshooting

Symptom Likely cause What to do
Insufficient free space VFree too small vgs; add PV/vgextend or free space from another LV
df unchanged after lvextend Filesystem not grown Run resize2fs or xfs_growfs (or lvextend -r)
resize2fs wants e2fsck -f ext filesystem metadata Run e2fsck -f on the LV, then resize2fs again
Wrong LV resized Typo in path Always double-check lvs before lvextend
xfs_growfs fails Unmounted XFS or wrong path Mount XFS; pass mount point to xfs_growfs
New size smaller than current Used -L 100M without + by mistake Use -L +100M to add, or -L with a total larger than lvs shows

Manage Logical Volume in Linux
10+ lvcreate command examples
10+ lvchange command examples
Rename a logical volume
Resize root LVM on RHEL/CentOS
Create LVM during installation


References


Summary

Extending an LVM logical volume is a two-layer job: grow the LV with lvextend, then grow the filesystem so df matches. Before you run anything, confirm the LV path, filesystem type, and VFree in vgs. Use -L +size or -l +extents to add space, or -l +100%FREE to spend every free extent in the VG. For ext4, resize2fs on the LV device is the usual follow-up; for XFS, use xfs_growfs on the mount point. If the VG is full, add or resize a physical volume before you call lvextend again. Afterward, compare lvs and df—if only lvs changed, you still owe the filesystem one command.

Frequently Asked Questions

1. Do I need to reboot after extending an LVM logical volume?

No. You can extend a data logical volume and most root volumes online without single-user mode or a reboot. You still need to grow the filesystem (or use lvextend -r) so df reflects the new space.

2. What is the difference between lvextend -L +100M and lvextend -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 larger than the present size. The same plus rule applies to -l extents.

3. Why does df show the old size after lvextend succeeds?

lvextend only grows the logical volume block device. The filesystem still occupies the old size until you run resize2fs (ext2/3/4), xfs_growfs (XFS), or btrfs filesystem resize (Btrfs).

4. What if my volume group has no free space?

lvextend cannot create space. Add a disk, create a physical volume with pvcreate, run vgextend to add PEs to the VG, or shrink/remove another LV first. Then run lvextend again.

5. Can I extend a mounted logical volume?

Yes for grow operations on ext4 and XFS in normal use: extend the LV, then grow the filesystem while mounted (resize2fs on the device, xfs_growfs on the mount point). Always confirm the LV path and backup first.
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.