System information

Chapter 6. The Ext4 File System
The ext4 file system is a scalable extension of the ext3 file system, which was the default file system of
Red Hat Enterprise Linux 5. Ext4 is the default file system of Red Hat Enterprise Linux 6, and can
support files and file systems up to 16 terabytes in size. It also supports an unlimited number of sub-
directories (the ext3 file system only supports up to 32,000), though once the link count exceeds
65,000 it resets to 1 and is no longer increased.
Note
As with ext3, an ext4 volume must be umounted in order to perform an fsck. For more
information, see Chapter 5, The Ext3 File System.
Main Feat u res
Ext4 uses extents (as opposed to the traditional block mapping scheme used by ext2 and
ext3), which improves performance when using large files and reduces metadata overhead
for large files. In addition, ext4 also labels unallocated block groups and inode table
sections accordingly, which allows them to be skipped during a file system check. This
makes for quicker file system checks, which becomes more beneficial as the file system
grows in size.
Allo cat io n Feat u res
The ext4 file system features the following allocation schemes:
Persistent pre-allocation
Delayed allocation
Multi-block allocation
Stripe-aware allocation
Because of delayed allocation and other performance optimizations, ext4's behavior of
writing files to disk is different from ext3. In ext4, when a program writes to the file system, it
is not guaranteed to be on-disk unless the program issues an fsync() call afterwards.
By default, ext3 automatically forces newly created files to disk almost immediately even
without fsync(). This behavior hid bugs in programs that did not use fsync() to ensure
that written data was on-disk. The ext4 file system, on the other hand, often waits several
seconds to write out changes to disk, allowing it to combine and reorder writes for better
disk performance than ext3.
Warning
Unlike ext3, the ext4 file system does not force data to disk on transaction commit. As
such, it takes longer for buffered writes to be flushed to disk. As with any file system,
use data integrity calls such as fsync() to ensure that data is written to permanent
storage.
O t h er Ext 4 Feat u res
The ext4 file system also supports the following:
Red Hat Ent erprise Lin ux 6 St orage Admin ist rat io n G uide
32