Online Book Reader

Home Category

Managing RAID on Linux - Derek Vadala [115]

By Root 1426 0
/proc/fs/reiserfs/ directory contains a subdirectory for each mounted ReiserFS partition and a file named version that contains the current filesystem driver version. Partition-specific subdirectories are named according to their driver and device major and minor numbers. For example, the directory sd(8,6) refers to /dev/sda6. Each directory contains several undocumented files that report information about the filesystem.

/proc/fs/reiserfs support is generally used for development and testing. Few users enable statistics support because there are no user-space tools available to examine the data collected.

Patching older kernels

ReiserFS is not available for kernels prior to 2.2. Patches for the most recent 2.2 kernels are available from ftp://ftp.namesys.com/pub/reiserfs-for-2.2/. Grab the patch for the most recent 2.2 kernel and apply it to a corresponding unpatched 2.2 kernel source with commands such as the following:

# cd /usr/src/linux

# patch -p0 < /usr/src/patches/linux-2.2.19-reiserfs-3.5.35-patch.bz2

Now rebuild the kernel, turning on support for development drivers through CONFIG_EXPERIMENTAL in the the Filesystems subsection and enabling ReiserFS support through CONFIG_REISERFS_FS, as described in the previous section. Compile the kernel as you would normally, install it, and rebuild your boot sector as required.

* * *

Warning

There are several known issues with 2.2 kernels and ReiserFS, including one problem that affects the usage of disks larger than 32 GB. There are also compatibility issues with ReiserFS and Linux's software RAID subsystem in the 2.2 kernel. These issues prevent RAID-1 and RAID-5 from working properly with ReiserFS and a 2.2 kernel. You should be able to successfully use linear mode and RAID-0 with ReiserFS and a 2.2 kernel, but I recommend upgrading to the 2.4 kernel, if possible. Please consult the ReiserFS FAQ (http://www.namesys.com/faq.html) for more information.

* * *

Creating a Filesystem

Like other filesystems, ReiserFS requires a set of tools to create and maintain filesystems. Download and install the most recent toolset from ftp://ftp.namesys.com/pub/reiserfsprogs.

# tar xzvf reiserfsprogs-3.6.2.tar.gz

# cd reiserfsprogs-3.6.2

# ./configure

# make && make install

An RPM is also available from the NAMESYS FTP server, if you prefer not to compile the tools yourself. Most distributors now provide a reiserfsprogs RPM as well. Debian users can simply enter:

# apt-get install reiserfsprogs

Use the mkreiserfs program to create a new filesystem on an unused partition. Remember that this process will destroy all existing data on the partition. The default options should be fine for most situations. To create a ReiserFS on /dev/sdb1, enter:

# mkreiserfs /dev/sdb1

mkreiserfs generates some output describing the filesystem that was created. The default block size of 4 KB is the only block size currently supported. Additional block sizes are planned for future releases.

r5 is the default algorithm (hash function) that ReiserFS uses to locate files on disk. While two other hash functions (rupasov and tea) are available, r5 is the most reliable and performs best. rupasov should never be used, and tea should be used only when r5 presents problems, because the performance of tea is not as good. For more information about the particulars of each algorithm, including information about when to use tea in lieu of r5, check http://www.namesys.com/mount-options.html.

One option that may be useful with the mkreiserfs command is --journal-device, or -j, which specifies a separate disk partition for journaling. This is quite useful when you are working with a slower disk or array, but have access to a smaller partition on a faster disk. Thus, the following command creates a filesystem on /dev/sdb1 and uses /dev/sda6 for the journal:

# mkreiserfs -j /dev/sda6 -s 8193 /dev/sdb1

The -s option specifies the size of the journal (in blocks). If a size is not specified, mkreiserfs will use the entire partition for the journal, which is usually undesirable for large partitions.

Return Main Page Previous Page Next Page

®Online Book Reader