EXT File Systems EXT2 The Second Extended File System (EXT2) file system is a replacement of the Extended File System (EXT). The file system was created by Rémy Card in 1993. EXT2 was the default file system for Linux until EXT3 came along. EXT2 still is a favored file system for Flash and USB drives due the lack of journaling. Journaling requires more writes to the storage unit and can be slow on these external devices. The Flash and USB drives have a limited number of write cycles. The file and space limitations are as follows: Block Size: 1KB 2KB 4KB 8KB File size: 16 GB 256 Gigabytes 2 Terabytes 2 Terabytes File system: 4 Terabytes 8 Terabytes 16 Terabytes 32 Terabytes The directory and file structure is not indexed, so searching within a directory with a large amount of files can be time consuming. EXT2 allows for a patch to be added which is an add-on (e2compr) to allow file compression. Compression is a method which compresses files on the file system to save space. Compression can also increase read speeds from the storage unit. Files and directories are stored within Inodes. The date ranges for timestamps can only go as high as January 18, 2038. Once this date is reached, the EXT2 file system will no longer store proper timestamps. Either other file systems must be used or a patch must be applied, if one exists. EXT3 The EXT2 file system was extended by Stephen Tweedie in 1998 to produce the Third Extended File System (EXT3). The file system was ported into the Linux kernel, version 2.4.15, in 2001. The EXT3 file system has the ability for an in-place upgrade from EXT2. An in-place upgrade is when one file system can be converted to another. When the conversion occurs, there is no requirement for the files to be backed up, the volume reformatted and the files restored. The size limitations on EXT3 are as follows: Block Size: 1KB 2KB 4KB 8KB File size: 16 GB 256 Gigabytes 2 Terabytes 2 Terabytes File system: 2 Terabytes 8 Terabytes 16 Terabytes 32 Terabytes There is a 32,000 limit on the number of sub-directories within a directory. Directories are stored in a table for searching, but when indexing is enabled, the directory structure is stored in a hashed B-Tree (H-tree). Free file space is managed in a bitmap while metadata is kept in a table. NOTE: Bitmaps are used to track used and unused space. These bitmaps are not images, but a file where each bit represents an addressable block. Each bit is either on (1) or off (0) to represent if it is used or free. EXT3 supports Journaling and all three of its types: Journal [writeback] Ordered (default) [ordered] Witeback [data] Journaling allows a file system to recover unwritten data from an improper shutdown. Similar to EXT2, EXT3 allows for a patch (e3compr) to be installed to enable compression. Files and directories are stored within Inodes. Online Resize is available to add space to the existing file system by adding more partitions to the existing file system. Similar to EXT2, the date ranges for timestamps can only go as high as January 18, 2038. Once this date is reached, the EXT3 file system will no longer store proper timestamps. Either other file systems must be used or a patch must be applied, if one exists. Some EXT3 file systems (depending on kernel version) can support Persistent Preallocation. In this method, space is 'reserved' or allocated for a file before it is written. EXT4 The Fourth Extended File System (EXT4) was originally started as extensions to EXT3 to improve performance and stability. After awhile, the extensions were included as a new file system - EXT4. The stable code for EXT4 was released in Linux kernel version 2.6.28 on December 25, 2008. EXT4 uses a 48-bit addressing system. This addressing system allows for a maximum file size of 16 Terabytes. The maximum volume size is 1 Exabyte Directory listings are kept in an H-Tree for faster searching. The number of sub-directories within a directory is not limited. Files stored on an EXT4 file system are stored in Extents. Extents reduce fragmentation and improve performance. Bitmaps are also used to track used and unused blocks. Timestamps have a date limitation at April 25, 2514. EXT4 uses Multi-Block Allocation to write multiple blocks at once instead of one block at a time to provide better performance. This method is also used with Delayed Allocation to provide better performance by flushing the cache at set time intervals instead of when data is sent to the cache. Like EXT3, EXT4 uses a Journal. If Journaling is not needed, it can be disabled to remove file consistency ability if an improper shutdown occurs. Without the Journaling, performance is improved. EXT4 supports Online Defragmentation by using the e4defrag tool. Fragmentation occurs more when the free drive space is low. When this occurs, disk performance can be greatly affected. Defragmenting the drive can restore slow drive performance. EXT3 supported a default of 128 kilobyte Inodes, while EXT4 supports 256 kilobyte Inodes. EXT4 supports Persistent Preallocation. In this method, space is 'reserved' or allocated for a file before it is written.