Candid photograph of a Linux server terminal with a soft olive-green glow against a dark slate background, conveying a calm technical atmosphere.

Step-by-step guides for system administrators — covering command-line basics, web server setup, and preparation material for technical interviews.

Browse Tutorials

Managing LVM thin provisioning volumes on Linux

LVM thin provisioning lets administrators advertise a larger logical volume than the physical extents immediately available. A thin pool stores chunks allocated on demand, so each thin volume consumes space only when data is written. This suits workloads that need room to grow without reserving every gigabyte in advance.

The trade-off is shared contention: an overcommitted pool can fill even while individual filesystems report free space. Sound management combines capacity checks, filesystem-aware growth and close monitoring of both data and metadata usage. The commands below apply to RHEL, CentOS Stream and Fedora systems running LVM2.

That matters in Australia, where estates often combine on-premises racks in Sydney or Melbourne with cloud platforms in APAC. Teams handling Australian data-residency requirements may retain backups locally, while an Aussie administrator may be told to “have a gander” at pool utilisation before making changes.

Check the storage and existing LVM layout

Start by identifying block devices and confirming that the chosen disk is not mounted or already in use. The filesystem, mount point and device mapper columns prevent an expensive mistake:

lsblk -o NAME,SIZE,TYPE,FSTYPE,MOUNTPOINTS
pvs
vgs
lvs -a -o +devices

Use the LVM views to check whether a volume group already owns the device. For this example, assume /dev/sdb is a new, empty 120 GB disk and vgthin does not yet exist:

pvcreate /dev/sdb
vgcreate vgthin /dev/sdb
pvdisplay /dev/sdb
vgdisplay vgthin

Create the physical volume and volume group, then inspect the result. The 100G free space advertised here will be used by the thin pool created next.

Create a thin pool and thin volumes

A thin pool combines a data area with reserved metadata, while thin volumes expose virtual capacities that can exceed their current allocations. Create a 100 GB pool and two volumes with 200 GB and 50 GB virtual sizes:

lvcreate --type thin-pool --size 100G --name thinpool vgthin
lvcreate -V 200G -T -n appdata vgthin/thinpool
lvcreate -V 50G -T -n logs vgthin/thinpool

Those values are capacities, not duplicate reservations. The app volume receives blocks only as its filesystem writes them, and both volumes draw from the same pool. Metadata tracks allocations and must remain healthy for the volumes to remain usable.

Before production use, record the VG metadata and have the commands reviewed against local change procedures. The quality assurance guidance can support a separate pre-deployment check.

Format and mount the new volumes

Create and mount a filesystem for each thin volume. UUID-based fstab entries survive device-name changes and are safer than relying on /dev paths:

mkfs.xfs /dev/vgthin/appdata
mkdir -p /srv/appdata
blkid /dev/vgthin/appdata

Enter the displayed UUID in /etc/fstab, then mount the volume:

mount /srv/appdata
findmnt /srv/appdata
df -hT /srv/appdata

The logical size can be much larger than the pool allocation, while df shows the actual amount currently available to the application. Inspecting both views prevents virtual capacity from being mistaken for usable physical space.

Keep one thin volume per filesystem when possible. This makes growth, snapshots and removal easier to reason about, particularly when the volume contains database files rather than expendable cache data.

Grow, monitor and reclaim capacity

Extend a thin volume by increasing its virtual size; this does not require matching physical free space immediately, but the pool must have room when data is written. Grow the filesystem while it remains mounted:

lvextend -L +20G /dev/vgthin/appdata
xfs_growfs /srv/appdata

Use xfs_growfs for XFS or resize2fs for ext4. Monitor Data and Meta percentages in the thin pool rather than relying on filesystem free space. Alerting around 70–80 percent gives teams time to add capacity or remove unused allocations:

watch -n 5 "lvs -o lv_name,lv_size,pool_lv,data_percent,metadata_percent vgthin"

Deleting an unneeded thin volume returns its allocated chunks to the pool. Filesystem trimming can expose more space, while reducing a thin volume or shrinking a filesystem requires a carefully planned offline procedure and carries a higher risk than extension.

Create snapshots and protect recovery points

Snapshots use copy-on-write behaviour and initially share data with their origin. For a thin origin, create the snapshot in its existing pool and reserve room for changed blocks:

lvcreate --snapshot --name appsnap vgthin/appdata
lvs -o lv_name,origin,pool_lv,data_percent,metadata_percent

Never treat a snapshot as a backup. It may share the same disk and pool as the source, and an application or database can require quiescing to produce a consistent recovery point. Test restoration with the backup software used by your organisation.

Keep an off-site or separately protected copy under the retention rules that apply to the workload. In Australian environments, that may mean an approved Australian backup region, but residency obligations should be confirmed for the specific data rather than assumed.

Keep thin storage healthy in production

Production thin storage benefits from routine LVM and device-mapper checks. Save VG metadata, retain lvm.conf backups and test volume activation after maintenance. If a thin volume is missing, inspect lvs, dmsetup status and the relevant kernel messages before attempting repair:

vgcfgbackup vgthin
dmsetup status

Where a thin volume supplies static assets or application data to Nginx, confirm mount ordering, permissions and SELinux labels alongside the web server configuration guides. A healthy block device cannot compensate for an application that starts before its files are mounted.

The durable lesson is that thin provisioning is a shared capacity model, not free storage. Remember to plan for pool exhaustion, monitor data and metadata separately, protect snapshots as temporary recovery aids, and verify every growth or restoration operation.