File systems in depth: ext4, XFS, Btrfs and ZFS
You compare journaling, allocation, repair and tuning options, and put snapshots, compression and replication to work with Btrfs subvolumes and ZFS pools.
Level 401 · 19 lessons · 18 practice labs
Lessons
ext4 and XFS
- Journaling: what happens when the power goes
- ext4 tuning: tune2fs, reserved blocks and features
- Looking inside ext4 with debugfs
- XFS tools: xfs_info, xfs_growfs, xfs_repair
- Backups with xfsdump and xfsrestore
- Short task: safely use the reserved space on a "full" volume
Btrfs
- Btrfs subvolumes and mounting
- Snapshots and rollback
- Transparent compression and deduplication
- Incremental copies with send/receive
- scrub and balance: maintenance and consistency
- Short task: roll back a bad upgrade from a snapshot
ZFS
- ZFS pools and vdevs
- Datasets and properties: quotas, compression
- ZFS snapshots and replication
- Scrubs, checksums and the ARC cache
- Short task: replicate a dataset incrementally to a second pool
Choosing
- Choosing a file system for the workload
- Capstone: rebuild a file server with snapshots and compression
Practice labs
- Safely use reserved space on a full volume: Lower the reserved block percentage on a data volume with tune2fs and report the space freed.
- Trace a deleted file with debugfs: List deleted entries with debugfs and submit the deleted file's inode number and deletion time.
- Grow an XFS volume and repair a damaged one: Grow a mounted XFS volume with xfs_growfs, repair a second one that will not mount with xfs_repair and report any loss.
- Confirm the journal replayed after a crash: Mount a volume that lost power suddenly and find the kernel message showing the journal was recovered.
- Save space with transparent compression: Enable compression on the log subvolume, recompress existing files and measure the space saved.
- Find and repair silent corruption with a scrub: Detect corruption on one disk of a mirror with a scrub, report the number of repaired errors and clear the pool status.
- List the space used by snapshots: On a volume about to fill, list the snapshots and the space each holds exclusively, and submit the name of the largest.
- Transfer an incremental copy with send/receive: Send the difference between two snapshots incrementally to a second disk and confirm the data matches at the target.
- Take an incremental xfsdump and restore it: Take full and incremental dumps of an XFS volume, restore them in order to an empty volume and confirm the files match.
- Create and mount a Btrfs subvolume: Create a separate subvolume for home directories and mount it persistently with the subvolume option.
- Roll back a bad upgrade from a snapshot: Make a writable copy from the read-only snapshot taken before the update and switch the system back to it.
- Solve Btrfs reporting full with space free: On a volume that cannot write because metadata space ran out, inspect the allocation and redistribute it with balance.
- Build a mirrored ZFS pool: Create a mirrored pool from two disks, add a dataset and switch compression on.
- Set quotas and reservations on datasets: Create a dataset per team, set quotas and reservations and show the limit is enforced.
- Replicate a dataset incrementally to a second pool: Send the first full snapshot and then an incremental one to a second pool and verify both sides are equal.
- Choose a file system for the workload: Choose a suitable file system for each of three given workloads and justify each in one sentence.
- Move a share to a file system with snapshots: Move a share from ext4 to a new Btrfs volume with ownership and ACLs and set up hourly snapshots.
- Rebuild a file server with snapshots and compression: Split department shares into compressed volumes, set up daily snapshot retention and restore a file from yesterday's state.
About this course
You compare journaling, allocation, repair and tuning options, and put snapshots, compression and replication to work with Btrfs subvolumes and ZFS pools.
What you will learn
- ext4 and XFS
- Btrfs
- ZFS
- Choosing
Prerequisites
You should have practised the topics of the same path up to level 301.
Lab environment
Lessons run in your own Kali Linux terminal that opens in the browser. Nothing to install; the lab starts clean in every lesson.
Frequently asked questions
- Is this course right for my level?
- The course is at level 401; it assumes you know the topics of the lower-level courses.
- Is there anything to install?
- No. Every lesson runs in your own lab environment that opens in the browser.
- How do lessons work?
- Each lesson has 8 to 10 steps and a short quiz. Early steps show the command to type, later steps give less help; if two attempts fail, the solution opens.
- Can I try it for free?
- Yes. The first three lessons of every course are free.