Building An openMosix Cluster
Okay, let's get down to the fun part! Although it may sound hard, setting up a cluster is not very difficult, we're going to show you the hard way (which will teach you more) as well as a very neat quick way to set up an instant cluster using a Knoppix Live CD. We suggest you try both out to understand the benefits of each approach.
We will require the following:
1. Two or more machines (we need to cluster something!), the configuration doesn't matter even if they are lower end. They will require network cards and need to be connected to each other over a network. Obviously, the more systems you have, the more powerful your cluster will be. Don't worry if you don't have many machines, we'll show you how to temporarily use resources from systems and schedule when they can contribute their processing power (this works very well in an office when you might want some systems to join the cluster only after office hours).2. A Cluster Knoppix LiveCD for the second part of this tutorial. While this is not strictly necessary, we want to show you some of the advantages of using the LiveCD for clustering. It also makes setting up the cluster extremely easy. You can get a fully working cluster up in the amount of time it takes you to boot a system ! You can get Cluster Knoppix from the following link: http://bofh.be/clusterknoppix/
Getting & Installing openMosix
OpenMosix consists of two parts, the first is the kernel patch which does the actual clustering and the second is the userland tools that allow you to monitor and control your cluster.
There are a variety of ways to install openMosix, we've chosen to show three of them:
1. Patching the kernel and installing from the source
2. Installing from RPM's
3. Installing in Debian
1. Installing from source
The latest version of openMosix at the time of this writing works with the kernel version 2.4.24. If you want to do this the proper way, get the plain kernel sources for 2.4.24 from http://www.kernel.org and the openMosix patch for the same version of the kernel from http://openmosix.sourceforge.net.
At the time of writing this, the direct kernel source link is
Once you've got the kernel sources, unpack them to your kernel source directory, in this case that should be:
Now move the openMosix patch to the kernel source directory and apply it, like so:
mv /root/openMosix-2.4.24.gz /usr/src/linux-2.4.24
zcat openMosix-2.4.24.gz | patch -Np1
NOTE: If you downloaded a bzip zipped file, you might need to use 'bzcat' rather than 'zcat' in the last line.
Now your kernel sources are patched with openMosix.
Now you have to configure your kernel sources, using one of the following commands:
make menuconfig (uses an ncurses interface)
make xconfig (uses a TCL/TK GUI interface)
If you use X and have a recent distribution, 'make xconfig' is your best bet. Once you get the kernel configuration screens, enable the following openMosix options in the kernel configuration:
# CONFIG_MOSIX_TOPOLOGY is not set
# CONFIG_MOSIX_DEBUG is not set
# CONFIG_MOSIX_CHEAT_MIGSELF is not set
Feel free to tweak your other kernel settings based on your hardware and requirements just as you would when installing a new kernel.
Finally, finish it all off by compiling the kernel with:
make dep bzImage modules modules_install
Now install your new kernel in your bootloader. For example, if you use LILO, edit your /etc/lilo.conf and create a new entry for your openMosix enhanced kernel. If you simply copy the entry for your regular kernel and change the kernel image to point to your new kernel, this should be enough. Don't forget to run 'lilo' when you finish editing the file.
After you have completed this, reboot, and if all went well, you should be able to select the openMosix kernel you just installed and boot with it. If something didn't work right, you can still select your regular kernel and boot normally to troubleshoot.
2. Installing from RPM
If you have an RPM based distribution, you can directly get a pre-compiled kernel image with openMosix enabled from the openMosix site (http://openmosix.sourceforge.net).
This is a fairly easy way to install openMosix as you just need to install 2 RPMs. This should work with Red Hat, SUSE etc. Get the two latest RPMs for the
Now you can simply install both of these by using the command:
rpm -Uvh openmosix*.rpm
If you are using GRUB, the RPM's will even make the entry in your GRUB config so you can just reboot and select the new kernel. If you use LILO you will have to manually make the entry in /etc/lilo.conf. Simply copying the entry for your regular kernel and changing the kernel image to point to your new kernel should be enough. Don't forget to run 'lilo' when you finish editing the file.
That should be all you need to do for the RPM based installation. Just reboot and choose the openMosix kernel when you are given the choice.
3. Installing in Debian
You can install the RPM's in Debian as well as using Alien, but it is better to use apt-get to install the kernel sources and openmosix kernel patch. You can also use the 'apt-get' command to install openmosixview, which will give you a GUI to manage the cluster.
This is the basic procedure needed to follow for installing openMosix under Debian.
First, get the packages:
apt-get install kernel-source-2.4.24 kernel-package \
Untar them and create the links:
tar vxjf kernel-source-2.4.24.tar.bz2
ln -s /usr/src/kernel-source-2.4.24 /usr/src/linux
Apply the patch:
Install the kernel:
make-kpkg kernel_image modules_image
dpkg -i kernel-image-*-openmosix-*.deb
After this you can use 'apt-get' to install the openmosixview GUI utility for managing your cluster using the following command:
apt-get install openmosixview
Assuming you've successfully installed ClusterKnoppix, your ready to start using it - which also happens to be the topic of the next section!
Next: Using ClusterKnoppix