TechKnowSurge
CompTIA Tech+ 2.5 CompTIA Server+ 1.2 CompTIA A+ Core 2 1.8 CompTIA Server+ 4.3
VideoComputeFree

Journaling and Journaling File Systems

File system journaling is a method of logging intended changes before and during execution, allowing the system to detect and recover from incomplete operations that could otherwise cause data corruption or loss.

Complete this video to capture a CTF flag worth 1 point.

About this video

File system journaling is a data integrity mechanism that tracks changes to a file system by recording intended operations in a log before and during their execution. Because many file system tasks — such as deleting, moving, or modifying a file — require multiple discrete steps to complete, an unexpected interruption at any point in that sequence can leave the system in an inconsistent state. Journaling addresses this by maintaining a record of what the system set out to do, what steps were completed, and whether the operation was finalized, giving the system a reliable reference point for recovery. A straightforward example is file deletion, which requires removing an entry from the file allocation table and separately marking the corresponding data blocks as available for overwriting. If the system shuts down after the first step but before the second, the storage space is effectively orphaned — no longer referenced but not marked as free either. A journaling file system logs both steps and their completion status, so when the system comes back online it can detect the incomplete operation and resolve it correctly, either finishing the process or reversing it entirely. The concept of journaling is not unique to file systems. Databases and other transaction-based systems apply the same principle to ensure that multi-step operations either complete fully or leave no partial changes behind. Within the context of file systems specifically, those that implement this capability are classified as journaling file systems, and their use is considered a standard practice in environments where data consistency and recoverability are priorities.

What you'll learn

What's covered

File System Journaling

Aligned to

CompTIA Tech+
2.5 Compare and contrast storage types.
CompTIA Server+
1.2 Given a scenario, deploy and manage storage.
4.3 Given a scenario, troubleshoot storage problems.
CompTIA A+ Core 2
1.8 Explain common OS types and their purposes.

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.
Data Integrity
The assurance that data has not been altered or corrupted during storage or transmission.

Topics

File Systems Journaling Data Integrity Storage Management Operating Systems Crash Recovery

Transcript

Some of our file systems will actually do something called journaling. Journaling is a way that we can avoid some corruption that can happen on our devices and on our files.

Journaling is a term in computers that we can use in a lot of different scenarios, so I'm just going to explain what the concept of journaling is first.

The concept, with an order as the example

In your processes there's multiple things that have to happen. For instance, let's say we are selling something online and we want to charge the customer and then we're going to ship a product to them. We're just going to keep it simple and say there's two steps with this. Let's say I first of all take their order, maybe I'm online with them and I take their order, and so I charge their credit card for that order, and then I go and ship that order to them. But let's say I get distracted somewhere in between, so shipping never happens, I never get to the shipping part. That's problematic, because now our customer didn't receive their product but we've already charged them for that product.

So what happens is typically we write up an order, something that we write up that says we're going to ship it to this person. We charge the card for them, and then we take that order and we put it in the pile to be processed. We send them what needs to be sent to them, and then we take that order and put it in the finished pile. So there is some sort of record that's taking place that says we've completed this, this is now finished, to make sure that all our products get shipped out after we charge our customer.

The same problem in a file system

The same thing happens in file systems. There are changes where multiple processes, multiple steps, have to happen. As an example, let's say we delete file two from the system. It deletes it from the file allocation table, but it also needs to go and mark inside the actual data that now it can be written over, now we don't need this data anymore. So there's multiple steps that need to happen here.

But let's say something happens on the computer and we don't finish the task. Now what happens is that we remove it from the file allocation table, but we never mark that that space is free now, and now we've lost a chunk of data, we lost some of the data on our device. So this is just one example that can happen, but there are other things that can happen on our device too if we don't do journaling.

What journaling does

What journaling is, is that the first thing we're going to do is record what action we're trying to take. For instance, we're going to delete file.txt. Then we go through the process of deleting it from the file allocation table, and then we delete it or remove it, we mark it as being available in where our data is at, and then we mark this as being done. We can put a check mark next to it. Now if something happens along the way and the computer gets distracted, like maybe it gets shut down, it can recover from that, because it knows it can now do an assessment to see if it needs to go back and correct anything.

Not all file systems do this. The ones that do this we call journaling file systems. We can apply journaling in many different systems, like databases, but a journaling file system is a file system that actually does this process.

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 →