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
lvm2package:sudo apt install lvm2orsudo 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
IfVFree is more than zero:
-l +100%FREEadds all free space. Use-L +10Gto add 10 GB instead.-r(--resizefs) grows the file system too, for ext4 and XFS, while it is mounted.
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 See resize a partition after a disk upgrade for installing
sudo pvs (here /dev/vda3), then: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
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:
/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?
Runlsblk. 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. Rungrowpart on it first, then pvresize again.
Related guides
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:- Live Chat: Quick assistance via our website.
- Support Ticket: Open a Ticket
- Discord: Join our Community
- Email: support@freakhosting.com
Last Updated: November 2026