Skip to main content
To extend an LVM logical volume, make sure its volume group has free space, then run sudo lvextend -r -l +100%FREE /dev/vg0/root. The -r option grows the file system in the same step. If the disk got bigger, run sudo pvresize /dev/vda3 first; if you added a disk, run sudo pvcreate /dev/vdb and sudo vgextend vg0 /dev/vdb first. Check with df -h.

Before you start

  • Take a backup first. Disk work on a live server can go wrong. On a VPS, take a panel backup; see also back up a Linux server.
  • Connect with SSH. Commands use sudo; root users can leave it out.
  • Keep console access ready: on a VPS the VNC console and rescue mode; on a dedicated server your KVM/IPMI console or a ticket.
  • LVM tools come in the lvm2 package: sudo apt install lvm2 or sudo dnf install lvm2.

What is LVM?

LVM (Logical Volume Manager) puts a flexible layer between disks and file systems: You can grow a logical volume while it is mounted and add disks to the pool later.

How to check your LVM layout

VFree is unused space in the volume group. Your names will differ; use the ones vgs and lvs show. lsblk shows how everything fits together.

How to extend a logical volume with free space

If VFree is more than zero:
  • -l +100%FREE adds all free space. Use -L +10G to add 10 GB instead.
  • -r (--resizefs) grows the file system too, for ext4 and XFS, while it is mounted.
Check it worked:
Without -r, the logical volume grows but the file system does not, so df shows no change. Run sudo resize2fs /dev/vg0/root (ext4) or sudo xfs_growfs / (XFS) to fix it. Never use lvreduce on a volume holding data unless you have a backup: XFS cannot be shrunk at all.

How to extend LVM after the disk got bigger

When the disk itself is bigger (for example after a plan upgrade), grow each layer from the bottom up:
1

Grow the partition that holds the PV

Find it with sudo pvs (here /dev/vda3), then:
See resize a partition after a disk upgrade for installing growpart.
2

Tell LVM the PV is bigger

sudo vgs now shows more VFree.
3

Extend the logical volume and file system

How to add a new disk to a volume group

pvcreate erases the disk you name. Check with lsblk and sudo wipefs -n /dev/vdb (no output means empty) that you have the new, empty disk.
1

Make the disk a physical volume

2

Add it to the volume group

3

Extend the logical volume

A logical volume spread over two disks is lost if either disk fails. On a dedicated server with several disks, put LVM on top of software RAID if you need to survive a disk failure, and keep backups either way.

How to create a new logical volume

To use free space as a separate volume, for example for /srv/data:
Add it to /etc/fstab to mount at boot, as shown in mount a new disk.

Frequently asked questions

How do I know if my server uses LVM?

Run lsblk. If the TYPE column shows lvm, or the root device is /dev/mapper/…, it uses LVM.

Can I extend the root logical volume while the server is running?

Yes. lvextend -r grows ext4 and XFS online, including /.

What is the difference between -L and -l?

-L takes a size such as +10G. -l takes extents or a percentage such as +100%FREE.

Why does pvresize not add any space?

The partition under the PV has not grown yet. Run growpart on it first, then pvresize again.

VPS and dedicated server guides

Every guide in this section.

Resize a partition after a disk upgrade

growpart, resize2fs and xfs_growfs.

Mount a new disk

Format, mount and add to fstab.

Software RAID with mdadm

Protect data on dedicated servers.

Check disk space

Confirm the new space.

Checked against the official Red Hat Enterprise Linux 9 guide to modifying the size of a logical volume on 4 November 2026; pvcreate, vgcreate, vgextend, pvresize, pvs and vgs tested on Ubuntu 24.04 LTS (lvm2 2.03.16) using loop devices. lvcreate and lvextend were checked against the documentation only. Commands can differ on other distributions or releases.

Need Extra Help?

If you encounter any issues, our support team is ready to assist:

Save on Your Hosting

Ready to upgrade your hosting? Use code KB20 at checkout for 20% off your first order!

Last Updated: November 2026