Storage & Filesystems
Storage & Filesystems
6 interactive questions
What is LVM? Why use it?
Logical Volume Manager abstracts physical disks into PVs → VGs → LVs. Benefits: resize volumes online, snapshots, span multiple disks, move data between disks. pvcreate → vgcreate → lvcreate.
How do you grow a filesystem?
- Extend LV:
lvextend -L +5G /dev/vg/lv. 2. Resize FS:resize2fs /dev/vg/lv(ext4) orxfs_growfs /mountpoint(XFS). ⚠️ XFS can only grow, not shrink.
What are the common filesystem types and when to use each?
ext4 — default, stable, good all-rounder. XFS — high performance, large files/parallel I/O, default on RHEL. btrfs — snapshots, compression, RAID built-in. tmpfs — RAM-backed, fast, data lost on reboot.
What is `/etc/fstab` and its fields?
Static filesystem mount config. Fields: <device> <mountpoint> <fstype> <options> <dump> <pass>. Use UUID/LABEL for device. noatime reduces writes. nofail allows boot to continue if missing.
How do you check disk usage and find large files?
df -h — filesystem usage. du -sh /path/* — directory sizes. find / -type f -size +100M — files >100MB. ncdu — interactive TUI.
What is RAID? Common levels?
RAID 0 — striping (speed, no redundancy). RAID 1 — mirroring (redundancy, 2 disks min). RAID 5 — striping + distributed parity (3+ disks, survives 1 failure). RAID 6 — dual parity (survives 2). RAID 10 — mirror + stripe (speed + redundancy).