← LFCS: Linux administration in production
05 / 9 · 25 MIN

Storage, mounts, and recovery

Separate physical capacity, logical volume, filesystem, and mount dependencies.

Concept and mechanism

Storage has several layers. Growing an LV from 32 to 48 GiB requires another 16 GiB; if the VG has 12 GiB free, four are missing in this simple example. Free space inside the filesystem is not the same as free VG extents.

After expanding the LV, confirm whether filesystem growth also occurred. Some options coordinate both; extension without resizing can leave df showing the old size. Identify type, device, and mount before choosing a tool.

Mounted XFS can grow using its supported tool; resize2fs belongs to another filesystem family. mkfs creates a filesystem and is not a growth operation preserving existing data.

Guided application

Persistence and availability also need verification. An old fstab UUID may prevent a required mount; nofail allows certain startup failures to be tolerated but does not prove required data are present. Prevent an application from inadvertently writing into the empty directory beneath a mountpoint.

Currently active swap needs startup configuration when persistence is required. With autofs, a mount may expire while idle and return when the path is accessed; test access before declaring failure. In NFS, root_squash limits remote root, so intended identity and service permissions still matter.

For performance, correlate latency, queues, and workload; iowait alone does not size a disk purchase.

LFCS practice: blocks, inodes and open deleted files

In an isolated VM, create a small filesystem dedicated to the exercise, without modifying real volumes, and record both df -h and df -i. These answer different questions: free blocks and available inodes. ENOSPC may occur while blocks remain free when inodes are exhausted, for example after creating many small files.

Use lsblk -f, findmnt and blkid to identify the device, filesystem and mountpoint before making any change. In a separate exercise, keep a large test file open, unlink its name from another process and observe with lsof +L1 and df that its blocks can remain allocated while an open reference exists.

Recover space by ending the exercise normally and closing the descriptor, never by indiscriminately deleting system files. Record before/after evidence and interpret each measurement. If extending an LV, distinguish the LV size from filesystem size; correct growth depends on ext4, XFS or the actual format.

Never run destructive commands, mkfs, lvremove or fstab changes outside the disposable VM.

IN PRACTICE

lvs shows 100 GiB and df 80 GiB on XFS whose extension omitted resizing: validate growth at the filesystem layer.

Common pitfalls

Confusing total GiB with increment; filesystem with LV; nofail with available data; remote root with unlimited access.

Related topics: Commands and operational evidence · Identities, ACLs, and resource limits

Take this idea with you

Confirm identity and state at every layer before and after any storage mutation.

Create account

Reference: lvextend(8) · LFCS current five-domain outline; exact edition date unconfirmed

LFCS is a trademark of The Linux Foundation. Linux® is a registered trademark of Linus Torvalds. bigsavant.com is an independent preparation platform and is not affiliated with, associated with, sponsored, authorised or endorsed by The Linux Foundation or Linus Torvalds. Content and questions are original, are not official exam questions, and completing our tests does not award or guarantee any certification. Names are used only to identify the subject. All other trademarks belong to their respective owners.