Each file system has its advantages and disadvantages. In this article, we will take a detailed look at the features of the EXT (Ext 2, Ext3 Ext4) Linux File System. Show
ContentsWhat is the EXT file system?The EXT (Extended File System) file system was designed especially for the Linux operating system. The main goal that the creators of EXT had in mind was to overcome the maximum size of writable files, which at that time, was 64 MB only. Thanks to creating a new metadata structure, the maximum possible file size was increased to 2GB. At the same time, the maximum length of file names increased to 255 bytes. Remy Card, the chief designer of the EXT file system, admired the UFS file system, so some of its features were passed on to EXT. Even though Linux supports a large number of file systems, EXT is preferred since it was built on the Linux kernel. Although EXT overcame the main drawbacks of the Minix file system (which was used in Linux at the time), its main drawback was the timestamps. EXT allowed only one timestamp per file. For this reason, EXT‘s development continued, and in later versions, it was constantly evolving and adding new features. It became very popular not only among Linux users but also among Android smartphone owners. That is why Android uses the Ext4 file system by default. Evolution of the EXT file system. The changing history in versions.As mentioned above – although EXT overcame the limitations of the Minix file system, it still had a lot of drawbacks. That is why the development of EXT did not stop, and three more versions were added in the future. Ext2 Just like the previous one, Ext2 was created by Remy Card. This file system saw the world in January 1993. The most important innovation was that now data is written in blocks of equal length. It allowed increasing the filesystem performance significantly. Besides, the usage of data blocks allows for increasing the maximal size of the stored files. Now it was 2 TB instead of 2 GB. The file name length was still 255 bytes. But the Ext2 had quite a few disadvantages. The biggest issue was the lack of Journaling. If a power failure happened while writing the files to the disk, the file system would get corrupted, and it was quite hard to recover. In some cases, the lack of journaling was a definite plus. For example, Ext2 is faster than Ext3. That is why in some cases, Ext2 is still in use today. Also, the lack of journaling reduces the load on SSD drives. That is why some companies use Ext2 and use RAID as data protection. For more details about RAID, you can read the article “RAID – what is it and how you can use it?“ One more drawback of the Ext2 file system was high data fragmentation which lead to a performance loss. That is, during writing the file was split into several parts, and then they were written in different parts of the hard drive. Thus, the reading process took longer. The more information was stored on the disk — the lower was the speed of reading/writing data. That is why the development of the EXT file system didn’t stop at this version and in November 2001 the next version – Ext3 – appeared. Ext3 The Ext3 file system is an improved version of Ext2. Information is still written in data blocks of the same length, and the maximum file size remains the same – 2TB. However, it includes journaling, a technology that significantly reduces the risk of data loss. The essence is the following – the file system marks all planned changes in the data structure. In case of power loss, the system instantly reads the information from the “journal” and the files are not lost. Ext3 supports three levels of journaling:
The Ext3 file system became quite popular and was used until the next version – Ext4. Ext4 Ext4 – was introduced in 2008 and is currently the latest version of the EXT file system. It uses basic principles of Ext3, but the speed has been increased significantly (it’s even faster than in Ext2), the maximum file size has been increased to 16 GB, support for drives up to 1 Exabyte has been added, and much more. There are quite a lot of innovations. Go to the next point in this article to read about them. Features of the Ext4 file systemAlthough the Ext4 file system uses the basic concepts of Ext3, it has a lot of innovations that have made it so popular Read more: Dynamic Foreign Disk in Windows For first, the space-based file recording method is used in Ext4 to increase the performance. It means that before the file is written to the disk, the filesystem allocates the surface area, and then write the data to the end of that one. The Ext4 file system has added backward compatibility with Ext2 and Ext3 for the first time. For example, you can automatically mount Ext3 using the Ext4 driver. The next point is the introduction of extents. The thing is that in old versions the file data blocks are displayed in the old way, i.e. all blocks belonging to a certain file are displayed. This imposes some limitations when working with large files. For example, it reduces performance. Implementing extents allows displaying a large number of consecutive blocks of information with a single descriptor. Such an approach increases file system performance by several times. The system stores only the address of the first and last data block, which corresponds to a large file. Reducing file fragmentation by allocating memory blocks more efficiently is one more innovation. Before writing a file, Ext4 highlights blocks that are nearby in order to reduce the time needed to find the right block while reading the data. Ext4 has a delayed allocation feature, which allocates memory blocks immediately before writing files to disk. Such a solution allows to reduce the load on the cache memory and therefore increase performance. New for Ext4 is the ability to create an unlimited number of subdirectories without performance loss. The reason is that Ext4 uses HTree data structure, which is a version of the B-tree adapted specially for Ext4. An innovation that improves performance and security at the same time is the implementation of journal checksums. This method constantly checks data blocks for corruption. In turn, this reduces journaling time and increases performance. A quick file system checking is now available. The way it has been implemented is as follows: in Ext4, the inodes tables and free block groups are marked. It means that only blocks with data will be checked during the file system check. A new feature is e4defrag, which allows you to defragment both the whole disk and individual files. Fragmentation reduction not only makes the system faster but also reduces the load on the processor, etc. As you can see there are quite a few innovations, and they greatly improve security and performance. In turn, this is exactly what users need. That’s why Ext4 is so popular today. Advantages and disadvantages of the Ext4 file systemDespite the introduction of new features and performance improvements, the Ext4 file system has a lot of disadvantages as well. Therefore, before you start using it on your disk, we suggest the user compare its advantages and disadvantages. The advantages of Ext4 include the following:
Unfortunately, the disadvantages of Ext4 are also quite a few. Among the most significant are:
Now you can compare the advantages and disadvantages of the Ext4 file system and decide for yourself if you want to use it or not. The EXT file system structureThe structure of the EXT file system is the same as that of most UNIX file systems. Schematically, it can be shown as follows: That is, you can distinguish several main components in the EXT structure:
Read more: How to rebuild a RAID array built on the motherboard controller The file system structure is roughly the same for Ext2, Ext3, and Ext4. Only the functionality of each version of the EXT file system differs. Is it worth turning off journalingThe main purpose of journaling is to ensure that the file system structure can be restored in case of failures or sudden power outages. At the same time, the journaling process requires some time and resources. Therefore, some users decide to disable journaling to get more performance. It is subjective, as disabling Journaling only makes sense if you have advanced data protection features (e.g. if you use RAID 5). If you have no additional security — don’t disable Journaling as the performance gain is very small, while the risk of losing important data is several times greater. However, if you decide to disable Journaling, make sure to protect your important data first by backing it up, using a RAID array, or at least using an uninterruptible power supply. How to open an EXT drive in Windows?The Windows operating system natively uses the NTFS file system. Therefore, as soon as you plug in a drive formatted in EXT, Ext2, Ext3, Ext4 – you will immediately get a notification that the drive’s file system is unsupported. The first (and best) way is to use the RS Partition Recovery program. This program is easy to use. All you need is to install it on your computer. Then you can immediately connect the Ext2,3,4 drive and work with the data. You don’t even need to reboot your computer. But most importantly, RS Partition Recovery allows you to recover lost data if something happens to the file system or with the file itself. For example, you accidentally deleted a file – no problem. You formatted the drive with important information – no big deal. RS Partition Recovery will recover your data. We would also like to mention the support for ALL modern file systems, which makes RS Partition Recovery a kind of universal tool, which should be in the arsenal of everyone who works with data.The second way is to install the EXT2FSD — driver that adds support for the Ext 2, 3, or 4 file system in Windows. The main disadvantage of this method is that the EXT2FSD driver sometimes conflicts with the Windows drivers, and instead of the promised EXT support you may get a non-working operating system. Also, attempts to restore Windows functionality may often lead to the loss of important data. Not only on the C:\ drive but also on the external drive (if it was connected to the computer at the time of the failure). The third way is to install a special plug-in for Total Commander called ext4tc. This method also has pitfalls. Firstly, you will need to buy Total Commander itself and then install ext4tc plugin additionally. In addition, sometimes after installing the ext4tc plugin, the file manager crashes. Therefore, you should be careful when manipulating important data. We strongly recommend not to risk important information because sometimes it costs more than the whole computer and programs. That is why it is better to use the first method described above. The best alternatives to the EXT file systemThere is more and more information on the web that since Ext4 does not support next-generation features – the Linux operating system will switch to Btrfs soon. That is why many users wonder if it is worth using Ext4 or if it is better to install an alternative file system like Btrfs or a different one. The decision is up to the user, but really — Ext4 does not support a lot of today’s features. So if you want to use a time-proven filesystem but are ready to give up a lot of modern features, your choice is Ext4. It is stable, widely supported, and works fine. If you want to have a modern filesystem that will support all the new features, and at the same time not be afraid to deal with a somewhat less mature ecosystem, Btrfs is your choice. Also, you’ll be one step ahead, since most Linux distributions will be using it by default shortly. If you are looking for the best file system for your server and you are looking for reliability and minimal risk of data loss, the best alternative is the ZFS file system. There is one thing — you have to read a lot of information and learn a lot of commands to use it as efficiently as possible. Using or not the EXT file system is up to everyone. We hope that after reading this article — you will be able to make the choice that best suits your needs. |