Managing RAID on Linux - Derek Vadala [117]
The maximum filesystem size under JFS is based on the chosen block size. With a 4 KB block size, a maximum filesystem size of 4 petabytes (4000 terabytes) is possible. With a block size of 512 bytes, a maximum of 512 terabytes is allowed.
Distribution Support
Recent versions of Red Hat, SuSE, Mandrake, and TurboLinux all support direct installation to JFS volumes. On Red Hat, the same trick that I mentioned earlier for ReiserFS applies. Although undocumented, typing linux jfs at the boot prompt causes JFS to appear as an option in Disk Druid. This allows you to install Linux directly to a software RAID, using JFS.
I am not aware of any boot media that allow Debian users to install a new system with JFS.
Patching the Kernel
JFS didn't make it into the official kernel releases until 2.5.6, so if you want to work with a 2.4 kernel, you will have to download and apply a patch. If you're confident using a development kernel, download the most recent 2.5 kernel and skip ahead to the next section, Configuring the kernel.
* * *
Tip
IBM JFS was accepted into the 2.4 tree with 2.4.20-pre4. So users working with stable kernels later than 2.4.20 (which, at the time of this writing, is not yet released) won't need to go through the process of patching.
* * *
You can download a patch that matches your kernel version as well, as the most recent JFS core patch, from http://www.ibm.com/developerworks/oss/jfs/. Since I'm working with kernel 2.4.18, I downloaded both jfs-2.4.18-patch and jfs-2.4-1.0.21.tar.gz. After unpacking a clean 2.4.18 kernel, change into the source directory, apply the patch that is specific to 2.4.18, and unpack the jfs-1.0.21 archive.
# cd /usr/src/linux-2.4.18
# patch -p1 < /usr/src/patches/jfs-2.4.18-patch
# tar xzvf /usr/src/patches/jfs-2.4-1.0.21.tar.gz
The jfs-2.4.18-patch makes the necessary changes to the kernel configuration scripts. If no errors are encountered, the patch command outputs a list of the files that have been modified. If you encounter errors while patching, first ensure you are working with a clean kernel and then attempt to repatch.
Unpacking the file jfs-2.4-1.0.21.tar.gz creates the directories and files that comprise the JFS portions of the kernel source code. These files are created relative to the current path. So be sure to execute the tar command in the root directory of the kernel's source tree. Once the kernel is successfully patched and the JFS code has unpacked, you can begin configuration.
Configuring the Kernel
Turn on support for JFS (CONFIG_JFS_FS) from the Filesystems submenu:
File systems --->
<*> JFS filesystem support
[ ] JFS debugging
[ ] JFS statistics
JFS support can also be compiled as a loadable kernel module. Debugging (CONFIG_JFS_DEBUG) provides some additional error reporting via the system log. It should normally remain disabled, although it has minimal overhead. Statistics support (CONFIG_JFS_STATISTICS) enables JFS statistics collection at /prov/fs/jfs. It's safe to enable this option.
After you recompile, install, and boot the new JFS-enabled kernel, you should see JFS listed in /proc/filesystems. If it does not appear there, make sure that you patched and compiled the kernel properly.
Installing the JFS Utilities
The JFS utilities let administrators create and manage JFS partitions. Download the utility archive that matches the JFS version you applied to your kernel from http://www.ibm.com/developerworks/oss/jfs/. In my case, I've downloaded jfsutils-1.0.21.tar.gz. Configure and build the JFS utilities as you would any standard GNU package:
# tar xzvf jfsutils-1.0.21.tar.gz
# cd jfsutils-1.0.21
# ./configure
# make && make install
Alternatively, an RPM containing the JFS utilities can be built using the command:
# rpm -ta jfsutils-1.0.21.tar.gz
You can also grab an RPM directly from your Linux distributor—many now provide one for jfsutils. Debian users may issue the command apt-get install jfsutils.
Always use a version of the