LPIC-2 201-450 study materials
LPIC-2 201-450 study resources

LPIC-2 201-450: Filesystem and Devices

LPIC-2 201-450 · Work through your exam, one topic at a time.

All guide sections

Filesystem and Devices

Filesystem and Devices tests creating, mounting, checking, growing and limiting filesystems, plus the device interfaces that expose kernel state.

Rules and tools

  • mkfs.ext4 and mkfs.xfs create filesystems; e2fsck checks ext4 and xfs_repair checks XFS. Check ext4 offline or read-only.
  • ext4 grows online with resize2fs; XFS grows with xfs_growfs on the mountpoint and cannot shrink.
  • /etc/fstab fields are device, mountpoint, type, options, dump, pass. Prefer UUID= from blkid over kernel device names.
  • mount -o remount,ro / changes state; mount -a validates fstab; noatime reduces metadata writes.
  • Swap: mkswap, swapon, swapoff; fstab entry none swap sw 0 0.
  • Quotas need usrquota/grpquota mount options, quotacheck -cug, quotaon, then edquota and repquota.
  • udev rules live in /etc/udev/rules.d; /proc and /sys are kernel interfaces, not ordinary files.

Worked example

An ext4 filesystem on /dev/vg/data, mounted at /data, is full. Run lvextend -L +10G /dev/vg/data, then resize2fs /dev/vg/data while mounted. If it were XFS, use xfs_growfs /data instead. Reasoning: the block device must grow first, then the filesystem; ext4 supports online growth, while XFS grows to the device size via its mountpoint.

Traps

  • Running fsck on a mounted read-write filesystem.
  • Relying on /dev/sdb names that can reorder.
  • Forgetting quota mount options or the fstab pass field.
  • Trying to shrink XFS.