1.3 Ext3

The Ext3 file system is a journaled file system that has the greatest use in Linux today. It is the default file system in SUSE Linux Enterprise Server 11 distributions. It is quite robust and quick. Ext3 is based on the Ext2 code and shares its on-disk format as well as its metadata format. The reliability and solidity of Ext2 is elegantly combined in Ext3 with the advantages of a journaling file system.

Access Control

Ext3 uses the POSIX extended access control model.

Availability

Ext3 journaling is designed to take care of both metadata and data integrity and keep them in a consistent state. The amount of time to recover an Ext3 file system after an unclean system shutdown does not depend on the size of the file system or the number of files; rather, it depends on the size of the journal used to maintain consistency. The default journal size takes about a second to recover, depending on the speed of the hardware.

Integrity and performance can be customized by specifying the journaling mode as journal, ordered, or writeback. Enabling Ext3 in the data=journal mode offers maximum security (data integrity), but can slow down the system because both metadata and data are journaled. Enabling Ext3 in the data=ordered mode ensures both data and metadata integrity, but it uses journaling only for metadata. The file system driver collects all data blocks that correspond to one metadata update. These data blocks are written to disk before the metadata is updated. As a result, consistency is achieved for metadata and data without sacrificing performance. A third option to use is data=writeback, which allows data to be written to the main file system after its metadata has been committed to the journal. This option is often considered the best in performance. It can, however, allow old data to reappear in files after a crash and recovery even though the internal file system integrity is maintained.

IMPORTANT:Ext3 uses the data=ordered option as the default.

Scalability

Ext3 does not scale well to large volumes or to a great number of files. The recently added Ext3 h-trees feature significantly improves its scalability over Ext2. However, it is still not as scalable as some of the other file systems in Linux. With h-trees, Ext3 scales similarly to NTFS. Without h-trees, Ext3 handles about 5,000 files in a directory.

Speed

Ext3's journaling optimizes hard drive head motion, which typically provides a higher throughput than Ext2. The journaling mode you use determines the performance achieved.

Easy and Highly Reliable Upgrades from Ext2

The tune2fs utility makes it possible to easily upgrade an Ext2 file system to Ext3 without reformatting.

Downgrading from Ext3 to Ext2 is also easy. Just perform a clean dismount of the Ext3 file system and remount it as an Ext2 file system.

Default Ext3 Inode Size

To allow space for extended attributes and ACLs for a file on Ext3 file systems, the default inode size for Ext3 was increased from 128 bytes on SLES 10 to 256 bytes on SLES 11. The maximum number of files that can be stored for an Ext3 file system on SLES 11 is reduced by half as compared to Ext3 file systems created on SLES 10 because each inode consumes twice the space. As a result, you need to use larger partitions to hold the same number of files on SLES 11. The inode setting cannot be changed for an existing Ext3 file system unless the file system gets extended.

If you do not use extended attributes or ACLs on your ext3 file systems, you can set the inode size to 128 bytes by using any of the following methods:

  • Modifying the default for all new Ext3 files: Modify the /etc/mke2fs.conf file to set the default inode_ratio to 8192. The value applies to all new Ext3 file systems.

  • At the command line: Pass the bytes-per-inode option (-i 8192) to the mkfs.ext3 command when you create a new Ext3 file system.

  • During installation with YaST: Pass the Bytes per inode option when you create a new Ext3 file system during the installation. In the YaST Partitioner on the Edit Partition page under Formatting Options, select Format partition > Ext3, then click Options. In the File system options dialog box, select 8192 from the Bytes per inode drop-down list, then click OK.

  • During installation with autoyast: In an autoyast profile, you can use the fs_options tag:

    <fs_options>
      <opt_bytes_per_inode>
        <option_str>-I</option_str>
        <option_value>8192</option_value>
      </opt_bytes_per_inode>          
    </fs_options>
    

For information, seeSLES11 ext3 partitions can only store 50% of the files that can be stored on SLES10 [Technical Information Document 7009075].