reiserfs is a new, general-purpose filesystem for Linux that is designed for flexibility and efficiency. The current version of reiserfs, 3.5.16, is quite stable. Versions of reiserfs are available for the Linux 2.2, 2.3 (Beta), and 2.4 (Beta) kernels.
THE DESIGN OF REISERFS
Journaling was added to reiserfs in 1999, and in some cases it still extracts a slight performance penalty in the interests of increased reliability and faster restart times. In its current incarnation for the 2.2.14/15 Linux kernels, reiserfs can be slower than ext2fs when dealing with files between 1 KB and 10 KB, but on average it is substantially faster. (The average file size on Unix servers is about 91 KB.)
reiserfs supports filesystem plug-ins that make it easy to create your own types of directories and files. This guarantees reiserfs a place in the Linux filesystems of the future by making it easy to extend reiserfs to support the requirements for protocols that are still being finalized, such as streaming audio and video. For example, a system administrator can create a special filesystem object for streaming audio or video files, and then create her own special item and search handlers for the new object types. The content of such files can already be stored in TCP/IP packet format, reducing processing latency during subsequent transmission of the actual file.
The version of the reiserfs filesystem for Linux 2.2 kernels is not yet 64-bit enabled, but this sort of cleanup is part of the planned development once the Linux 2.3 and 2.4 kernels are more stable.
INSTALLING REISERFS
Before installing reiserfs, the system administrator should decide which parts of his filesystem tree should be converted into journaling filesystems. Read-only directories do not need a journaling filesystem. Thus, for a standard Red Hat installation, the directories /boot, /root, /usr, /usr/local, /etc, and /dev do not need to be rebuilt for journaling.
Let's assume you would like to put /home and /oracle_data under reiserfs' control. The first thing would be to make a backup of all files on these directories to tape or to another disk somewhere.
If you did not install the kernel sources when you installed Red Hat, do it now. reiserfs is installed as patches to the kernel source code. Then the kernel needs to be recompiled and installed under /boot.
Assuming you have kernel 2.2.14 (the standard kernel shipped with red hat 6.2) or 2.2.15 (available as an update from Red Hat's web site), get the patch linux-2_2_14-reiserfs-3_5_ 19-patch.gz or linux-2.2.15-reiserfs-3.5.19-patch.gz. It is important to get the reiserfs patches to the kernel for which you have the source code installed. Recompiling your kernel to add reiserfs support will not work if you obtain the patches for the wrong kernel source code. To download these patches go to:
http://devlinux.com/pub/namesys
http://www.tux.org/pub/devel/reiserfs
Then type cd/usr/src and patch your kernel by executing the command:
zcat filename | patch -p0
Please be sure to enable reiserfs support during the Filesystem section of the make config or make xconfig step.
Activating a reiserfs Filesystem for /home and /oracle_data
Once you have installed your new reiserfs-enabled kernel, you'll need to cd to the new kernel-source directory fs/reiserfs/ utils and type make depend, make, and make install. This will build and install the reiserfs-related utilities such as mkreiserfs, resize_reiserfs, and fsck.reiserfs.
Note: when installing fsck.reiserfs for Linux 2.2.14, you'll have to either fix the Makefile or rename the installed binary from /sbin/reiserfsck to /sbin/fsck.reiserfs.
After you build and install the reiserfs utilities, you can then proceed to make a reiserfs filesystem with the mkreiserfs tool (which is found in /sbin). First create two reiserfs filesystems on /dev/hda2 and /dev/hda3 by typing:
# mkreiserfs /dev/hda2
# mkreiserfs /dev/hda3
Next, mount the two newly formatted partitions by typing:
# mount /dev/hda2 /home
# mount /dev/hda3 /oracle_data
Now restore the backups to their appropriate directories and -- presto! -- you have a journaling filesystem.
MOUNT OPTIONS
reiserf has several mount options:
*-notail causes the filesystem to work faster, especially for small appends to small files. However, this option also wastes more disk space.
*-genericread causes reiserfs to use generic file read, which is used by most Linux filesystems. Sometimes it can improve performance, sometimes not. If you are doing lots of small reads or lots of seeks, turn it on.
* If you are using md to spread reiserfs over multiple disks, turn off REISERFS_READ_LOCK (simply comment out #define REISERFS_READ_LOCK in linux/include/linux/ reiserfs_fs.h.).
In about three months of running reiserfs, our laboratory experienced a few hard-to-trace problems that could have been related to reiserfs. Oracle died a few times with mysterious error messages related to data files that resided on reiserfs volumes. The errors were not reproducible, however, and they have been forwarded to Oracle R&D for further analysis.
Large updates on Oracle tables that reside on reiserfs volumes take a bit longer than on ext2fs filesystems. The increased security, recoverability, and faster restart times, however, more than make up for any slower operation.