Racing to ReiserFS on Red Hat
Of all the journal filesystems available today, ReiserFS, is the most developed under Linux. While IBM's JFS and SGI's XFS have been around a lot longer, they are still in an prenatal stage as far as the Linux OS is concerned. Ext3 has also quite a way to go. So, for now, our choice of a journal filesystem is ReiserFS. Of course, this isn't to say that we're settling for ReiserFS for lack of a better option. ReiserFS is a good choice regardless of the number of options in the market or the quality of those options.
Why Journaling?
Journaling filesystems are sort of the elite in the business. They're what filesystems like FAT and ext2 want to grow up into. They're also essential for big enterprise server where data integrity is a priority.
The idea behind journal filesystems comes from big databases like Oracle. Database operations quite often include several related and dependent sub-operations. The failure of any one operation means that the entire operation is invalid and any changes made to the database are rolled back. Journal filesystems use a similar system.
A journal log file is maintained on the partition. Filesystem writes are first written to the log file. If a write operation is interrupted due to the machine unexpectedly going down -- power failure, crash -- then at the next boot, the journal log file is read and operations are rolled back. This process takes only a few seconds to few minutes rather than the hours that a `fsck' can possibly take, on larger servers.
A far more effective description can be seen in this LinuxGazette article.
Getting ReiserFS
Kernels 2.4.1 include the ReiserFS code. If you have kernel 2.4.1, then upgrade to kernel 2.4.3, which carries the latest ReiserFS code. Version 3.6.25 is the latest and we recommend that you start using this code as important bug fixes and updates are included in it. If you have kernel 2.4.3, then the updates are already in the kernel. We'll be using kernel 2.4.3 for this article but 2.4.2 with latest patches is equally good. Patches for the 2.2 kernels are also available but they seem to be at version 3.5.x.
Using ReiserFS
Start by patching the kernel for ReiserFS
# cd /usr/src/linux
# zcat linux-2.4.2-reiserfs-20010327.patch.gz | patch -p1
For 2.2 kernels use
# bzip2 -dc linux-2.2.18-reiserfs-3.5.32-patch.bz2 | patch -p1