Free — no signup required

Introduction: The Power Failure Nightmare

1 min read

The "Half-Written" State

Imagine you are editing a spreadsheet. You hit "Save." The hard drive starts writing. Halfway through, the power goes out.

When you reboot, what is the state of your filesystem?

  1. Best Case: The file reverts to its old version — the write never happened.
  2. Worst Case: The filesystem thinks the file is there (metadata exists), but the data blocks contain random garbage or partial content from another file.

This is filesystem corruption. The directory entry says the file exists, the inode says it has 4 KB of data, but the actual bytes on disk are meaningless. The filesystem is internally inconsistent — its metadata lies about reality.

In the era of ext2 (the dominant Linux filesystem before ~2001), recovery meant running fsck (File System Check), a tool that scanned every inode and data block on the entire disk to find and repair inconsistencies. On a large disk, this could take hours. During that time, the system was unavailable. Modern filesystems solve this with a fundamentally different approach.

This is one of 18 chapters

Every chapter is free — Kubernetes, Terraform, SRE, distributed systems, and more — with fast daily review built in.

Sign up free