Written by Christian Ahmer | 11/24/2023

Ext3

The ext3 or third extended filesystem is a journaled file system that is commonly used by the Linux kernel. It is the successor to ext2 and was primarily engineered by Stephen Tweedie, commencing development in 1998 and introduced into the Linux kernel in November 2001. The ext3 file system is renowned for its backward compatibility with its predecessor, ext2, which allows for easy upgrades from ext2 without needing to backup and restore data.

One of the most significant enhancements introduced with ext3 is the implementation of journaling. Journaling is a system that keeps track of changes not yet committed to the file system's main part by recording the intentions of such changes in a data structure known as a journal. In the event of a system crash or power failure, ext3 can use the journal to avoid the lengthy file system check that ext2 required and quickly return the file system to a consistent state. This feature significantly improves the reliability and integrity of the file system in a way that was not possible with ext2.

Ext3 supports three types of journaling modes:

Journal mode: Metadata and content are saved to the journal.
Ordered mode: Only metadata is saved to the journal; however, it ensures that content is written to the main file system before its metadata is marked as committed in the journal.
Writeback mode: Metadata is journaled only, and content may be written after the metadata has been committed.
Another feature of ext3 is the online file system resize capability, which allows the size of the file system to be increased while it is mounted and in use. This adds a layer of flexibility for system administrators and reduces downtime.

Ext3 continues to use the block mapping scheme introduced in ext2, which can become inefficient for large files. However, ext3 added a "dir_index" feature that uses a balanced tree (or "htree") to speed up lookups in large directories.

The file system has an inode size of 128 bytes by default, but this can be increased if needed to store additional information like extended attributes, which can be used for access control lists (ACLs) or to store other metadata not supported by the traditional file system structure.

Ext3 supports file systems up to 32 tebibytes (TiB) in size with up to 2 terabytes (TB) for the maximum file size, depending on the block size. The number of subdirectories in a single directory is limited to 32,000, which is a significant increase from ext2's limit of 3,200.

Despite these enhancements, ext3 has its own set of limitations and has been succeeded by ext4, which offers even greater performance, scalability, and reliability. Nevertheless, ext3 remains in use due to its stability and the widespread support across different Linux distributions and systems.