OLE study materials
OLE study resources

OLE: Storage Administration: LVM, Filesystems, Mount Configuration, and Disk Management

OLE ยท Work through your exam, one topic at a time.

All guide sections

Storage Administration: LVM, Filesystems, Mount Configuration, and Disk Management

Storage questions on this exam are practical: build an LVM stack, grow it without downtime, wire it into /etc/fstab correctly, and recover when a mount fails at boot.

LVM layers

  • pvcreate /dev/sdb โ†’ vgcreate vg_data /dev/sdb โ†’ lvcreate -n lv_app -L 20G vg_data; inspect with pvs, vgs, lvs, pvdisplay.
  • lvextend -L +10G -r /dev/vg_data/lv_app resizes the LV and grows the filesystem in one step; -l +100%FREE consumes remaining extents.
  • Metadata backups are in /etc/lvm/backup; vgcfgrestore recovers a damaged volume group. After enlarging a virtual disk, run pvresize before extending.

Filesystems

  • XFS is the default on OL8/OL9: grow online with xfs_growfs (or -r), and it cannot be shrunk.
  • ext4 grows and shrinks with resize2fs; shrinking requires unmounting and e2fsck -f first.
  • Labels: mkfs.xfs -L app /dev/vg_data/lv_app, blkid to read UUIDs, tune2fs -L for ext4.

Mount configuration

  • /etc/fstab entries prefer UUID=; useful options are defaults, nofail, _netdev. Test with mount -a, then systemctl daemon-reload so systemd regenerates its .mount units. findmnt --verify validates the table.
  • Partitioning: parted for GPT, fdisk for MBR (2 TiB limit), partprobe to re-read, wipefs -a to clear stale signatures, sfdisk --dump for backups.

Worked example

A database LUN holding /u01 is 95% full. lvextend -L +20G -r /dev/vg_data/lv_u01 is correct because -r invokes fsadm, detects XFS, and calls xfs_growfs on the mounted filesystem. Confirm with df -h /u01 and lvs. If the filesystem were ext4 and space had to be removed, the order reverses: unmount, e2fsck -f, resize2fs, then lvreduce.

Traps

  • Attempting to shrink XFS is impossible; plan layout before loading data.
  • A typo in /etc/fstab drops the host to emergency mode; fix with mount -o remount,rw /sysroot and edit /sysroot/etc/fstab.
  • Device names like /dev/sdb can move; UUIDs do not.
  • LVM snapshots that fill up become invalid and are dropped.