What is a Journaling File system

As we discussed in a previous post, Linux servers offer many different types of file systems, and every other server operating system also offers a choice of file systems. One type of file system you might encounter is called a journaling file system. What is it and how does it differ from a standard Linux file system?

A journaling file system is designed to protect against data loss by recording disk transactions to a log in case of system failure. Upon reboot, the file system normally compares the log to the actual files and corrects any discrepancies. Without this type of journaling in place, a single crash could cause disk corruption.

The old default Linux file system, Ext2, did not have journaling. Newer Linux file systems such as Ext3 and Ext4 use journaling. XFS supports journaling as well. Similarly, older Windows file systems, such as FAT and FAT32 do not support journaling, whereas NTFS does.

The main disadvantage of a journaling file system is that it involves more disk accessing than other file systems. This theoretically could make them slower, but with many modern disks and file systems, you might not notice a difference. There is also some debate about how to use journaling with solid state drives (SSD) or even if one should use them at all.

For more information about journaling file systems, see this article.