What is Ext (Ext2, Ext3, Ext4) File System?

Ext (Extended File System) is one of the main components of the Linux operating system and is fast and extremely secure. Although Ext is currently replaced with Ext4, it is the most used system in Linux distributions.

What is Ext (Ext2, Ext3, Ext4) File System?

Linux Ext File Systems

Ext (Extended File System)

Ext is the first system created for the Linux kernel and has the structure of the Unix operating system. It was designed by Rémy Card in April 1992 due to the limitations of the MINIX system.

Ext was the first in the extended systems series and was used by both Ext2 and Xiafs in 1993. Ext2 became popular and used for a long time because it solved basic problems such as inode and fragmentation that occurred in Ext’s first series.

Ext2 (Second Extended File System)

Ext2 is the Second Extended system designed by Rémy Card as an extensible system for Linux, the most successful system in the Linux community, and the basis for all existing Linux distributions.

Ext2 uses the strategy of saving the data contained in files into data blocks.

All of these data blocks are the same length, and although this length varies between different Ext2 systems, the size of the blocks for a given Ext2 is determined when created using mke2fs.

The size of each file is rounded to the number of integer blocks. If the block size is 1024 bytes, a 1025-byte file will contain two 1024-byte blocks.

Not all file system blocks contain data, some should be used to protect information that describes the structure of the file system.

It defines the file system topology by defining each one as having an inode data structure.

An inode describes which blocks occupy a file’s data, as well as the file’s access permissions, the time of file modification, and the type of file.

Each file on the system is identified by a unique inode, and each inode has a unique number that identifies it. File system nodes are stored together in inode tables.

Ext2 directories are special files that contain pointers to the nodes of your directory entries.

Ext2 Data Structures

The space in Ext2 is divided into blocks and the blocks are similarly organized into groups of cylinder groups of the Unix file system.

This is done to reduce external fragmentation and minimize the number of disk searches when reading a large number of consecutive data.

Each block contains a superblock group, bitmap blocks group, inode bitmap followed by real data blocks.

The superblock contains important information that is important for booting the operating system, so copies are created in each group block of each block in the file system.

However, only the first copy used in the first block of the file system is used initially.

The identifier group stores the start of the bitmap block, inode bitmap, and inode table for each group block, which is stored in the table identifier group.

Each inode contains the following information:

  • Inode number
  • File type
  • Owner of said file
  • File permissions
  • Same establishment date

File System Limits

Some limits on the Ext2 file system are due to the data file format and the operating system kernel.

Often these factors are determined once the file system is created. The 8 KB block size is only possible in the default alpha architecture.

There are also many programs that cannot process files larger than 2 GB.

Directory lower level limit is about 32768. If the number of files in a directory exceeds 10,000 to 15,000 files, the user is normally warned that the operations may take a long time.

The theoretical limit for the number of files in a directory is 1.3 × 1020, but this is not relevant in practical situations.

Ext3 (Third Extended File System)

Ext3 is a third extended file system with logging. It is the most widely used file system in Linux distributions, although it is now replaced by Ext4.

The main difference with Ext2 is logging. An Ext3 system can be installed and used as an ext2 system.

Another important difference is that Ext3 uses a balanced binary tree (AVL tree) and includes the Orlov disk block mapper.

Ext3 partitions do not have a different file structure than Ext2, so it not only switches from Ext2 to Ext3, and vice versa, especially useful in some cases if the registry is accidentally corrupted, for example, due to corrupt sectors of the disk.

So, there is full compatibility between Ext2 and Ext3, you can convert an Ext2 to Ext3 or vice versa. Since the format of the disk is the same, you can easily configure the Ext3 system as Ext2.


Although its speed and scalability are lower than its competitors like JFS, ReiserFS or XFS, it has the advantage of allowing you to upgrade from Ext2 to Ext3 without losing stored data or having to format the disk.

CPU consumption is lower and is considered safer than other Linux file systems due to its relative simplicity and longer test time.

Ext3 adds logging to Ext2, tree directories, and online growth for directories spanning multiple blocks.

   Size Limits

Ext3 has two different size limits, one for the files and one for the size of the entire file system, and the size limit is 231−1 blocks.

Journaling Levels

   Journal (Low Risk)

Metadata and content files are copied to the journal before being imported into the main file system. Since the magazine is always on disk, it can improve performance in certain situations.

At other times, performance is worse because the data should be written twice, once in the journal, and once in the main part of the file system.

   Ordered (Medium Risk)

Only metadata is recorded in the journal, not the content, but the content of the file is written to disk before the associated metadata is marked as copied in the journal.

It is the default system in most Linux distributions. If there is a voltage drop or Panic core while the file is being written or initialized, it indicates that the journal’s new file or experiment has not been passed, so it is cleaned by the cleaning process.

   Writeback (High Risk)

Only metadata is logged and the content of the files is not recorded. Content can be written before or after updating the journal.

As a result, files that have been successfully changed before a break can be corrupted. For example, the file waiting to be journaled is larger than it is now and is sent to the trash at the end of the audit.

Old versions of files may appear unexpectedly after journal recovery. Lack of synchronization between data and journaling is quickly resolved in many cases. JFS uses this level of journaling but ensures that all unnecessary items are cleared at reboot.



Because Ext3 is Ext2 compatible, most archive structures are similar to Ext2. Therefore, Ext3 lacks many features of newer designs such as extensions, dynamic inode localization, and block sub-location.

For each directory, there are 31998 subdirectory limits derived from 32 connection limits per inode.

Ext3, like most existing Linux file systems, cannot be controlled by fsck while the file system is mounted to write.

Trying to check an installed file system can detect incorrect errors where data is not yet spilled onto the disk and try to fix these errors and corrupt the file system.


There is no file-leveling online defragmentation tool for Ext3.

There is an offline defragmenter for E2defrag, but it requires Ext3 to be converted to Ext2 before it starts.

However, depending on the bits opened in the system, e2defrag can destroy the data. There are the user tools to combine like Shake and Defrag.

Shake works by finding the entire file as a process, which often causes the locator to constantly find disk space.

It also tries to write used files at the same time as others. Defrag works by copying each file onto itself. They work only if the file system is empty and there is no real defragmentation tool for this generation.

Some file systems, such as ext3, effectively find the nearest empty blocks in the file.

So you don’t have to worry about fragmentation on a Linux system. While Ext3 is more fragmentation resistant, there is nothing that prevents Ext3 systems from breaking over time.

As a result, Ext3 includes Ext4’s successor, a merge utility, and support for extensions of adjacent regions of the file.


Compression support is available as an unofficial patch for ext3. This patch is a direct e2compr port, but more needs to be developed since logging is not yet implemented.


It does not checksum during journaling. If barrier = 1 is not activated as an assembly option and hardware is corrupt, there is a risk of extensive file system corruption in the event of a sudden hardware failure.

Windows and Ext3

Although Windows does not have native support for Ext2 or Ext3, drivers can be installed to access such file systems. It can be installed on all Windows systems with X86 architecture.

This drive makes it possible to assemble partitions without using separate programs. It shows us the file system as if it were another partition within the windows.

Another option is to use a program to view and copy files in a partition that includes Ext3 and Ext2 but does not mount the partition.

The programs you can use to access the Ext system on your Windows system are as follows;

  1. Ext2explore (Ext2Read)
  2. DiskInternals Linux Reader
  3. Ext2Fsd

Ext4 (Fourth Extended File System)

An Ext4 system is fault-tolerant because the integrity of the data is ensured because changes in the metadata of the files are first journaled.

Since Linux 2.6.28, the kernel has officially supported the new Ext4 system.

The Ext4 release date is 2008. Ext4 is an enhanced version of Ext2 and Ext3, and some important data structures have been changed. In addition, only registry functionality was added to this.

Ext4 can provide better performance and reliability as well as richer features.

By applying a few commands, you can switch from Ext2 and Ext3 to Ext4 without having to format the disk or reboot the system. Ext4 still retains its original data structure and Ext4’s role in new data.

It currently supports 16 TB of the 2 TB maximum file size, while Ext4 supports the 1 EB (1024 TB) file system and 16 TB maximum file size.

It currently only supports 32,000 subdirectories. Ext4 supports an unlimited number of subdirectories.

When writing data to the Ext3 file system, the block mapper can allocate only a 4 Kb block whenever it maps, writing a 100 Mb file calls the burst mapper 25,600 times. And it uses an MBALLOC (Multi-Block Mapper) to map multiple blocks of data.

Delay Distribution

It uses the block allocation data strategy allocated as soon as possible.

Ext4 and other modern file strategies delay cache allocation as much as possible until the file that starts in the distribution of blocks ends and writes to disk.

So you can optimize the first two features of data blocks, which can significantly improve the entire file distribution and performance.

Quick Disk Control

Fsck will be very slow first because it has to check the entire file index. Ext4 adds an unused inode list to each group’s inode table.

Verification Record

Part of the registry is the most common, but it also easily causes hardware disk failure and getting rid of registry data damage causes more data corruption.

The Ext4 recording function can easily verify data logging to determine whether Damage and Ext3 two-stage system will be recorded in a single stage to increase performance while improving performance.

Closing the Registry

The registry can always be overloaded. Ext4 allows you to close the registry, so some users with special needs can improve performance.

Online Merge

Despite the delay in deployment, assigning multiple categories and classes can reduce file system fragmentation, but fragmentation inevitably results.

Ext4 defragmentation is supported online and provides the e4defrag tool for individual files or entire defragmentation.

Inode Features

Ext4 supports the largest inode. It is also edited to better accommodate extended inode attributes. Ext4 also supports the rapid expansion of features and inode stock.

Internal Cache

It is equipped with a built-in cache to disk to rewrite data to adjust the amounts to optimize performance, so the file system must be written to disk after log data to write a confirmation journal if registry confirmation is written first, the registry may be corrupted and data integrity may be affected.

Ext4 is enabled by the barrier by default, but when all the data is the barrier before writing to disk, the data can be written after the barrier.

   Related Articles

Binary Digit
Binary Tuple
What is ASCII?
NTFS File System
ZFS File System

Add a Comment

Your email address will not be published. Required fields are marked *