Fact-checked by Grok 2 weeks ago

Extended file system

The Extended File System (ext) is the first file system specifically designed and implemented for the , serving as a foundational for and management in early distributions. Developed in April 1992 by Rémy Card, Theodore Ts'o, and Stephen Tweedie, it was integrated into Linux kernel version 0.96c to address the severe limitations of the previously used , which capped file systems at 64 MB, restricted filenames to 14 characters, and lacked support for larger partitions. Key features of ext included support for file systems up to 2 GB in size, filenames of up to 255 characters, and standard semantics for files, directories, and symbolic links, making it a significant improvement for growing usage on personal computers and servers. However, ext had notable drawbacks, such as inefficient management of free blocks and inodes through simple linked lists, which caused fragmentation and degraded performance over time, particularly as file systems filled up. It also lacked separate timestamps for file access, modification, and status changes, relying instead on a single field. These limitations prompted rapid iteration, with the Second Extended File System () released in January 1993 as a direct successor that introduced block groups to reduce fragmentation, variable block sizes, and a maximum file system size of 4 TB, while maintaining with ext. Ext quickly became obsolete in practice, as offered superior reliability and efficiency, but it played a crucial role in enabling Linux's early adoption by providing a scalable alternative to proprietary or restrictive s like those in or . The legacy of ext endures through its influence on the broader extended file system family, which evolved into (adding journaling for crash recovery in 2001) and (enhancing scalability for modern storage in 2008), remaining the default choice for many installations as of 2025 due to their robustness, open-source nature, and compatibility, although some distributions are exploring alternatives like .

History

Origins and Initial Development

The development of the Extended File System (ext) was initiated in 1992 by French software developer Rémy Card as part of his work to create a native file system for the Linux kernel, addressing the constraints of the Minix file system then used by Linux. This effort was prompted by the need for a more robust storage solution, as sought by Linux creator Linus Torvalds. Key motivations for ext included overcoming Minix's severe size restrictions, enabling support for larger partitions up to 2 gigabytes, filenames up to 255 characters, and full file permissions to better align with Linux's Unix heritage. These enhancements were essential for handling growing storage needs and providing proper in a multi-user environment. The initial design of ext was inode-based, drawing inspiration from the Berkeley Fast File System, with each inode containing pointers to data blocks for file addressing, but lacking journaling for crash recovery. This structure allowed efficient access to file data while keeping implementation straightforward. Ext was introduced in the Linux kernel version 0.96c in April 1992, marking the first file system tailored specifically for Linux via the Virtual File System (VFS) interface. However, it had notable limitations, including a 2 gigabyte cap on both partition and file sizes due to its block addressing scheme, as well as fixed inode allocation that prevented dynamic adjustment based on usage. Early testing by the developer community revealed these constraints, prompting rapid feedback and iterations that highlighted the need for improvements in scalability and flexibility. This community-driven process quickly led to the transition to as a more advanced successor.

Evolution Through Versions

The second extended file system () was developed in 1993 by Rémy Card, Theodore Ts'o, and Stephen Tweedie as a major rewrite of the original Extended file system to address limitations in scalability and functionality. It introduced dynamic inode allocation within block groups, support for volumes up to 4 terabytes (with 4 KB block sizes), and efficient handling of symbolic links stored directly in inodes for short paths. These enhancements enabled better performance and flexibility for growing systems, with first integrated into the around early 1993 releases. The third extended file system (ext3) was first released in September 1999 by Stephen Tweedie, building on ext2 by integrating a journaling mechanism to enable rapid crash recovery and reduce filesystem check times after power failures. Designed for backward compatibility, ext3 volumes could be mounted as ext2 without modification, allowing seamless upgrades while adding metadata journaling as a core innovation for data integrity. Initial support arrived in Linux kernel 2.4.15, marking a shift toward more robust filesystems in enterprise and desktop environments. Ext4, the fourth extended file system, emerged in 2008 through contributions from developers including Andreas Dilger, Mingming Cao, and others, extending ext3's capabilities to meet demands for massive storage in modern hardware. Key upgrades included support for volumes up to 1 exabyte and files up to 16 terabytes (with 4 KB blocks), delayed block allocation to minimize fragmentation, and online defragmentation tools for maintenance without downtime. It was merged as stable code into 2.6.28, solidifying its role as the default filesystem for many distributions. Parallel to these filesystem versions, the utility suite evolved to provide tools for creation, maintenance, and repair, starting with support in 1993 and expanding to include journaling features by 2001 and extents by 2008. The original Extended file system (ext) was deprecated in modern kernels by the early 2000s, as and its successors fully supplanted it due to superior performance and features. Throughout this progression, community-driven improvements were coordinated via mailing lists like linux-fsdevel and linux-ext4, as well as conferences such as the Ottawa Linux Symposium, fostering collaborative enhancements from global developers.

Design and Architecture

Core Data Structures

The serves as the primary structure in the Extended File System (ext), storing essential global information about the entire filesystem. It includes fields such as the total number of blocks and inodes, the counts of free blocks and inodes, the filesystem state (e.g., clean or erroneous), mount counts, check intervals, the revision level, the operating system identifier, a volume name, and a UUID. The superblock is fixed at 1024 bytes in size and is located at offset from the beginning of the filesystem. Unlike later versions, ext did not include block groups or extensive backup mechanisms for the ; free space was managed via simple linked lists of available s and inodes, and only a single field was used for file metadata (combining access, modification, and status change times). This approach, while basic, supported semantics but suffered from inefficiency and fragmentation as the filesystem grew. The inode structure is a fixed-size record that encapsulates metadata for each file, directory, or other filesystem object, excluding the filename. In the original ext and ext2 implementations, inodes are 128 bytes each, containing fields for permissions and file type, ownership (user and group IDs), timestamps (access, modification, creation, and deletion), link count, file size, and block counts, along with pointers to data blocks. These pointers consist of 12 direct addresses to data blocks, one single-indirect pointer (referencing a block of further pointers), one double-indirect pointer, and one triple-indirect pointer, enabling scalable access to large files. Later versions like ext3 and ext4 expand the inode size (up to 256 bytes or more with features enabled) to accommodate additional fields such as extended attributes, ACLs, nanosecond timestamps, and 64-bit file sizes. Directory entries function as variable-length within directory files, filenames to their corresponding inodes to facilitate name resolution. Each entry includes the inode number, the entry's length, the filename length, the itself (up to 255 characters), and in revision 1 and later, a file type indicator for quicker validation. These entries form a linear within the directory's data blocks, though and subsequent versions support hashed directory indexing (e.g., via HTree in extensions) to accelerate lookups in large directories by organizing entries into a based on filename hashes. Introduced in ext2, group descriptors are an array of structures, one per block group, that provide locality and redundancy for managing filesystem subsets. Each 32-byte descriptor (in ext2/ext3; expanded in ext4 with 64-bit features) tracks the starting block numbers and sizes of inode and block bitmaps, the inode table location, and counts of free inodes and blocks within its group. Positioned immediately after the superblock (with backups alongside superblock copies), this organization divides the filesystem into groups of up to 32,768 blocks (limited by bitmap size), promoting efficient allocation and reducing seek times by localizing related metadata. In , the maximum file is constrained by the inode's block pointers and is calculated as the sum of blocks addressable through and indirect pointers multiplied by the block . With 32-bit block pointers, the number of addressable blocks is $12 + N + N^2 + N^3, where N is the number of pointers per indirect block (N = \frac{\text{block [size](/page/Size)}}{4}). For a 1 KiB block (N=256), this yields approximately 16 GiB; for 2 KiB (N=512), 256 GiB; and for 4 KiB (N=1024), 2 TiB (though originally limited to 4 GiB by the 32-bit until extended in later revisions). These inodes support block allocation by providing the from logical offsets to physical blocks via their pointer hierarchy.

Block Allocation and Management

The original Extended File System (ext) managed disk space without block groups, using linked lists to track free blocks and inodes, which allowed basic allocation but resulted in fragmentation and poor performance over time. This was improved in , which partitions the disk into block groups to facilitate parallel access and enhance by localizing and data. Each block group typically contains around 32,768 blocks for a default 4 KiB block size, equating to 128 per group, though this can vary based on configuration. This structure reduces seek times and fragmentation by keeping related data close together. Within each group, separate bitmaps—one for blocks and one for inodes—track availability, with each bit representing one block or inode to efficiently manage free space. The allocation algorithm in employs a goal-directed approach via the Orlov allocator, which prioritizes locality by attempting to place new data blocks in the same block group as the inode referencing them, thereby clustering related files and minimizing fragmentation. It scans bitmaps starting from a "goal" location to find free blocks, favoring contiguous allocations near the inode to reduce disk seeks. If the preferred group lacks space, it falls back to nearby groups or global scanning. This strategy spreads top-level directories across groups to avoid hotspots while keeping subdirectory contents proximate to their parents. Inode pointers reference these allocated blocks, directing access to the appropriate group. Free space management in and later relies on per-group bitmaps, where a single bit per block or inode indicates usage, enabling quick queries and updates during allocation. To scale for larger filesystems, introduces flexible block groups (flex_bg), which logically combine multiple traditional groups—typically powers of two, such as 16—into one unit. like bitmaps and inode tables for the entire flex group are consolidated in the first physical group, improving allocation efficiency and reducing overhead for very large volumes exceeding traditional group limits. This enhances scalability without altering the core bitmap mechanism. Fragmentation handling in ext2 and ext3 lacks a built-in defragmenter, relying instead on the locality-preferring allocator to prevent excessive scattering during writes; over time, however, repeated allocations can lead to non-contiguous blocks, impacting performance on aging filesystems. mitigates this through multi-block allocation, which uses delayed allocation to batch requests and assign large contiguous extents—up to 128 —from bitmap-derived free space lists, built via a buddy allocator at time. This approach minimizes operations and external fragmentation compared to the single-block allocations in ext2 and ext3. The number of block groups is determined by dividing the total number of blocks by the blocks per group:
\text{number of groups} = \frac{\text{total blocks}}{\text{blocks per group}}
For instance, on an 8 GiB drive with 4 KiB blocks (yielding approximately 2,097,152 total blocks and 32,768 blocks per group), this results in about 64 block groups.

Specific Implementations

ext2 File System

The ext2 file system, also known as the second extended file system, represents a significant advancement over the original extended file system (ext) for , emphasizing performance, scalability, and reliability without incorporating journaling. Developed by Rémy Card, Theodore Ts'o, and Stephen Tweedie, it was first released in January 1993 as part of kernel 0.99 and quickly became the default for distributions due to its robust design inspired by traditional Unix file systems like BSD FFS. ext2 organizes data into block groups to minimize fragmentation, with each group containing bitmaps for block and inode allocation, an inode table, and data blocks; the maximum size of a block group is eight times the block size, allowing for a flexible number of groups across large volumes. The superblock supports up to 232 inodes filesystem-wide, enabling handling of billions of files in theory, though practical limits depend on inode density settings during formatting. With 4 KB blocks—the common default—ext2 supports maximum volume sizes of 16 , constrained by the 32-bit block count in the superblock. File sizes are limited to 2 due to the inode's 32-bit i_blocks field (counting 512-byte sectors), achieved through a combination of 12 direct block pointers, one single-indirect, one double-indirect, and one triple-indirect pointer; for 1 KB blocks, this limit drops to approximately 16 GiB.
Block SizeMax. File SizeMax. Filesystem Size
1 KB16 GiB4 TiB
2 KB256 GiB8 TiB
4 KB2 TiB16 TiB
8 KB2 TiB32 TiB
Table 1: ext2 size limits by block size (limited by 32-bit addressing in superblock and inodes). Distinct features of ext2 include configurable reserved blocks, defaulting to 5% of the filesystem for root user access to mitigate fragmentation and support critical operations during low space conditions, adjustable via tools like tune2fs. Compression is supported through external plugins such as e2compr, which uses algorithms like GZIP indicated by flags in the inode and superblock, though not implemented natively in the core filesystem. File system integrity checks are performed using the e2fsck utility, which scans for inconsistencies and repairs them, typically run offline after unclean unmounts to ensure data consistency. As the direct successor to ext, ext2 maintains backward compatibility, allowing ext volumes to be mounted read-write under ext2 drivers with minimal issues, facilitating smooth transitions in early Linux environments. It saw widespread adoption from 1993 through the 2000s as the primary file system in Linux distributions like Slackware, Debian, and Red Hat, valued for its stability on hard drives, floppies, and early flash media where journaling overhead was undesirable. Despite its strengths, ext2 lacks native crash recovery, requiring full fsck scans after power failures or improper shutdowns, which can take hours on large disks and risk data loss if errors are severe. Its block-based allocation leads to external fragmentation over time, especially with many small files, reducing performance as free space becomes scattered. By the 2010s, following the widespread adoption of ext4 as the default in major distributions around 2009, ext2 was no longer recommended for new installations due to these limitations and the need for modern features like journaling. Key implementation tools include e2fsck for detecting and fixing structural errors, such as orphaned inodes or bitmap mismatches, often invoked automatically by the boot process. The resize2fs utility enables online resizing of mounted filesystems, expanding or shrinking them without unmounting, provided sufficient free space exists. This design laid the groundwork for subsequent enhancements in .

ext3 File System

The file system represents a significant evolution from its predecessor, , by incorporating journaling capabilities to enhance data reliability and reduce recovery times after system crashes or power failures. Developed primarily by Stephen Tweedie and released in September 1999 for 2.2, with ports to later versions, builds on 's block group structure while adding an on-disk as a dedicated for pending file system operations. This journaling mechanism logs changes before they are committed to the main , enabling recovery in seconds rather than the hours or more required by full file system checks on . The core upgrade in ext3 is its journaling layer, implemented as a on disk with a default size of 32 MB (corresponding to 8192 blocks at a 4 KB block size). The journal consists of descriptors that outline operations, commit blocks to mark successful completions, and revoke records to undo incomplete s, ensuring atomicity. ext3 supports three journaling modes: mode, which journals both and for maximum integrity; ordered mode (the default), which journals only but guarantees blocks are written to disk before the corresponding commit; and writeback mode, which journals without ordering for potentially higher at some risk of inconsistency. In ordered mode, is flushed to the prior to journaling, balancing reliability and efficiency. ext3 maintains full backward compatibility with ext2, allowing ext3 volumes to be mounted and used as ext2 without modifications, as the journal is an optional feature flag. It inherits ext2's limits, such as a maximum file size of 2 TB and up to 32,000 subdirectories per directory, but introduces htree (hashed ) indexing for directories, which significantly improves lookup times in large folders by enabling efficient traversal beyond linear scans. ext3 reached its peak adoption as the default in many distributions, including and , from 2001 to 2008, due to its stability and ease of upgrade from ext2. It has been supported in kernels 2.6 and later, remaining viable for legacy systems. Despite these advances, ext3 has notable drawbacks, including the absence of extent-based allocation, which relies instead on indirect block pointers and leads to fragmentation and inefficiency for very large files. Additionally, on 32-bit systems, the maximum volume size is limited to TB due to block addressing constraints.

ext4 File System

The ext4 file system represents an evolution from ext3's journaling mechanism, incorporating extensive scalability enhancements to support modern storage demands while maintaining core compatibility. It achieves this through 64-bit operations across key structures, enabling vastly larger volumes and files compared to its predecessors. Specifically, ext4 supports filesystem volumes up to 1 exabyte (EB), individual files up to 16 terabytes (TB), and inode sizes as small as 128 bytes for efficient metadata handling. These limits are facilitated by features like 48-bit block addressing and dynamic inode allocation, allowing for billions of files on large-scale systems. Unique to ext4 are several efficiency-focused innovations in block management. Delayed allocation defers block assignment until data is committed to disk, reducing fragmentation and overhead by coalescing multiple small writes into larger, contiguous extents during flush operations. Persistent preallocation reserves space for files in advance—particularly useful for and —using a special flag in extent structures to mark uninitialized blocks without immediate data writes. Additionally, nanosecond-resolution timestamps for modification (mtime), access (atime), change (ctime), and creation times provide precise file tracking, enabled through extended fields in larger inodes. Ext4 ensures seamless integration with legacy setups via , allowing it to mount and operate on and partitions without reformatting; tools like tune2fs enable in-place migration, such as converting indirect blocks to extents or resizing inodes. Released as stable in 2.6.28 in December 2008, ext4 became the default filesystem in major distributions like starting with version 9.10 in 2009, and it receives ongoing maintenance through kernel updates for reliability and feature refinements. Write barriers are enabled by default to enforce proper ordering for on storage devices, preventing metadata during power failures. In 2012, metadata checksums using CRC32C were introduced across structures like superblocks, inodes, and journals, adding a layer of verification to detect and mitigate .

Key Features

Journaling Mechanism

The journaling mechanism in ext3 and ext4 provides by recording pending changes in a dedicated log area, known as the , before applying them to the main and blocks. This acts as a of fixed size, typically consisting of descriptor blocks, or blocks, commit blocks, and revoke blocks. During normal operation, modifications are grouped into transactions, which are that either fully complete or are rolled back in case of interruption, ensuring the remains in a consistent . Upon mounting after a or power loss, the is scanned and replayed: committed transactions are applied, while incomplete ones are discarded, avoiding the need for extensive checks. ext3 and ext4 offer three journaling modes to trade off between performance and safety. The default mode in ext3 is ordered (data=ordered), where only metadata changes are logged in the journal, but data blocks are flushed to disk before the corresponding metadata commit to prevent inconsistencies like zeroed data with non-zero metadata. In writeback mode (data=writeback), metadata is journaled while data writes occur asynchronously, maximizing throughput but risking data corruption on crash. The data=journal mode logs both metadata and new data blocks in the journal before writing them to their final locations, providing the highest integrity at the cost of reduced performance due to doubled writes for data. These modes are selected at mount time using mount options. A begins with allocating a via the journaling device layer (JBD or JBD2), which reserves space in the —typically a few dozen s per to amortize overhead. Metadata updates (and data in data= mode) are then logged by writing before-and-after images or just the new state, depending on the . The commits by appending a commit and issuing a disk barrier to ensure ; checkpoints may follow to reuse space by verifying committed changes have reached the . If a interrupts, replays the starting from the last checkpoint, applying only with valid commit . Commits occur periodically, often every 5 seconds, batching multiple system calls for efficiency. The revoke mechanism prevents replay of obsolete or invalid log entries, such as when a is modified multiple times within a or freed before commit. When a logged becomes irrelevant—e.g., during or reallocation—a revoke record is inserted into the , listing the numbers to ignore during . These revoke s are hashed for quick lookup and processed sequentially during replay, ensuring that superseded does not corrupt the . This feature is crucial for maintaining consistency in complex operations like , where old logs must be invalidated. By enabling atomic updates and rapid recovery, the journaling mechanism drastically reduces file system check (fsck) times after unclean shutdowns—from potentially hours to under a second—and enhances against power failures, as only consistent states are restored without in metadata or ordered modes. Journal size recommendations aim to cover typical workloads without excessive overhead; a common guideline is 1-5% of the size or at least 32 MB, with the minimum being blocks (e.g., 4 MB for 4 KB blocks). Transactions per commit generally encompass 100-1000 blocks to balance and throughput, though defaults are tuned for in about 1 second on standard hardware. Additionally, starting with 5.10 (December 2020), introduced the fast commit feature to reduce latency for synchronous operations in data=ordered mode. Fast commit uses a dedicated area within the to log only the minimal deltas required for quick recovery of recent changes, allowing faster commits without full transactions for operations like file creation, deletion, and linking. This improves performance for workloads with frequent fsync calls, such as databases, while maintaining . The feature must be enabled at filesystem creation using the mkfs.ext4 -O fast_commit option and is supported alongside standard journaling. Recent developments include performance optimizations and bug fixes in Linux 6.11 (September 2024) and further enhancements in Linux 6.18 (October 2025).

Extent-Based Storage

In the ext4 file system, extent-based storage replaces the traditional indirect block mapping used in earlier ext versions with an extent tree, a hierarchical data structure that efficiently maps logical file offsets to ranges of physical disk blocks. The tree consists of interior nodes, defined by the struct ext4_extent_idx (12 bytes each), which point to child nodes, and leaf nodes, defined by the struct ext4_extent (also 12 bytes), which contain the actual mappings. Each extent in a leaf node specifies a starting logical block (ee_block), a length (ee_len up to 32,768 blocks), and a starting physical block address (split across ee_start_hi and ee_start_lo fields). With a typical 4 KB block size, a single extent can thus represent up to 128 MB of contiguous data. The tree root is stored in the inode's i_block array, supporting a maximum depth of five levels to handle files up to 16 TB. This design significantly reduces metadata overhead compared to indirect blocks, where large files require numerous pointer blocks across direct, , double, and triple indirect levels. For instance, representing a 1 GB file (262,144 blocks with 4 KB block size) using traditional indirect blocks might necessitate approximately 256 metadata blocks for pointers in the double indirect level alone, assuming moderate fragmentation. In contrast, extents can represent the same file with just 1-2 entries if highly contiguous, or up to about 8 extents if split into maximum-sized chunks, minimizing the inode's metadata footprint to a few kilobytes. Additionally, extents improve performance for patterns by promoting contiguous physical allocation, reducing seek times and fragmentation during reads and writes. Extent allocation in ext4 leverages the multi-block allocator (mballoc), which uses goal-oriented heuristics and bitmaps to reserve large contiguous ranges on disk, enhancing locality and reducing external fragmentation. For sparse files, uninitialized (uninit) extents are employed, marking ranges as allocated but unwritten until data is actually stored, which defers physical writes and supports efficient hole punching. This mechanism builds on ext4's delayed allocation in one key aspect: by postponing block commits until writeback, it allows the allocator to merge nearby writes into larger extents. To enable extent-based storage, the extents feature must be set in the using the tune2fs -O extents command on an unmounted filesystem, which also requires the INCOMPAT_EXTENTS . Individual inodes opt into extents by setting the EXT4_EXTENTS_FL , with the filesystem falling back to indirect for if the feature is disabled or for small files where the overhead of building a is unnecessary. Once enabled, preferentially uses extents for new files, ensuring with / tools via on-the-fly conversion.

Usage and Tools

Integration in Linux

The Extended File System (ext) family integrates seamlessly with the via the (VFS) layer, which abstracts operations to enable uniform access across different implementations. The includes dedicated drivers—ext2_fs for (deprecated since 6.9 in 2024), ext3_fs for , and ext4_fs for —that handle mounting, I/O, and management for these s. Support for ext2 began with version 0.99 in early 1993 as a rewrite of the original Extended File System, while ext3 journaling was added in 2.4.15 in 2001 to enhance data reliability. Ext4 development started as an extension of ext3, with preliminary support in 2.6.19 in 2006 and full stability achieved in 2.6.28 in 2008, making ext4 the default option in subsequent kernels. As of 6.9 (March 2024), the ext2 driver is deprecated due to lack of support for timestamps beyond 2038, with ext3 volumes handled by the ext4 driver and migration to ext4 recommended for new deployments. Major Linux distributions have adopted ext4 as their default file system for root and data partitions, leveraging its balance of performance and compatibility. Debian has used ext4 by default since version 8 (Jessie) in 2015, while Ubuntu switched to ext4 starting with release 9.10 (Karmic Koala) in 2009. Red Hat Enterprise Linux (RHEL) designated ext4 as the default in RHEL 6 in 2010, continuing support through later versions for general-purpose workloads, though RHEL 7 and beyond introduced XFS as an alternative for high-performance needs. Android, built on the Linux kernel, employs ext4 for critical partitions such as /data and /cache since Android 2.3 in 2010, ensuring compatibility with embedded storage constraints. Mounting ext file systems in occurs through the command or /etc/ configurations, with options tailored to optimize behavior for specific hardware or workloads. Common options include barriers=nobarrier to disable write barriers for improved speed on systems with battery-backed caches, and noatime to prevent updating access times on reads, reducing writes on SSDs or high-traffic servers. For example, an entry might specify defaults,noatime,errors=remount-ro for a to balance reliability and efficiency. These options are set per and can be tuned using tools from the package. Cross-platform access to ext file systems outside Linux requires third-party drivers, as native support is absent in Windows and macOS. On Windows, tools like provide read-write access to ext2, ext3, and ext4 partitions, though write operations carry risks of corruption without full journaling compatibility. For macOS, Software's extFS offers full read-write support for ext2/3/4 volumes, enabling seamless integration with Linux-formatted drives. Write support remains limited and not recommended for production without backups due to potential inconsistencies. As of 2025, continues to dominate server environments due to its maturity and broad compatibility, powering the majority of deployments in distributions like and . While alternatives like gain traction in enterprise settings for features such as snapshots, ext4's reliability ensures its ongoing prevalence, with gradual adoption of newer systems in select high-availability scenarios.

Management Utilities

The package, initiated in 1994 by , serves as the primary collection of utilities for creating, maintaining, and repairing , , and file systems on . It includes essential tools such as mke2fs, which formats block devices or files to create new ext file systems with configurable parameters like block size and inode count; tune2fs, which adjusts tunable parameters on existing file systems, such as reserved block percentages or maximum mount counts; and dumpe2fs, which extracts and displays detailed from a , including feature flags and block group information. Key commands within enable comprehensive administration, including e2fsck (invoked as fsck.ext4 for ext4-specific checks), which scans for inconsistencies, repairs structural errors, and ensures integrity after unclean shutdowns by replaying journals in and . The resize2fs utility supports both online and offline resizing of , , and s, allowing dynamic expansion or reduction of sizes without data loss when the file system is mounted, provided the supports it. For advanced , debugfs provides low-level access to edit inodes, directories, and superblocks interactively, facilitating forensic analysis or manual corrections. e2fsprogs incorporates features for reliability and resource management, such as bad block handling via e2fsck -l, which adds specified bad blocks from a file to the file system's bad block inode to prevent their allocation, enhancing data protection on aging hardware. Quota support is facilitated through quotacheck, which scans ext file systems to generate or update user and group quota usage tables, ensuring accurate enforcement of disk limits when quotas are enabled via tune2fs. The package is standard in major distributions' repositories, installable via package managers like apt or dnf, with versions typically aligned to developments for compatibility— for instance, checksums since release 1.43 and fast commit since 1.46 fully support advanced features. Best practices for using these utilities emphasize caution to avoid : always perform regular backups before running tune2fs or e2fsck on live systems, and utilize the -O option in mke2fs or tune2fs to explicitly enable or disable features like ^has_journal for non-journaled setups.

Adoption and Comparisons

Historical and Current Usage

The extended file system (ext) was the first native file system for the , implemented in April 1992 to replace the limitations of the , which had constrained early development with small sizes and limits. The second iteration, , arrived in January 1993 and addressed key shortcomings like improved timestamp accuracy and inode handling, quickly becoming the for storage. During the 1990s, dominated systems due to its simplicity and efficiency on resource-constrained , such as flash drives and early portable devices. followed in 2001, introducing journaling to enhance crash recovery and , which drove its adoption in server environments where reliability after unexpected shutdowns was critical. By 2025, has solidified as the default file system for many major distributions, including (since version 8 Jessie in 2015), , and , ensuring broad compatibility and stability in new installations, while distributions like and default to . It powers -based instances across cloud platforms like AWS EC2 and , where users often select it for its proven performance on virtualized storage. In the (IoT) sector, ext4 supports embedded deployments on billions of devices, leveraging its lightweight footprint for and sensor networks. Supercomputers in the list, running on their nodes, frequently employ ext4 for local file systems alongside parallel systems like Lustre for shared storage. 15 and later versions continue to rely on ext4 for core partitions, maintaining with the ecosystem's vast device base. Despite its ubiquity, ext4's share in desktop environments shows signs of decline as users migrate to feature-rich alternatives like for snapshots and compression or for data integrity checks, particularly in creative and development workflows. This shift is gradual, with ext4 retaining preference for its maturity and long-term kernel support without the experimental risks of newer options. Migration trends favor non-disruptive tools like , which enable seamless upgrades from or to ext4 by synchronizing data across partitions while preserving permissions and structure. Notable case studies highlight ext4's enduring role: Debian has defaulted to ext4 since 2015, balancing simplicity with robust journaling for stable releases used in servers and workstations. Red Hat Enterprise Linux 9 pairs ext4 with XFS as supported options, allowing ext4 for general-purpose volumes where its compatibility with legacy tools ensures operational continuity.

Performance and Alternatives

The ext4 file system delivers strong performance on modern storage hardware, particularly solid-state drives (SSDs). On 2025-era NVMe SSDs, such as PCIe 5.0 models, ext4 achieves sequential read speeds of up to 14 GB/s under optimal conditions. Random I/O operations see a 20-30% improvement over , largely due to extent-based allocation, which reduces fragmentation and inode overhead for scattered reads and writes compared to ext3's block mapping. Additionally, ext4's lack of (CoW) functionality results in low CPU overhead, making it suitable for high-throughput environments without the computational penalties seen in CoW-based systems. Benchmark tests, including those using Bonnie++, highlight ext4's advantages in metadata-intensive operations. In comparisons on kernels from 2024 onward, ext4 outperforms by about 15% in file creation and directory traversal tasks, attributed to delayed allocation and multiblock allocator optimizations that streamline metadata updates. For raw throughput, ext4 generally exceeds in sequential workloads by 10-20%, as Btrfs's CoW and checksumming introduce , though ext4 lags behind Btrfs in snapshot-related operations due to the absence of native support. Overall, ext4 provides balanced performance across mixed workloads, with geometric mean scores placing it competitively among modern file systems on high-end SSDs. Despite its strengths, has notable limitations that impact certain use cases. It lacks native capabilities, necessitating external tools or layered solutions for point-in-time backups, which can complicate workflows. Native file-based is supported via the fscrypt framework since 4.1, alongside integration with LUKS for full-disk , though the latter adds setup complexity and potential costs. Furthermore, in heavy write workloads involving many small files, can suffer from fragmentation, leading to degraded random I/O over time without regular maintenance like e4defrag. When compared to alternatives, offers a reliable baseline but trades off advanced features for simplicity. Against , avoids the higher overhead from CoW and metadata checksumming, delivering faster raw throughput and lower for general-purpose tasks, though excels in snapshotting and verification at the cost of 10-15% slower writes. Versus , is less optimized for very large files—where leverages parallel I/O for up to 20% better performance on multi-terabyte media or database workloads—but maintains more semantics and better handling of small-file operations. In contrast to , provides superior performance on , with operations like directory scanning up to 300 times faster due to native driver efficiency, while 's Windows compatibility comes at the expense of elevated CPU usage and I/O under . Looking ahead, continues to evolve through updates, with 6.10 (released in 2024) incorporating refinements to SSD TRIM support via improved fstrim integration for better garbage collection on flash storage, enhancing longevity and sustained performance. Ongoing community discussions focus on enhancements like multi-block writes and bigalloc support, potentially landing in 6.16, to address modern storage demands without a full successor; remains the default for many distributions, with no immediate plans for an "ext5" as its scalability suffices for exabyte volumes.

References

  1. [1]
    Design and Implementation of the Second Extended Filesystem - MIT
    After the integration of the VFS in the kernel, a new filesystem, called the ``Extended File System'' was implemented in April 1992 and added to Linux 0.96c.Basic File System Concepts · The Virtual File System · ``advanced'' Ext2fs Features
  2. [2]
    Extended filesystems (Ext, Ext2, Ext3)
    The Ext2fs supports standard Unix file types: regular files, directories, device special files and symbolic links. Ext2fs is able to manage filesystems created ...
  3. [3]
    An introduction to Linux's EXT4 filesystem - Opensource.com
    May 25, 2017 · The original EXT filesystem (Extended) was written by Rémy Card and released with Linux in 1992 to overcome some size limitations of the Minix ...Missing: origins | Show results with:origins
  4. [4]
    Linux filesystems: definition, structure, selection, optimization
    Apr 16, 2004 · The Extended File System, ext, was introduced in April, 1992. With a maximum partition size of 2GB and a maximum file name size of 255 ...
  5. [5]
    The Second Extended Filesystem - The Linux Kernel documentation
    ext2 shares many properties with traditional Unix filesystems. It has the concepts of blocks, inodes and directories. It has space in the specification for ...
  6. [6]
    Ext3 Filesystem — The Linux Kernel documentation
    Ext3 was originally released in September 1999. Written by Stephen Tweedie for the 2.2 branch, and ported to 2.4 kernels by Peter Braam, Andreas Dilger, Andrew ...<|separator|>
  7. [7]
    [PDF] EXT3, Journaling Filesystem - cs.wisc.edu
    Jul 20, 2000 · The ext3 filesystem is a journaling extension to the standard ext2 filesystem on Linux. Journaling results in massively reduced time spent.Missing: 2001 | Show results with:2001
  8. [8]
    [PDF] ext4: the next generation of the ext3 file system | USENIX
    May 27, 2007 · A descendant of the ext3 file system, ext4 will soon replace ext3 as the “Linux file system.” Ext4 provides greater scalability and higher ...
  9. [9]
    E2fsprogs: Ext2 Filesystem Utilities
    Dec 22, 2010 · This is the home page for the e2fsprogs package. It provides the filesystem utilities for use with the ext2 filesystem. It also supports the ext3 and ext4 ...E2fsprogs Release Notes · Ext2fs Home Page · Ext2/Ext3/Ext4 Filesystems...Missing: suite evolution
  10. [10]
    archive - Kernel Mailing Lists
    No information is available for this page. · Learn whyMissing: ext filesystem development lists
  11. [11]
    The Second Extended Filesystem — The Linux Kernel documentation
    All fields in the superblock (as in all other ext2 structures) are stored on the disc in little endian format, so a filesystem is portable between machines ...
  12. [12]
    [PDF] A Directory Index for Ext2 - The Linux Kernel Archives
    The native filesystem of Linux, Ext2, inherits its basic structure from Unix systems that were in widespread use at the time Linus Torvalds.
  13. [13]
    2. High Level Design - The Linux Kernel documentation
    An ext4 file system is split into a series of block groups. To reduce performance difficulties due to fragmentation, the block allocator tries very hard to ...Missing: management | Show results with:management
  14. [14]
    The Orlov block allocator
    ### Summary of Orlov Block Allocator in ext2
  15. [15]
    blockgroup.rst
    Starting in ext4, there is a new feature called flexible block groups (flex\_bg). In a flex\_bg, several block groups are tied together as one logical block ...
  16. [16]
    [PDF] The Effects of Filesystem Fragmentation
    Jul 19, 2006 · A remarkable result of this equation is that the average number of fragments in each of our files does not depend in the allocation unit size.
  17. [17]
    [PDF] The new ext4 filesystem: current status and future plans
    Jun 30, 2007 · Ext4 multiple block allocation builds per-block group free extents information based on the on-disk block bitmap. It uses this information ...
  18. [18]
    The Second Extended File System - Savannah.nongnu.org
    This book is intended as an introduction and guide to the Second Extended File System, also known as Ext2.
  19. [19]
    mke2fs(8) - Linux manual page - man7.org
    -m reserved-blocks-percentage Specify the percentage of the file system ... The default percentage is 5%. -M last-mounted-directory Set the last ...
  20. [20]
    Linux 6.9 Deprecates The EXT2 File-System Driver - Phoronix
    Mar 26, 2024 · It's being deprecated now though since the file-system driver doesn't support dates beyond the year 2038 as part of the Y2038 problem. Due to ...
  21. [21]
    Ext3 Filesystem - The Linux Kernel documentation
    Ext3 was originally released in September 1999. Written by Stephen Tweedie for the 2.2 branch, and ported to 2.4 kernels by Peter Braam, Andreas Dilger, Andrew ...
  22. [22]
    Analysis and Evolution of Journaling File Systems - USENIX
    Journaling Modes: Linux ext3 includes three flavors of journaling: writeback mode, ordered mode, and data journaling mode; Figure 2 illustrates the ...
  23. [23]
    Creating an ext3 Partition - Managing RAID on Linux [Book] - O'Reilly
    By default, 8192 blocks are allocated (32 MB when using a 4 KB block size). The default block size for an ext3 filesystem, as for an ext2 filesystem, is 4096 ...
  24. [24]
    Add ext3 indexed directory (htree) support - LWN.net
    Oct 2, 2002 · Hi Linus, I believe the ext3 indexed directory (htree) patches are ready for integration into the 2.5 tree at this point.
  25. [25]
    Ext3 for large filesystems - LWN.net
    Jun 12, 2006 · The ext3 code can only track 2 gigablocks, which, using a 4K block size, sets the limit at 8 TB. Switching to an unsigned type can double that ...Missing: drawbacks | Show results with:drawbacks
  26. [26]
    ext4 General Information - The Linux Kernel documentation
    Ext4 is an advanced level of the ext3 filesystem which incorporates scalability and reliability enhancements for supporting large filesystems (64 bit)
  27. [27]
    3.6. Journal (jbd2) — The Linux Kernel documentation
    The ext4 filesystem employs a journal to protect the filesystem against metadata inconsistencies in the case of a system crash.
  28. [28]
    Chapter 4. The ext3 File System | Storage Administration Guide
    The ext3 file system is essentially an enhanced version of the ext2 file system. These improvements provide the following advantages.
  29. [29]
    The Linux Journalling API — The Linux Kernel documentation
    The jbd2_journal_abort function is intended to support higher level error recovery mechanisms such as the ext2/ext3 remount-readonly error mode. Journal abort ...
  30. [30]
    mkfs.ext3(8): create ext2/ext3/ext4 filesystem - Linux man page
    Create an internal journal (i.e., stored inside the filesystem) of size journal-size megabytes. The size of the journal must be at least 1024 filesystem blocks ...
  31. [31]
  32. [32]
    ext4(5) - Linux manual page - man7.org
    They are general purpose file systems that have been designed for extensibility and backwards compatibility. In particular, file systems previously intended for ...<|control11|><|separator|>
  33. [33]
    Extents and Extent allocation in Ext4 | linux - Oracle Blogs
    Oct 15, 2024 · In this blog, we'll explore how ext4 addresses this challenge using extents to map logical blocks to physical blocks. We'll also look at the ...Missing: documentation | Show results with:documentation
  34. [34]
    Ext3 Filesystem — The Linux Kernel documentation
    Ext3 was originally released in September 1999. Written by Stephen Tweedie for the 2.2 branch, and ported to 2.4 kernels by Peter Braam, Andreas Dilger, Andrew ...
  35. [35]
    Ext4 - Debian Wiki
    Feb 19, 2023 · ext4 is the default filesystem for Debian since Debian 8 Jessie (2018-06-17). ext2 and ext3 filesystems can be upgraded to ext4 (but not the ...
  36. [36]
    KarmicKoala/TechnicalOverview - Ubuntu Wiki
    Oct 28, 2009 · The new "ext4" filesystem is used by default for new installations with Ubuntu 9.10 RC; of course, other filesystems are still available via the ...
  37. [37]
    Chapter 6. The Ext4 File System | Red Hat Enterprise Linux | 6
    Ext4 uses extents (as opposed to the traditional block mapping scheme ... performance when using large files and reduces metadata overhead for large files.
  38. [38]
    Android kernel file system support
    Oct 9, 2025 · While there are a large number of file systems with implementations in the Linux Kernel, many haven't been approved for production use in Android.
  39. [39]
    extFS for Mac by Paragon Software
    extFS for Mac by Paragon Software provides fast and unlimited read/write access to ext2, ext3 and ext4 formatted drives intended for Linux systems!
  40. [40]
    bobranten/Ext4Fsd: Ext4 file system driver for Windows - GitHub
    Ext4Fsd is an ext2/3/4 file system driver for Windows (XP/Vista/7/8/10/11). It's a free and open-source software, everyone can modify or distribute under GNU ...
  41. [41]
    XFS vs. ext4: Which Linux file system maximizes storage? | TechTarget
    Feb 21, 2025 · Compare XFS vs. ext4 file systems on Linux devices by examining flexibility, data protection, performance, capacity and security.
  42. [42]
    XFS vs. Ext4: Which Linux File System Is Better? | Pure Storage Blog
    Jan 24, 2024 · XFS is more common for large file storage and performance, but ext4 is used for general server operations with better security features.What Is An Ext4 File System? · Xfs Vs. Ext4 File Systems · When To Use Ext4<|control11|><|separator|>
  43. [43]
    E2fsprogs Release Notes - SourceForge
    Release notes for the e2fsprogs package. E2fsprogs 1.47.3 (July 8, 2025) UI and Features Mke2fs -d can now copy the fs-verity metadata and chattr flags into ...<|control11|><|separator|>
  44. [44]
    e2fsck(8) - Linux manual page - man7.org
    If any bad blocks are found, they are added to the bad block inode to prevent them from being allocated to a file or directory. If this option is specified ...
  45. [45]
    [PDF] Managing the Ext File System - Oracle Help Center
    Jul 1, 2025 · Ext file system utilities are provided in the e2fsprogs ... Rebuild the quota database with the quotacheck command to fix inaccuracies in disk ...
  46. [46]
    Debian -- Details of package e2fsprogs in sid
    e2fsprogs provides ext2/ext3/ext4 file system utilities for creating, checking, and maintaining these systems, and includes a badblocks program.
  47. [47]
    UNIX Filesystems: Evolution, Design, and Implementation
    Minix filesystem support was replaced in 1992 by the ext filesystem, which supported filesystem sizes up to 2GB and filename sizes up to 255 characters.Missing: history adoption
  48. [48]
    Understanding Linux filesystems: ext4 and beyond - Opensource.com
    Apr 2, 2018 · While Linus hacked away on the fledgling Linux kernel, Rémy Card worked on the first ext filesystem. First implemented in 1992—only a year after ...
  49. [49]
    Ext2, Ext3, and Ext4 Filesystems: Evolution on Linux
    Dec 12, 2024 · Ext2 was introduced in 1993 as a replacement for the earlier Extended Filesystem (ext). Designed by Rémy Card, ext2 was aimed at providing ...
  50. [50]
    A Deep Dive into Linux File Systems: Ext2, Ext3, and Ext4
    ... (Extended File System) family stands out as a particularly noteworthy lineage ... Ext2 was developed by Rémy Card as well. In January 1993 ext2 was ...
  51. [51]
    Linux filesystems: Ext4, Btrfs, XFS, ZFS and more | Network World
    Jan 3, 2025 · Ext4, the default filesystem for many Linux distributions, balances performance and reliability. ... Linux system is stored in a file system.
  52. [52]
    use of EXT4 filesystems in AWS ec2 instances #230 - GitHub
    Jul 10, 2023 · The ext4 file system is included in AL2 and AL2023 releases. Any volume should mount fine. It is possible that the utilities for ext4, namely the e2fsprogs ...
  53. [53]
    Filesystem Layout - Amazon Linux 2023 - AWS Documentation
    This section covers the filesystem layout of an AL2023 system, including details that may be specific to instances or AL2023 based containers.Missing: ext4 Android
  54. [54]
    Is EXT4 really better than NTFS? : r/linux4noobs - Reddit
    Aug 25, 2023 · EXT4 is probably the most popular filesystem, in use by billions of very different devices worldwide. Including Linux, Android, ChromeOS ...
  55. [55]
  56. [56]
    What file system does Android use? - ext4 - Stack Overflow
    May 30, 2014 · Android originally used YAFFS2 as the file system. After Android 2.3, the file system became ext4. YAFFS2 is usually used for NAND flash in embedded systems ...How to mount an external drive's ext4 partition on android and make ...Does ext4 filesystem in read-only mode has better performance for ...More results from stackoverflow.com
  57. [57]
    Time to Change The Default Linux Filesystem (Ext4) With - YouTube
    Feb 18, 2025 · ... Ubuntu, Debian, and others didn't ✓ The role of XFS, ZFS, Stratis ... Problems You will Encounter on Linux (and How to Solve Them). Rob ...
  58. [58]
    About "Why Linux Mint still uses ext4 instead of BTRFS"
    Apr 16, 2025 · ext4 is much better than btrfs if you use a SSD. Btrfs has massive write amplification, to write a few k of data it writes several MB. This will ...Missing: statistics | Show results with:statistics
  59. [59]
    rsync - ArchWiki
    Aug 17, 2025 · rsync is an open source utility that provides fast incremental file transfer. ... It can be used for backing up, file system migration or ...
  60. [60]
    linux - Copy entire file system hierarchy from one drive to another
    Jul 7, 2011 · What you want is rsync. This command can be used to synchronize a folder, and also resume copying when it's aborted half way. The command to ...how to copy entire linux root filesystem to new hard drive on with ssh ...How to speed up rsync between two local disks? - Super UserMore results from superuser.com
  61. [61]
    Chapter 1. Overview of available file systems | 9
    The ext4 file system is the fourth generation of the ext file system family. It was the default file system in Red Hat Enterprise Linux 6. The ext4 driver can ...
  62. [62]
    Bcachefs, Btrfs, EXT4, F2FS & XFS File-System ... - Phoronix
    XFS was by far the fastest with this testing on Linux 6.15 and using a Crucial T705 NVMe PCIe 5.0 SSD. With each file-system at its defaults, XFS was 20% ...
  63. [63]
    [PDF] Improved Performance of Ext4 File System by Using Extent-
    3.3.In this test ext4 shows superiority in performance compared to ext3, ext2.Ext4 is more 40% faster than ext3 and almost twice faster than EX2. On the ...
  64. [64]
    Btrfs vs EXT4 - Performance Comparison - DiskInternals
    Rating 4.5 (10) Feb 3, 2025 · Support for Large Files and Volumes: Ext4 can handle large files (up to 16TB) and volumes (up to 1EB), making it suitable for modern storage ...
  65. [65]
    Real World Benchmarks Of The EXT4 File-System - Phoronix
    Dec 3, 2008 · The benefits of EXT4 were shown in a 4GB sequential create. EXT4 managed to push a 34% lead over EXT3 and sizable leads over XFS and ReiserFS.
  66. [66]
    An Initial Benchmark Of Bcachefs vs. Btrfs vs. EXT4 vs. F2FS vs. XFS ...
    Aug 9, 2024 · A fresh round of benchmarking across Bcachefs, Btrfs, EXT4, F2FS, and XFS using the Linux 6.11-rc2 kernel.
  67. [67]
    What Is ext4 (Fourth Extended File System)? - phoenixNAP
    Apr 24, 2024 · No native encryption. ext4 does not provide native encryption support within the file system itself. Users must rely on third-party tools or ...
  68. [68]
    Understanding File Systems - Kingston Technology
    Fragmentation: Like most file systems, Ext4 is susceptible to fragmentation. · Limited scalability: While Ext4 supports larger file and partition sizes compared ...
  69. [69]
    Ext4 vs XFS vs Btrfs on VPS in 2025 - Onidel
    Aug 29, 2025 · Key Features and Advantages. Maximum file size: 16 TB; Maximum volume size: 1 EB (exabyte); Journaling: Metadata and data journaling options ...
  70. [70]
    NTFS has a massive performance hit on Linux compared to ext4
    May 14, 2021 · There is a massive performance hit when using NTFS vs ext4 on a Linux machine and I saw this when I tried using a NTFS partition on my laptop instead of ext4.
  71. [71]
    Linux_6.10 - Linux Kernel Newbies
    Linux 6.10 has been released on Sunday, 14 Jul 2024. Summary: This release includes the new mseal(2) system call to protect memory from unwanted ...
  72. [72]
    LWN.net Weekly Edition for April 17, 2025
    Mujoo described the roadmap for ext4 atomic-write support. The patch sets for multi-filesystem-block writes using bigalloc and for adding extsize and forcealign ...