Skip to content

Knowledgebase

Extending a Linux logical volume safely

servers

Expand a Linux logical volume only after mapping the target filesystem through its logical volume, volume group and physical volumes. LVM growth and filesystem growth are separate layers. A generic command copied with the wrong device name can damage another workload.

What you need before you begin

Take a recoverable backup and record lsblk -f, pvs, vgs, lvs and mount information. Confirm the intended LV path, filesystem type and required additional capacity. This procedure concerns expansion, not shrinking.

01 Extend a Linux logical volume safely

  1. Check free extents in the correct volume group. If enough are available, no new physical volume is needed. Reserve capacity for other planned volumes and snapshots instead of automatically consuming every free extent.
  2. If the backing disk was enlarged, confirm the operating system sees the new size and grow any intervening partition through a layout-specific procedure before resizing the physical volume.
  3. If adding a disk, verify it is genuinely new and empty using stable identifiers. Creating an LVM physical volume is destructive to existing contents, so never select a guessed /dev/sdX device.
  4. Expand the correct logical volume to the approved size using the supported lvextend options. Review the distinction between an absolute target size and an added amount before executing.
  5. Grow the filesystem with its supported tool, or use the tested LVM filesystem-resize integration when compatible. Ext4 and XFS have different requirements; do not run a formatting command.
  6. Record final sizes and validate the application. For encrypted or layered storage, follow the additional layer-specific procedure rather than skipping directly from disk to filesystem.

02 Example: map the disk, logical volume and filesystem before expansion

On an authorised Linux server with LVM, collect the layout before choosing any resize command. Replace /srv/data with the intended mount point. These inventory commands do not enlarge a disk, logical volume or filesystem.

Code or configuration example
lsblk -o NAME,SIZE,TYPE,FSTYPE,MOUNTPOINTS
sudo pvs
sudo vgs
sudo lvs -o lv_name,vg_name,lv_size,lv_path
findmnt --target /srv/data

Read the result: Confirm which logical-volume path backs the mount and whether its volume group has free extents. Additional size in the provider panel is not automatically usable space in LVM. A partition or physical volume may still need a separate supported expansion before the logical volume can grow.

Keep the actual device names with your backup and maintenance record. Choose the filesystem-specific procedure from this verified map. Never copy a sample /dev/sdX or volume-group name into a resize command without matching it to this server.

Should I use all remaining volume-group space?

Only if that allocation is deliberate. Keeping headroom can support snapshots, future growth and recovery operations. Choose a measured expansion rather than an automatic all-free-space command.

Confirm the expected result

Compare volume-group free space, logical-volume size and filesystem capacity at the actual mount point. Verify existing files, permissions and application writes. Check persistent mount configuration and create a fresh recovery point after acceptance.

Troubleshoot unexpected results

If the filesystem remains unchanged, inspect each layer and identify the first size mismatch. Stop when the partition or encryption layout is unclear. Do not attempt to reverse growth with a blind lvreduce; reducing an LV below the filesystem size can destroy data. Recover from a tested backup if metadata was damaged.

Was this answer helpful?

Need a little more help?

Our support team can help you find the next step.

Contact support