Based on the Linux Master 1 exam syllabusReport an error
[Physical disk]
│ fdisk/gdisk/parted (partitioning)
▼
[Partition] ──(several)──> [RAID: mdadm] or [LVM: pvcreate→vgcreate→lvcreate]
│
▼ mkfs.ext4 / mkfs.xfs (format)
[Filesystem]
│ mount (temporary) / /etc/fstab (permanent)
▼
[Mounted directory]
│ quota (usage limits) / df·du·fsck (inspection)
▼
[Operation]
| Stage | Tools | Day |
|---|---|---|
| Understanding the filesystem (inode/block/journal) | stat, tune2fs, dumpe2fs | Day1 |
| Partitioning | fdisk, gdisk, parted | Day2 |
| Formatting | mkfs.*, mke2fs | Day2 |
| Mounting/making permanent | mount, umount, /etc/fstab | Day2 |
| Flexible volumes | pvcreate, vgcreate, lvcreate, lvextend | Day3 |
| Virtual memory | mkswap, swapon, swapoff | Day3 |
| Redundancy | mdadm (RAID) | Day4 |
| Usage limits | quotacheck, quotaon, edquota | Day4 |
| Inspection | fsck, df, du, lsblk, blkid | Day4 |
fsck -b.ordered guarantees metadata consistency (not lossless data). Modes: journal > ordered > writeback.df -i.df -h (capacity) and df -i (inodes) look at different things. "Plenty of capacity but can't create a file" = inode exhaustion, "out of capacity" = block exhaustion. The habit of diagnosing the two separately is important.
w saves and q cancels.mkfs.ext4 /dev/sdb1 = mkfs -t ext4 .... Deletes existing data.fuser -m/lsof). umount -l=lazy.⚠️ Pitfall Review: The order of the 6 fstab fields and the values of fields 5 and 6 (dump=almost always 0, pass=root 1·the rest 2·swap 0) are essential. If you don't verify with
mount -aafter editing, there is a risk of boot failure.
fstab in a table-like form once more:
UUID=abc /data ext4 defaults 0 2 ← Regular FS
UUID=def / ext4 defaults 0 1 ← Root (pass=1)
/dev/sdb2 none swap sw 0 0 ← Swap (pass=0)
pvcreate→vgcreate→lvcreate.lvextend (container) + resize2fs (ext) or xfs_growfs (xfs, mount point argument). If the VG is short, vgextend comes first.pvs/vgs/lvs, extend vgextend/lvextend. -L (capacity) / -l (PEs or %, 100%FREE).mkswap (initialize) → swapon (activate) → swapoff. fstab: none swap sw 0 0. Check with swapon -s/free -h."Extended the LV but df is unchanged" = resize2fs/xfs_growfs missing. The container and the contents are grown separately. xfs cannot be shrunk.
The RAID table (in full):
| Level | Method | Min. disks | Failures tolerated | Efficiency |
|---|---|---|---|---|
| 0 | Stripe | 2 | 0 | 100% |
| 1 | Mirror | 2 | 1 | 50% |
| 5 | Distributed parity | 3 | 1 | (N-1)/N |
| 6 | Double parity | 4 | 2 | (N-2)/N |
| 10 | Mirror + stripe | 4 | 1 per pair | 50% |
--create --level --raid-devices. Status via /proc/mdstat, mdadm --detail.usrquota → remount → quotacheck → quotaon → edquota. soft (grace/warning) vs hard (immediate block). Block and inode limits are separate.xfs_repair.⚠️ Pitfall Review: The minimum disk counts (0·1=2, 5=3, 6·10=4) and "RAID 1 and 0 have no parity" are the essentials. fsck only on an unmounted state.
# Partition
fdisk /dev/sdb # MBR (n/d/t/p/w/q)
gdisk /dev/sdb # GPT
parted /dev/sdb --script mklabel gpt mkpart primary ext4 0% 100%
# Format & mount
mkfs.ext4 /dev/sdb1
mount /dev/sdb1 /mnt/data
umount /mnt/data
blkid /dev/sdb1 # Check UUID → register in fstab → mount -a
# LVM
pvcreate /dev/sdb1; vgcreate vg0 /dev/sdb1; lvcreate -L 10G -n lv0 vg0
lvextend -L +5G /dev/vg0/lv0; resize2fs /dev/vg0/lv0
vgextend vg0 /dev/sdc1
# Swap
mkswap /dev/sdb2; swapon /dev/sdb2; swapon -s
# RAID
mdadm --create /dev/md0 --level=5 --raid-devices=3 /dev/sd{b,c,d}1
cat /proc/mdstat
# Quota
quotacheck -cugm /home; quotaon /home; edquota -u user1; repquota /home
# Inspection
df -hT; df -i; du -sh /var; lsblk -f; fsck -y /dev/sdb1Connected view: In practice these layers are stacked on top of one another. A typical configuration is disks → mdadm RAID → LVM PV → VG → LV → ext4/xfs → mount → quota. That is, RAID handles safety, LVM handles flexibility, the filesystem handles data structure, and quotas handle fairness. If you understand the design philosophy in which each layer independently solves one problem, applied questions can be solved too.
Check yourself with the 12 questions below.
fsck -b.df -i.mount -a : A verification command that tries applying all of fstab. A mandatory step before rebooting.lvextend and the contents with resize2fs/xfs_growfs. You need both for df to reflect it.mkswap and turn it on with swapon./proc/mdstat : The file showing software RAID status and rebuild progress.df vs du : Viewing remaining capacity through filesystem metadata versus walking paths to count occupancy.fsck / xfs_repair : Tools for checking and repairing filesystem integrity. fsck requires unmounting, and xfs uses its dedicated tool.Click a choice to reveal the answer and explanation.
Question 1
Which correctly describes where a file's name is stored in a Linux filesystem?
Question 2
What does ordered, the default journaling mode of ext3/ext4, guarantee?
Question 3
Which is NOT a characteristic of the MBR partition scheme?
Question 4
In /etc/fstab, what value should be specified in the 6th field (fsck pass) for the root filesystem (/)?
Question 5
Which lists the LVM components in the correct order from physical to logical?
Question 6
After extending an LV with lvextend, which command actually reflects the capacity in an ext4 filesystem?
Question 7
Which statement about the swap area is correct?
Question 8
Which correctly gives RAID 5's minimum number of disks and the number of simultaneous disk failures it tolerates?
Question 9
Which statement about RAID levels is NOT correct?
Question 10
Which statement about the soft limit of a disk quota is correct?
Question 11
Which correctly describes the difference between df and du?
Question 12
Which is a correct precaution when using fsck, the filesystem integrity check tool?