Understanding ext3 file system and its advantages

The ext2 file system of Linux is a well-tested subsystem and very well optimized. But as of now, the other file systems that were in there experimental stage when ext2 was created have optimized, tested, matured and have become available for Linux.

There are four file systems which one might consider to replace the aging ext2 with: ext3, ReiserFS, XFS, and JFS. All the four of these file systems offers features that might be tempting in various circumstances, but the most important enhancement offered by all the four is called journaling. Considering the Traditional file systems (such as ext2) must search through the directory structure and find the right place on disk to lay out the data, and then lay out the data. (Linux is capable of cache the whole process mentioned above, including the directory updates and thereby making the process  faster to the user.)

The problem with this method  is that in the event of an unexpected crash of Operating system due to some reasons, the fsck program has to go in and follow up on all of the files that are on the disk in order to make sure that they don’t contain any dangling references (for example, i-nodes that point to  other, invalid i-nodes or data blocks). As the disks expands in size and shrink in price, the availability of these large capacity disks means more of us will have to deal with the aftermath of having to fsck a large disk. And  anyone who had done that before can tell you, it isn’t fun. The process can take long time to complete, and that means downtime for your users, which is not exceptable in the organizations .

With journaling file systems, the new way of getting data out to disk, instead of finding the right place, the file system simply writes the data out in any order it can, as fast as it can. Each time, it logs the location of these data blocks.For eg:-  You can think of it as being like using the same spiral notebook for multiple classes without prepartitioning the notebook. It would be wiser to simply take notes for each class in chronological order instead of grouping all of one class together. A journaled file system is like such a notebook, with the beginning of the notebook containing an index telling you which pages contain all the notes for a single class. Once the data is written, the file system can go move things around to make them optimal for reading without risking the integrity of the file.

This means to you as a system administrator is that the amount of time it takes for the disk to write out data is much less, while at the same time the safety of getting the data written out to disk quickly means that in the event of a system crash, you won’t need to run fsck exhaustively under pressure. Even when you do run fsck, it only has to check recently modified data, so instead of interminable times, you’ll find that the checks go very quickly.

So the last question arises, which of the four journaling systems should you choose? That is entirely up to you. But the only one we have discussed is ext3, which is the default file system in Red Hat Linux.


0 Responses to "Understanding ext3 file system and its advantages"

Post a Comment


Managing Shell And its Secrets

Subscribe To Get Update On Mobile

Get updates of latest post on your mobile free