Managing RAID on Linux - Derek Vadala [116]
Mounting the filesystem
Mounting works the same way as in any other Linux filesystem:
# mount -t reiserfs /dev/sdb1 /mnt/reiserfs
ReiserFS has a number of mount options that affect its performance and behavior. Particularly interesting is the notail option, which disables the use of file tails and is reported to improve performance on systems with heavy random I/O—particularly systems with the type of activity that uses RAID-5.
* * *
Tip
Craig Sanders originally reported this performance improvement on the Postfix mailing list. To read about it, see the thread http://archives.neohapsis.com/archives/postfix/2001-03/1071.html, and specifically the message http://archives.neohapsis.com/archives/postfix/2001-03/1148.html. Related discussions have also taken place on the ReiserFS mailing list.
* * *
To disable the use of file tails, enter a command like the following:
# mount -t reiserfs -o notail /dev/sdb1 /mnt/reiserfs
The disadvantage of the notail mount option is that it eliminates the space efficiency gained through ReiserFS's method of file packing.
A complete list of options is available on the mount options web page (http://www.namesys.com/mount-options.html). In addition to options specific to ReiserFS, mount options like noatime (described earlier in this chapter in the ext2 section, under Access time) are also fair game.
reiserfsck, reiserfstune, and debugreiserfs
Despite its name, reiserfsck does not perform a traditional filesystem check, but rather replays transactions that might not have not been completed since the last unmount. This is usually done when the system boots (that's why the hard link fsck.reiserfs is also present), but system administrators can manually invoke reiserfsck in the following manner:
# reiserfsck /dev/sdb1
By default, reiserfsck performs a check and reports any errors found, but does not fix them. If no errors are detected, reiserfsck exits cleanly. To fix any fixable errors, try:
# reiserfsck --fix-fixable /dev/sdb1
reiserfstune and debugreiserfs perform additional administrative tasks on a filesystem. reiserfstune can be used to modify the filesystem's journal size and maximum transaction size (the number of journal updates possible without a commitment to disk). It's also useful for relocating a journal to another device. debugreiserfs displays the parameters of a ReiserFS and its journal. Without options, debugreiserfs displays the filesystem superblock. For further details, options, and examples, please refer to the reiserfsck(8), reiserfstune(8), and debugreiserfs(8) manual pages.
* * *
[5] A balanced tree is a tree where the lowest level of the tree must become full before a node is created at the next level. This arrangement ensures maximum efficiency in searching, because at most, half of the nodes in a tree must be examined for any given search. The trade-off lies in adding more overhead to each change in the tree. The balanced tree that ReiserFS uses has a maximum depth of 5, by default.
IBM JFS
IBM JFS was originally designed for the OS/2 Warp Server operating system. The filesystem was developed from the ground up for this operating system, not as an extended feature set for a nonjournaling filesystem. In addition to journaling capabilities, JFS also supports dynamic inode allocation. In February 2000, IBM began to port its JFS implementation to Linux.
JFS uses B+ trees to organize and manage large directories. B+ trees are similar to B-trees, but they use indexing to improve searches and data retrieval. Smaller directories—that is, directories with fewer than eight entries—use a traditional approach, storing directory information within the directory's inode. This two-pronged approach helps JFS perform well when