Online Book Reader

Home Category

Managing RAID on Linux - Derek Vadala [111]

By Root 1435 0
will cause ext3 to inherit some problems that have arisen with ext2 over the years, and have instead opted to use a journaling filesystem that has been developed from the ground up, like ReiserFS. However, many also feel that by adding the journaling features onto ext2, users of ext3 are inheriting the time-tested reliability of the ext2 filesystem. And since ext3 is fully forward- and backward-compatible with ext2, users don't need to go through a tedious backup and restore process to upgrade older ext2 systems.

Regardless of whether you are ready to embrace ext3 or remain a skeptic, two things are certain. First, ext3 will become pervasive, simply because ext2 is so widely deployed. Second, ext2 is always being improved, so just because ext3 inherits its architecture from ext2 doesn't mean that there isn't room for it to develop as a filesystem.

ext3 supports journaling for metadata only, as well as combined journaling of data and metadata. That means users can improve the reliability of their filesystems by taking additional safeguards against data loss resulting from a system crash. ext3 inherits filesystem and file size limits from ext2. It also uses the same data structures and organization as ext2.

Support for ext3 has been included with the stable Linux kernel since 2.4.15. Users working with older kernels can apply a patch to gain ext3 support. As always, upgrading to the most recent stable kernel is advisable, when possible.

Patching the Kernel for ext3 Support

Patches for 2.4 series kernels are available from http://www.zip.com.au/~akpm/linux/ext3/. Download the patch that matches the kernel version you are working with and apply it to a clean kernel. If you don't find a patch for the kernel you are working with, upgrade. For example, if you are using 2.4.10, enter the following:

# cd /usr/src/linux-2.4.10

# patch -p1 < /usr/src/patches/ext3-2.4-0.9.10-2410

Patches for 2.2 kernels are available from ftp://ftp.uk.linux.org/pub/linux/sct/fs/jfs/, although using a 2.4 kernel is recommended.

Compiling the Kernel with ext3 Support

In 2.4 kernels, ext3 features are found under the Filesystems section of the kernel configuration.

Filesystems --->

[...]

<*> Ext3 journalling file system support (EXPERIMENTAL)

[ ] JBD (ext3) debugging support

The first option (CONFIG_EXT3_FS) turns on support for ext3 filesystems. It can be compiled statically (as shown above) or as a module.

* * *

Warning

For 2.2 kernels, ext3 support is listed as Second extended fs development code, and not as ext3.

* * *

You can also enable debugging support (CONFIG_JBD_DEBUG) if you are trying to track a problem. When debugging support is activated, you need to set a debug level before any information is reported. Set the debug level by echoing a number between 1 and 5 to the file /proc/sys/fs/jdb-debug.

# echo 5 > /proc/sys/fs/jdb-debug

The number indicates the verbosity level. A higher number means more verbosity. During normal use, you can leave debugging disabled by never setting the verbosity level. This way, you can keep its support compiled into the kernel without risking the performance degradation normally associated with such logging.

After the new kernel is compiled, installed, and running, you should see ext3 listed in /proc/filesystems. If you compiled ext3 as a module, it won't appear in /proc/filesystems until it is inserted.

Working with ext3

To successfully use ext3, you need a version of the e2fsprogs package that is newer than 1.25. As of this writing, release 1.27 is available. To determine which version of the toolset you have installed, execute mke2fs with the -v option:

# mke2fs -V

mke2fs 1.27 (8-Mar-2002)

Using EXT2FS Library version 1.27

If you are using an older version, download a new one from the e2fsprogs home page (http://e2fsprogs.sourceforge.net/), compile, and install it. You may also be able to get an update from your distributor, although the tools can sometimes be a revision behind.

All of the traditional ext2 tools, like tune2fs, can also be used with ext3 filesystems.

Return Main Page Previous Page Next Page

®Online Book Reader