Data Storage Digest

Do-It-Yourself Windows File Recovery Software: A Comparison

results »

Linux File Systems: ext2 vs. ext3 vs. ext4

For hard disk drives, removable USB drives and other media used by Linux, the most common file systems you’ll find are ext2, ext3 and ext4. As the names imply, these are the second, third and fourth iterations of the extended file system, which was originally developed in 1992. The first version of extended file system is essentially obsolete. But the current three extended file systems are still widely used. Read on for a comparison of all three.

Ext2 File System

The ext2 file system (second extended file system) as designed as a replacement to the original extended file system. Among other limitations, ext2 remedied issues with ext including fragmentation and immutability of inodes. When comparing ext2 to ext3 and ext4, the main differentiator is that ext2 is not a journaled file system. The maximum file size for an individual file size on an ext2-formatted volume depends on the block size chosen. If a 1 KB block size is chosen, then the max individual file size is 16 GB. You can choose block sizes up to 8 KB, which yields a 32 TB max individual file size. The maximum file system size is between 4 TB and 32 TB, again, based on the block size.

If ext2 has any advantage over ext3 and ext4, it’s that it doesn’t include the overhead and extra write processes involved with journaling. Theoretically, ext2 should be faster than ext3. Furthermore, some argue that the additional write commands will result in increased “wear and tear” on the card or drive. This is important for flash drives, which have a more limited longevity per sector. However, whether or not the benefits in speed and long term reliability is noticeable isn’t clear.

Ext3 File System

In terms of file system and individual file sizes, ext3 is the same as ext2. It has individual file sizes between 16 GB and 32 TB based on block size and filesystem sizes between 4 TB and 32 TB. But the big difference is that it is a journaled file system. This allows it to be more robust in preventing file corruption, particularly when write processes are interrupted unexpectedly (e.g. removing a thumbdrive before safely ejecting, powering off or crashing suddenly, power outages, etc.).

Ext4 File System

Ext4 is the fourth extended file system and it is an improvement upon the ext3 file system. In addition to journaling, ext4 file systems support even larger file sizes and file system sizes. Individual max file sizes on an ext4 file system range from 16 GB to 16 TB. The max file system size is 1 exabyte. An exabyte, in case you’ve not come across this enormous unit size, is 1,000,000 terabytes. Ext4 also introduces some more reliability features, including delayed allocation, journal checksum, fast fsck and multiblock allocation.

With ext4, you can also turn off the journaling function, essentially giving you the benefits of ext2 without sacrificing the other improvements of ext3 and ext4.

Upgrading Ext File Systems

One of the perks of ext file systems is that you can move among them without doing a backup/restore. For example, you can convert an ext2 to ext3 without affecting any of the data on the file systems. You can also mount an ext3 file system as an ext4 volume and see all the benefits of ext4 on an ext3 formatted drive. You can do the same with ext2, provided that you are running a Linux kernel 2.6.28 or later.


No comments yet. Sign in to add the first!