A journaling file system is a specific type of a file system that tracks changes that have not transpired in the main part of the file system by recording them in a data structure known as a journal. It specifically allocates a special area to record changes ahead of time. The journal contains critical information about the changes made in specific files.
The system is best described as some sort of insurance against interruptions in disk or storage medium operations. It provides a particular file system and the entire operating system with the capability to prevent or lessen the likelihood of corruption or data losses due to an interruption from a system crash or power failure while the medium is in operation.
Users of devices with a built-in journaling feature can still access the latest version of a particular file with a lower likelihood of it becoming corrupted, even after a system crashes or an unexpected shutdown. The log contained in the journal can be used to promptly reconstruct corrupted data that may have occurred due to a sudden interruption.
Advantages and Disadvantages of Journaling File System
1. Pros: Reduces Data Loss Risk and Enables Data Recoverability
The obvious advantage of a journaling file system is that it reduces the likelihood of data corruption or data losses that can occur when a storage medium in write mode is making changes to a particular file and encounters an interruption due to an unexpected system crash or power failure. There is a better prospect that a user can still access and recover the most recently modified file despite encountering an interruption in disk operation.
It is important to note that there are constant disk writes happening while an operating system is in operation or while using software applications. Specific examples include writing and editing a document, updating a folder or transferring files, and installing software updates, among others. An operating system installed on a storage medium formatted with a journaling feature regularly keeps track of and logs the changes made in actively written files.
The system also takes advantage of newer storage mediums with larger capacities. Remember that there is a separate area on a disk allocated specifically for journal entries. The logs do not have to be in proximity to each other. They are usually scattered all over the writeable area of a particular storage medium. The allocated storage space for these journal entries or logs is inconsequential to modern storage mediums with higher storage capacities.
2. Cons: Increases Storage Space Usage and Overhead Processes
However, considering that it takes storage space, in addition to the fact that it works in the background, a considerable disadvantage of a journaling file system is that it might not be suitable for older storage mediums that have low capacity and slower read-write performance. Journaling also requires additional processing, random access memory, and disk access. These requirements can put old devices with old hardware under some stress.
The overhead operation is the biggest disadvantage because it can reduce write performance and storage performance. This comes from the need to track changes and write logs before they can be written to the disk. However, considering modern storage technologies, and advanced processing capabilities of modern computers, this might not be a problem. This drawback applies to older and slower storage mediums and outdated computer processors.
It is also more complex than non-journaling file systems such as FAT32 and exFAT. This can make the more difficult to manage and troubleshoot. It is also not compatible with older operating systems and platforms or hardware. Furthermore, despite providing a safeguard against data corruption or data loss due to unexpected interruption, it is still vulnerable to errors due to hardware failures, software bugs, human errors, and malicious attacks.
Examples of File Systems with Journaling Functionality
1. New Technology File System or NTFS
Microsoft introduced NTFS in 1993 as a proprietary file journaling system that aims to address the limitations of FAT32. It uses log files and journal checkpoint information to recover the stable values of a file system after the operating system resumes its operation. There is also the self-healing NTFS feature that detects and repairs file system corruption online.
2. Extended FileSystem or Ext
The Extended FileSystem or EXT is a file system for Linux. It works with all Linux distributions such as Debian and Ubuntu. The most recent version of EXT called the ext4 uses a small-sized block of data derived from another block of digital data called checksums to improve overall system reliability through avoiding a disk input-output wait during journaling.
3. Apple File System or APFS
Several Apple operating systems such as macOS, iOS, and iPadOS use the proprietary APFS. It is not a journaling file system in the traditional sense but still has similar features such as fast data recovery, reliable data writing, and metadata protection. It is based on a copy-on-write snapshotting technology to prevent data corruption or data loss due to interruption.