lvextend -r -L +50G /dev/vg0/data

LVM Command Builder

LVM is four layers and a sequence of commands that have to happen in order. Pick a task and get the whole sequence, not a fragment.

Space separated for multiple.
Or 100%FREE, or +50G to extend.

lvextend -r is the flag that matters

Growing a logical volume does not grow the filesystem inside it. Run lvextend without -r and the block device gets bigger while df reports exactly the same size, which sends people looking for a problem that is not there. The -r flag calls resize2fs or xfs_growfs for you in the same step. Note also that ext4 can be shrunk offline and XFS cannot be shrunk at all, ever, so size XFS volumes conservatively and grow them later.

Generate LVM command sequences

This LVM builder produces the full command sequence for common logical volume tasks: creating a physical volume, volume group, and logical volume from a fresh disk, extending a volume with the filesystem resize included, taking and cleaning up snapshots, adding a disk to an existing group, and removing a volume. It also outputs the pvs, vgs, and lvs commands for checking what you actually have.

LVM FAQ

What are PV, VG, and LV actually for?

A physical volume is a disk or partition handed to LVM. A volume group pools one or more of those into a single space. A logical volume is a slice of that pool that behaves like a partition. The point of the indirection is that you can add disks to the pool and grow a volume across them without repartitioning anything.

Can I shrink a logical volume?

With ext4, yes, but you must unmount, shrink the filesystem first with resize2fs, then shrink the volume, and getting the order wrong destroys data. With XFS, no, shrinking is not supported at all. Plan for growth rather than shrinking.

How much space does an LVM snapshot need?

Enough for the blocks that change while it exists, not a full copy. If a snapshot runs out of allocated space it becomes invalid and unusable, so size it for your expected churn and delete it when the backup finishes. They are for consistent point-in-time copies, not long-term storage.

Is LVM worth it over plain partitions?

On a server, usually yes, because resizing without repartitioning and snapshotting before an upgrade are both genuinely useful. On a single-disk desktop the benefit is smaller, and Btrfs or ZFS give you subvolumes and snapshots with less layering. Our LVM explainer covers the tradeoffs.