Let’s continue where I left my previous post on Linux file system, with information on different file systems commonly present in most distributions and small comparison between them.
ext2:
ext2 (or second extended file system) is the oldest file system for Linux still in use, and until recently one of the most famous. It was created to overcome the limitations of original ext file system (first file system for Linux).
ext2 is not a journaling file system and is not used by desktop users these days, but it’s still one of the most compatible and tested file system for Linux present.
ext3:
ext3 is the successor of ext2 and allows in-place upgrade from ext2. Main difference between the two is addition of journaling in ext3. As ext3 is basically just ext2 with some additional features, it can also be mounted as ext2, though doing so removes the advantage of ext3 file system. In other words, ext3 is backward-compatible. It also provides great compatibility with other operating systems, like windows, that is, you can mount ext3 (and ext2) partitions in Windows using utility.
ext3 provides three different level of journaling:
- Journal
- Ordered
- Writeback
With “journal” offering maximum journaling (both meta-data and user-data), and “writeback” offering minimal journaling (only meta-data). Default journaling level is “ordered”, which is meta-data only journaling but which makes sure that data is written to disk before committing to journal (a precaution not taken in “writeback”), which save from data-corruption.
ReiserFS:
ResiserFS is also a journaled file system, but unlike ext3 it provides only meta-data journaling. It was introduced before ext3 and is the first journaling file system for Linux, though ext3, JFS and XFS very soon followed.
Even though ReiserFS is much faster than ext3, it is sometimes not preferred over other file systems. One of that reason was given by SUSE, when they changed their default file system from ReiserFS to ext3. According to them, ReiserFS doesn’t scale very well on multiple core systems as the critical sections are executed on only one core at a time.
Work on it’s successor Reiser4 is going on, and it has been announced that no new features will be added in ReiserFS. And as Reiser4 won’t feature in-place upgrade from ReiserFS (meaning all data will be lost on partition when upgrading), it has also turned down some ReiserFS users.
XFS is another journaling file system and like ReiserFS, it only supports meta-data journaling. It is one of the oldest journaling file system for UNIX, which was later ported to Linux.
On average XFS’ performance is not much different from ReiserFS, though where ReiserFS’ provides great speed when dealing with smaller files, XFS is much better with large files.
Like all other file systems, XFS has it’s own disadvantages too, deleting files is slower than other file systems, and creating/deleting directories also takes more time. XFS also has no un-delete utility, which makes it almost impossible to recover any data once it is deleted (there appears to be one way to do it, if you are desperate enough). Also XFS file system can not be shrunk (it’s size can be increased though).
There is no utility to mount XFS file system under windows. There used to be crossmeta drivers that allowed read/write support in windows, but it isn’t available anymore, even when it was available, it was supposed to be quite buggy.
JFS (Journaling File System) is one of the lesser known file system. Like XFS it has been around quite some and then later ported to linux. It offers meta-data journaling, similar to that of XFS and ext3′s “writeback”.
I haven’t tried JFS yet, but according to reviews and others I have checked with, it provides good speed and reliability. Also, it works efficiently even under high load, and doesn’t use too much CPU in these cases, which makes it preferred file system in cases when CPU efficiency is required, though it is not as widely supported by Linux distributions as the other file systems mentioned here.
I couldn’t find any utility or information to mount JFS under windows, most probably there isn’t one.
Conclusion:
All file systems have different advantages and disadvantages and is useful in particular scenario. ext2 is best to use when installing Linux on flash disk. ext3 provides better data recovery option than other file systems so, it’s preferred to use it for /boot or / (root). Either ext3 or ReiserFS can be used to share partition with windows installtion on same computer. XFS is good to use for large parition which contains large files, like movie collection, backup data etc. Whereas JFS can be used pretty much anywhere, preferablly on partition which contains both large and small files and when that system doesn’t dual-boot with windows.