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 can be 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 data losses or corruption due to an interruption from a system crash or power failure during disk writing.
Individuals with devices that have built-in journaling functionality can still access the latest version of a particular file with a lower likelihood of it becoming corrupted, even after a system crashed or an unexpected shutdown. The log contained in the journal can be used to promptly reconstruct corruptions that may have occurred due to an interruption.
Advantages and Disadvantages of Journaling File System
Based on the aforementioned, the obvious advantage of a journaling file system is that it limits the possibility of data losses or corruption that can transpire 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 strong likelihood that a user can access a recently modified file that despite encountering an interruption in disk operation.
Note that there are constant disk writes happening in the day-to-day activity of an operating system. Examples include writing or editing a word processing 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 functionality regularly keeps track and logs the changes made in actively written files.
The system also takes advantage of storage capacities that have grown exponentially over the years. Remember that there is a separate area on a disk allocated for journal entries. The logs do not have to be in proximity to each other. They are usually scattered all over the medium. The storage space allocated for these logs and the entire journal would be inconsequential to modern storage mediums because of their high storage capacities.
Of course, considering that it takes storage space, coupled with 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 outdated performance. Furthermore, journaling requires additional processing, memory, and disk access. These requirements can put old devices with old hardware under some stress.
Examples of File Systems with Journaling Functionality
New Technology File System or NTFS
Microsoft introduced NTFS in 1993 as a proprietary journaling file system for Windows 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 functionality that detects and repairs file system corruption online.
Extended File System or Ext
The Extended File System is a file system for Linux and Linux distributions such as Debian and Ubuntu. The most latest version of ext called the ext4 uses a small-sized block of data derived from another block of digital data called checksums to improve system reliability by avoiding a disk I/O wait during journaling.
Apple File System or APFS
Devices running macOS use the proprietary APFS of Apple by default. Although FAT32 and exFAT are compatible with this operating system, the Apple File System is the most ideal because of its specific journaling features that include creating snapshots that serve as a photocopy of the system at a specific point, and using checksums to ensure data integrity.