|
The ReiserFS open source journaling file system is available in most Linux distributions and supports metadata journaling. ReiserFS was merged into the 2.4.1 release of the kernel.org source tree. ReiserFS provides the following unique features that help differentiate it from the other journaling file systems:
Tail packaging does cause a slight performance penalty when it forces ReiserFS to rearrange the data as files are reduced or grow in size. This is one reason that this feature can be tuned by turning off the notail mount option. Kernel Configuration Support for ReiserFSYou can select ReiserFS options from the File Systems section of the configuration menu and enable the following option: Reiserfs support (CONFIG_REISERFS_FS=y,m,n) Click y next to the Reiserfs entry if you want to build ReiserFS into the kernel. Click m next to the Reiserfs entry if you want to build ReiserFS as a module. Other options are available in the ReiserFS selection for ReiserFS configuration. If you need any of these options, select them here. Working with ReiserFSThere are three ways to tune a ReiserFS file system:
All three of these tuning options are discussed in the following sections. Creating a ReiserFS File SystemReiserFS uses the mkreiserfs utility to create a ReiserFS file system. The performance tuning options are as follows: -h | --hash HASH HASH specifies the name of the hash function that filenames in directories will be sorted with. (See the mount option section of the ReiserFS man page for a more complete description of each hash option.) Choose one of the following:
See the subsection on the mount options for a description of these alternatives. -j | --journal-device FILE FILE specifies the name of the block device where the file system places the journal. -o | journal-offset N N specifies the offset where the journal starts when the journal is on a separate block device. The default is 0. -s | journal-size N N specifies the journal in blocks. When it is on a separate block device, the default size is the number of blocks on that device. When the journal is not on a separate block device, the default is 8193 and the maximum is 32749. The minimum is 513 blocks for both cases. -t | --transaction-max-size N N is the maximum transaction size for the journal. The default and maximum is 1024 blocks. For a complete description of the mkreiserfs options, see the mkreiserfs man page. To create the ReiserFS file system with the log inside the ReiserFS partition, issue the following command: # mkreiserfs /dev/sdb1 After the file system has been created, mount it using the mount command. Determine the mount point and create a new, empty directory, such as /reiserfs, to mount the file system. The following example mounts the new file system: # mount -t reiserfs /dev/sdb1 /reiserfs To unmount the ReiserFS file system, use the umount command with the same mount point as the argument: # umount /reiserfs Increasing Speed with an External LogAn external log improves performance because the log updates are saved to a different partition than the log for the corresponding file system. This reduces the number of hard disk seeks. To create the ReiserFS file system with the log on an external device, your system needs to have two unused partitions. In the following example, /dev/hda1 and /dev/hdb1 are spare partitions. The /dev/hda1 partition is used for the external log. # mkreiserfs -j /dev/hda1 /dev/hdb1 Mounting the File SystemTo mount the file system, use the following mount command: # mount -t reiserfs /dev/hdb1 /reiserfs To avoid having to mount the file system every time the system boots, add the file system to the /etc/fstab file. Make a backup of /etc/fstab and edit it with your favorite editor to add the /dev/hdb1 device. For example: /dev/hdb1 /reiserfs reiserfs defaults 1 2 Mount OptionsThree mount options can change the performance of the ReiserFS file system:
Tuning ReiserFSreiserfstune tunes the ReiserFS file system. reiserfstune changes the journal size and maximum transaction size. The journal's location can also be changed: -j | --journal-device FILE FILE specifies the name of the block device where the file system places the journal. -o | journal-offset N N specifies the offset where the journal starts when it is on a separate block device. The default is 0. --no-journal-available This allows the file system to continue when the current journal's block device is no longer available by having a disk that has gone bad. --journal-new-device FILE FILE is the name of the block device that will contain the new journal for the file system. -s | journal-size N N specifies the journal in blocks. When the journal is on a separate block device, the default size is the number of blocks on that device. When the journal is not on a separate block device, the default is 8193 and the maximum is 32749. The minimum is 513 blocks for both cases. -t | --transaction-max-size N N is the journal's maximum transaction size. The default and maximum is 1024 blocks. See the reiserfstune man page for information about all the options for this utility. ReiserFS UtilitiesThe following ReiserFS utilities are located in the reiserfsprogs package:
For more information, see the man page for each of the ReiserFS utilities. |
|