Naturally, your GNU/Linux system is contained on your hard disk within a file system. Here we present different aspects related to file systems, as well as the possibilities they offer.
During the installation, you can choose different file systems for your partitions. This means you can format your partitions according to different algorithms.
Unless you are a specialist, choosing a file system is not obvious. We propose a rapid presentation of three of the most current file systems, which are all available under Mandrake Linux.
The Second Extended File System (its abbreviated form is Ext2FS or simply ext2) has been GNU/Linux's default file system for many years. It replaced the Extended File System (that's where the "Second" comes from). The "new" file system corrected certain problems and limitations.
Ext2FS respects the usual standards for Unix-type file systems. Since its conception, it was destined to evolve, while still offering a great robustness and good performances.
Like its name suggests, the Third Extended File System is Ext2FS' successor. It is compatible with the latter but it is enhanced by a very interesting feature: journaling.
One of the major flaws of "traditional" file systems like Ext2FS is their low tolerance to abrupt system breakdowns (power failure or crashing software). Generally speaking, such events involve a very long exam of the file system's structure, attempts to correct errors, sometimes resulting in an extended corruption. Hence, a partial or total lost of saved data.
Journaling answers this problem. To simplify, let's say that the object is to save actions (such as the saving of a file) before really doing it. We could compare its functioning to the one of a boat captain whom notes in his log book daily events. The result: an always coherent file system. And if problems occur, the verification is very rapid and the eventual repairs, very limited.
Hence, Ext3FS offers the journal file system technology, while keeping Ext2FS' structure - ensuring an excellent compatibility.
Unlike to Ext3FS, ReiserFS is created from scratch. It is journalized like Ext3FS, but its internal structure is radically different. Specifically, it uses binary-tree concepts inspired by database software.
JFS is the journalized file system designed and used by IBM. Proprietary and closed at first, IBM recently decided to open the access to free software movement. Its internal structure is near to ReiserFS' one.
Table 9-1. File System Characteristics
Ext2FS | Ext3FS | ReiserFS | JFS | |
---|---|---|---|---|
File System Maximal Size | 4Tb ("Tb" stands for terabyte[a]) | 4Tb | 16Tb | 32Pb |
Block Size | 1Kb to 4Kb | 1Kb to 4Kb | 4Kb (up to 64Kb) | 512 Bytes to 4Kb |
File Maximal Size | 2Gb | 2Gb | 4Gb | 512Tb to 4Pb |
Stability | Excellent | Good | Good | Medium |
Tools to recuperate erased files | Yes (complex) | Yes (complex) | No | No |
Reboot time after crash | Long, even very long | Fast | Very fast | Very fast |
Sum of the data in case of a crash | Generally speaking, good, but high risk of partial or total data loss | N/A | Very good. Complete data loss is very rare | Very good |
Notes: a. One terabyte = 1,024 gigabytes |
It is always very delicate to compare performances. Every tests have their limitations and the results must be interpreted with caution. Nowadays, Ext2FS is very mature but its development is scarce; on the other hand, journal file systems like Ext3FS and ReiserFS evolve very rapidly. Tests done a couple of months or weeks ago are already too old. Let's not forget that today's material (specially concerning hard drive capacities) has greatly leveraged the differences between them. However JFS is currently the one showing best performances.
Each system offers advantages and disadvantages. In fact, it all depends on how you use your machine. A simple desktop machine will be happy with Ext2FS. For a server, a journalized file system Ext3FS is preferred. ReiserFS, perhaps because of its genesis, is more suited to a database server. JFS is itself preferred in cases were file system throughput is the main issue.
For a "normal" use, the four file systems give approximately the same results. ReiserFS allows to access small files rapidly, but it is fairly slow to manipulate large files (many megabytes). In most cases, the advantages brought by ReiserFS' journaling capabilities render its inconvenients to be of minimal importance.