TechKnowSurge
InteractiveComputeFree

Power Cut Mid-Delete: What Does the Restart Find?

Predict what a restart finds when the power fails partway through a delete, with a journaling file system and without one.

⚑ Complete this interactive to capture a CTF flag worth 5 points.

About this interactive

Some file systems keep a journal. Deleting a file is more than one step, and if the power fails between two steps the file system can be left half changed. In the lesson's example a file is taken out of the allocation table and its space is then marked free. Cut the power in between and the file is gone but its space was never marked free, so no file claims it and nothing says it can be reused. The lesson calls that a lost chunk of data on the device. A journaling file system writes a note first. It records the action it is about to take, such as delete song.mp3, then does the steps, then puts a check mark next to the entry to say the job is done. The lesson's shop works the same way: an order slip is written up, the card is charged, the slip waits in the pile to be processed, and it moves to the finished pile only once the product has shipped. A slip still in the first pile is an order that was started and not finished. After a power cut or a shutdown, the restart reads the journal. An entry with a check mark is finished and left alone. An entry with no check mark was started and may not have been finished, so the restart assesses it and corrects whatever is left, such as freeing the space. No entry means nothing was begun and nothing needs correcting. A file system with no journal has no such note: if the power fails between the two steps it has nothing to go back and check, so the space stays lost. (A repair tool that scans the whole disk may find lost space later.) The lesson splits a delete into two steps to show the idea, and real file systems divide their changes in their own ways, but the principle is the same. Journaling keeps the file system's own records in step. The lesson says it avoids some corruption, not all of it, so it is not a promise that everything being saved at the moment of a crash survives. The same idea is used in databases.

What you'll learn

Key terms

File System Journaling
A method used by file systems to record intended multi-step operations before executing them, enabling recovery and preventing data corruption if a process is interrupted.
Journaling File System
A file system that maintains a journal of pending operations to ensure incomplete processes can be detected and corrected after an interruption.
File Allocation Table
FAT
A simple legacy file system that uses a table to track which clusters on a disk are allocated to files and which are free, developed for early PC operating systems. FAT variants (FAT16, FAT32) are still used on removable media such as USB drives for broad compatibility.

Topics

Journaling File Systems Crash Recovery Data Integrity Interactive Predict

About TechKnowSurge

TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.

Explore free tools and programs →