File Systems
Explain how names, inodes and blocks fit together, write data that survives crashes, and diagnose common file-system failures.
4 objectives 6 steps about 125 min
Check what you know
The lessons are coming later. The knowledge check is ready now.
This skill page is a public outline. Its lessons and knowledge check appear here as subject-matter experts approve them.
Learning objectives
- Explain inodes, directory entries, hard and symbolic links, and how the VFS presents different file systems through one API.
- Use open, read, write, lseek, fsync and rename through file descriptors, and explain how the page cache affects durability.
- Explain how journaling file systems (ext4, XFS) and copy-on-write file systems (Btrfs) keep metadata consistent after a crash.
- Diagnose full disks, inode exhaustion, deleted-but-open files and path permission failures with df, du, stat and lsof.
Lesson plan
6 steps, about 125 min · 0 of 5 lessons available so far
- Files are inodes: names, links and the VFS layer Concept · 20 min · coming later
- The file API: descriptors, offsets, the page cache and fsync Concept · 20 min · coming later
- Worked example: a crash-safe config update with write, fsync and rename Worked example · 25 min · coming later
- Crash consistency: journaling in ext4 and XFS versus copy-on-write in Btrfs Concept · 20 min · coming later
- Lab: full disk, no free inodes and the deleted file that still holds space Lab · 25 min · coming later
- Check: file-system scenarios from inode to durability Knowledge check · 8 questions
Practise it
Write an atomic-write utility in C or Python that replaces a file crash-safely (temporary file, fsync, rename, directory fsync) and show with strace that the calls happen in that order; then diagnose a provided VM where df reports free space but writes fail.
Build it from scratch
Practice builds that exercise this skill by re-creating a real technology.
- Build your own Text EditorIntermediate · 10–20 h
- Build your own Message BrokerAdvanced · 15–30 h
- Build your own DatabaseAdvanced · 30–60 h
- Build your own GitIntermediate · 10–20 h
References
Hard prerequisites
Unlocks
On these roadmaps
Progress and evidence for this skill are shared across all of them.