IBM's Journaled Filesystem

To restart a telecom server quickly, you need a journaled filesystem. Here's how you can move to IBM's AIX-derived JFS.
Experience as an Open-Source Project

In December 1999, three potential journaling filesystems were begun or were in the process of being developed or ported to Linux. Ext2 was adding journaling to its filesystem under the name of ext3. SGI began to port their XFS filesystem from IRIX. The third filesystem was being developed by Hans Reiser and came to be called ReiserFS. But none of these filesystems were fully functional on Linux in 1999. IBM believed that JFS was a strong technology and could add value to the Linux operating system.

Contacts were made with the top Linux filesystem developers and the possibility of adding yet another journaling filesystem was explored. One of the basic underlying philosophies of Linux is that choice is good, so the idea of another journaling filesystem was accepted.

IBM started moving JFS to Linux in December 1999, and by February 2000, they had released the first source code. This initial release contained the reference source code, the mount/unmount function and support for the ls command on a JFS partition.

Installing JFS on a Separate Partition

JFS has been incorporated into the 2.5.6 Linux kernel and also is included in Alan Cox's 2.4.X-ac kernels, beginning with the February 2002 release of 2.4.18-pre9-ac4. Alan's patches for the 2.4.x series are available from You also can download a 2.4 kernel source tree and add the JFS patches to this tree. JFS comes as a patch for several of the 2.4.x kernels, so get the latest kernel from

At the time of this writing, the latest kernel is 2.4.18 and the latest release of JFS is 1.0.20. We use them in the following section. The JFS patch is available from the JFS web site. You also need both the utilities (jfsutils-1.0.20.tar.gz) and the filesystem (jfs-2.4.18-patch and jfs-2.4-1.0.20.tar.gz) patches. Several Linux distributions are already shipping JFS: Turbolinux, Mandrake, SuSE, Red Hat and Slackware all ship JFS in their latest releases.

Patching the Kernel to Support JFS

If you use any of the previously named distributions, you do not need to patch the kernel for the JFS code. You need only to compile the kernel to support JFS (either as built-in or as a module).

First, download the standard Linux kernel. If you have a /usr/src/linux directory, move it, so it won't replaced by the linux-2.4.18 source tree. After you download the kernel, named linux-2.4.18.tar.gz, save it under /usr/src and untar it. This operation will create a new /usr/src/linux directory.

The next step is to get the JFS utilities and the appropriate patch for kernel 2.4.18. Create a directory for JFS source, /usr/src/jfs1020, and download to that directory the JFS kernel patch, the jfs-2.4-18-patch and the JFS patches, jfs-2.4-1.0.20.tar.gz. At this point, you have all the files needed to patch the kernel.

Next, change to the directory of the kernel 2.4.18 source tree to apply the JFS kernel patch:

% cd /usr/src/linux
% patch -p1 < /usr/src/jfs1020/jfs-2.4-18-patch
% cp /usr/src/jfs1020/jfs-2.4-1.0.20.tar.gz .
% tar zxvf jfs-2.4-1.0.20.tar.gz

Configure the kernel and enable JFS by going to the Filesystems section of the configuration menu and enabling JFS support, CONFIG_JFS_FS=y. You also have the option to configure JFS as a module. In this case you need only to recompile and re-install kernel modules:

% make modules && make install_modules
Otherwise, if you configured the JFS option as kernel built-in, you need to recompile the kernel (in /usr/src/linux):
% make dep && make clean && make bzImage
Then, recompile and install modules (only if you added other options as modules):
% make modules && make modules_install
Finally, install the new kernel:
% cp arch/i386/boot/bzImage /boot/bzImage-jfs
% cp /boot/
% ln -s /boot/ /boot/
Don't forget to run lilo. (If you have never recompiled the kernel, read the Kernel-HOWTO to learn how.)

After you compile and install the kernel, you should compile and install the JFS utilities. Save the jfsutils-1.0.20.tar.gz file into /usr/src/jfs1020 and then:

% tar zxvf jfsutils-1.0.20.tar.gz
% cd jfsutils-1.0.20
% ./configure
% make && make install

Having built and installed the JFS utilities, the next step is to create a JFS partition. In the following example, we use a spare partition; the next section will demonstrate how to migrate an existing partition into JFS.

If there is unpartitioned space on the disk, you can create a partition using fdisk. In our test system, we had /dev/hdb3 as a spare partition, so we formatted it as a JFS partition. After the partition is created, reboot the system to make sure the new partition is able to create the JFS.

To create the JFS, apply the following command:

% mkfs.jfs /dev/hdb3

After the filesystem has been created, you need to mount it. To get a mount point, create a new empty directory, such as /mnt/jfs, and use the following mount command:

% mount -t jfs /dev/hdb3 /mnt/jfs
When the filesystem is mounted, you are ready to try out JFS.

To unmount JFS, simply use the umount command with the same mount point as before:

% umount /mnt/jfs

White Paper
Linux Management with Red Hat Satellite: Measuring Business Impact and ROI

Linux has become a key foundation for supporting today's rapidly growing IT environments. Linux is being used to deploy business applications and databases, trading on its reputation as a low-cost operating environment. For many IT organizations, Linux is a mainstay for deploying Web servers and has evolved from handling basic file, print, and utility workloads to running mission-critical applications and databases, physically, virtually, and in the cloud. As Linux grows in importance in terms of value to the business, managing Linux environments to high standards of service quality — availability, security, and performance — becomes an essential requirement for business success.

Learn More

Sponsored by Red Hat

White Paper
Private PaaS for the Agile Enterprise

If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.

Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.

Learn More

Sponsored by ActiveState