LTSP+OpenMosix: A Mini How-To


What is this?

This document will provide details (via an example set-up) of combining the OpenMosix clustering system with the K12LTSP 2.0 distribution, an innovative GNU/Linux distribution based on RedHat 7.2 & LTSP 3.0 (a set of Open Source software packages from the Linux Terminal Server Project that makes it all happen). OpenMosix (http://openmosix.sourceforge.net/) is a completely Open Source fork of the MOSIX cluster system found at http://www.mosix.com.

OpenMosix, like the original MOSIX, is a clustering system that in the most basic of terms combines the cpu resources of the client systems into what could be compared to an SMP processing system. Processes get "moved" through load balancing to the the nodes (Linux Terminal Client computers) in the cluster that can be most effective in running them. Fully automated. No special programming required as in other clustering systems. The hope or theory is that since the K12LTSP client is simply executing XWindows and nothing more that OpenMosix can be implemented to utilize the idle processor cycles on these clients to maximize the efficiency of the entire system--relieving some of the stress that the server is under.

This document could be considered an addendum to Richard Camps very useful How-To, "Mosix Cluster with Diskless Nodes", which detailed adding MOSIX clustering functionality to an installation of the K12LTSP 2.0 distribution. (Without his article I would still be fighting to get this stuff working!). However, it should be noted that I alone am responsible for this particular document and all of the mistakes in it are mine! :-)

Mandatory Disclaimer: This article is provided as an example of how I got this working on my test setup. It is not the final word on the subject and it should be noted--use this information at your own risk. No warranty or gaurentee is expressed or implied. I am not responsible for any damage resulting from your implementation of this information. Again, use this How-To at your own risk.

Having said that, let's get going!

Why OpenMosix instead of the original MOSIX?

  1. As I stated previously, Richard Camp posted an excellent How-To on installing the original MOSIX system with the K12LTSP 2.0.x distribution. It pointed me in the right direction and I'm truly grateful for his efforts. Without which, who knows if I'd have ever gotten anywhere with the concept of combining LTSP & MOSIX. Unfortunately in my case, the MOSIX install script that came from the MOSIX download always failed when the 2.4.17 kernel compile would throw errors during the modules_install phase. MOSIX simply would not patch & install automatically with the installation script. I began investigating a manual MOSIX kernel patch & userland tools installation and came across the OpenMosix project in the process. I found OpenMosix very simple to implement.

  2. MOSIX is either no longer Open Source or it's status as Open Source software is uncertain at this time. The copyright to MOSIX materials is currently held by Amnon Barak.

    I don't have all of the details of MOSIX's current licensing status and I did not find any statement regarding the issue on the MOSIX site but you may wish to review the following for more information on the matter--

    About OpenMosix Page:
    http://openmosix.sourceforge.net/about.html

    Interview with Moshe Bar (founder of OpenMosix & a former project manager for MOSIX):
    http://foundries.sourceforge.net/clusters/index.pl?node_id=41457&lastnode_id=131

    The OpenMosix FAQ:
    http://openmosix.sourceforge.net/faq.html

The uncertainity surrounding MOSIX licensing and the ease of installation makes OpenMosix the ideal alternative for our purposes.

MOSIX Installation background Information, do not proceed without it!!!

Please! Do yourself a favor, obtain, study, and digest Richard Camps original MOSIX+LTSP How-To "Mosix Cluster with Diskless Nodes". As stated previously, this document should be considered an addendum to that article. Richard's How-To contains much information that will not be covered here but will prove useful in getting your OpenMosix cluster running.

You can find his original article at http://www.k12os.org/print.php?sid=14

And, without further ado, away we go...

My Test Set-up used in this example:

Hardware:
        Server:
        Pentium II w/ 6GB IDE drive, 96MB RAM, Intel 10/100 NIC. K12LTSP 2.0 installed.
        Clients:
        Various systems, booting from floppy: 486, Pentium, Pentium MMX, Pentium II.
        3com 10Mbit or Intel 10/100Mbit NICs. 16-64MB RAM
        Network:
        Simple 4-port 10baseT hub. (How's that for bandwidth? ;-)

Nothing spectacular here just an odd assortment of stuff, but it's been a useful test setup for me. And, even more importantly, it actually works! :-)

Software:
K12LTSP 2.0.x Distribution:
http://k12ltsp.org/download.html

OpenMosix:
http://openmosix.sourceforge.net/

OpenMosix Files:
http://sourceforge.net/project/showfiles.php?group_id=46729


Files needed in this example (Note: this example employs the latest openmosix software at this writing, openmosix5. Obtain the following OpenMosix files from SourceForge):

  1. The K12LTSP 2.0 Distribution set
  2. openmosix-kernel-2.4.16-openmosix5.i686.rpm (Server Kernel)
  3. openmosix-tools-0.1.3-6.i386.rpm (Userland Tools for OpenMosix)
  4. openmosix-kernel-2.4.16-openmosix5.src.rpm (Source files for Client Kernel)

    OR (instead of the openmosix-kernel-2.4.16-openmosix5.src.rpm)

  5. openMosix2.4.16-4.gz (Patch for Kernel 2.4.16 if not using the above source rpm)
  6. Kernel 2.4.16 from The Linux Kernel Archives (if not using the above source rpm)

The step-by-step:

(Note: items following the ">" are command line items you need to run.)

  1. Download the OpenMosix kernel "openmosix-kernel-2.4.16-openmosix5.i686.rpm"
  2. Install this kernel to the server via the command: > rpm -ivh openmosix-kernel-2.4.16-openmosix5.i686.rpm. This adds the kernel to the grub bootloader as well, or a link "vmlinuz-openmosix" that can be used for lilo (just add it to lilo.conf).
  3. Download & install the Userland tools "openmosix-tools-0.1.3-6.i386.rpm" via the command: > rpm -ivh openmosix-tools-0.1.3-6.i386.rpm
  4. Download & install the OpenMosix kernel source "openmosix-kernel-2.4.16-openmosix5.src.rpm" via the command: > rpm -ivh openmosix-kernel-2.4.16-openmosix5.src.rpm
    OR
  5. Download "openMosix2.4.16-4.gz" and a copy of kernel-2.4.16.tar.bz2 from The Linux Kernel Archives
  6. > cp /your-download-folder/kernel-2.4.16.tar.bz2 /usr/src
    or, if you installed the openmosix-kernel-2.4.16-openmosix5.src.rpm then run:
    > cp /usr/src/redhat/SOURCES/kernel-2.4.16.tar.bz2 /usr/src/
  7. > cd /usr/src
  8. > tar xjvf kernel-2.4.16.tar.bz2
  9. > mv /usr/src/linux /usr/src/linux-2.4.16-om5
  10. > cd /usr/src/linux-2.4.16-om5
  11. > mcedit /usr/src/linux-2.4.16-om5/Makefile
  12. Set "EXTRAVERSION = -om5" (without the quotation marks)
  13. F10 to save & quit.
  14. > cp/your-download-folder/openMosix2.4.16-4.gz /usr/src/linux-2.4.16-om-5/
    or, if you installed the openmosix-kernel-2.4.16-openmosix5.src.rpm then run:
    > cp /usr/src/redhat/SOURCES/openMosix2.4.16-4.gz /usr/src/linux-2.4.16-om5/
  15. > gunzip /usr/src/linux-2.4.16-om5/openMosix2.4.16-4.gz
  16. > patch -Np1 < openMosix2.4.16-4
  17. > make mrproper
  18. > cp /opt/ltsp/kernel-configs/config.2.4.9-ltsp-5 /usr/src/linux-2.4.16-om5/.config
  19. > make oldconfig (or menuconfig if you prefer)
  20. Enable the OpenMosix options
    a)Yes to process migration support, Kernel Diagnostics, Direct File-System Access, OpenMosix File-System.
    b) No to Kernel Debugger.
    c) Defaults for remaining items.
  21. > make dep
  22. > make bzImage
  23. > make modules
  24. > make modules_install
  25. > cp -R /lib/modules/2.4.16-om5 /opt/ltsp/i386/lib/modules/
  26. > cd /usr/src/ltsp_initrd_kit
  27. > mcedit buildk
  28. Scroll to the bottom and comment out the "prepare_kernel" lines with a preceeding "#" (without the quotation marks)
  29. Add the following line "prepare_kernel /usr/src/linux-2.4.16-om5 2.4.16-om5" (without quotation marks)
  30. F10 to save & quit
  31. > ./buildk
  32. > cd /tftpboot/lts/
  33. > ls
  34. Your new OpenMosix client kernel should appear as "vmlinuz-2.4.16-om5"
  35. If you wish, create a symbolic link to the OpenMosix kernel for easier upgrading in the future (you won't have to edit the client filename line in dhcpd.conf later)
  36. > ln -s vmlinuz-2.4.16-om5 vmlinuz-openmosix
  37. > cd /etc
  38. > mcedit dhcpd.conf
  39. Edit the "filename..." line using one of the two lines below depending on whether or not you created the symbolic link:
             a) filename "/lts/vmlinuz-openmosix";
             b) filename "/lts/vmlinuz-2.4.16-om5";
  40. F10 to save & exit
  41. > service dhcpd restart
  42. Copy & edit other files as indicated in Richard's How-To "Mosix Cluster with Diskless Nodes". Specifically, we are concerned with the following:
  43. Create the mosix.map file (the same exact file needs to be located in /etc and /opt/ltsp/i386/etc/)
  44. Add the line to /etc/dhcpd.conf as Richard indicated: option host-name = concat( "ws" , binary-to-ascii( 10, 8, "", substring( reverse( 1, leased-address), 0, 1)));
  45. You shouldn't have to worry about editing for grub, the Server Kernel RPM will take care of that.
  46. Copy the user tools as indicated in Richard's How-To.
  47. In other words, you should basically follow everything below the line: "Everything worked! GREAT! The hard part is over. Now we just edit and copy a few files [:)]" in Richard's How-To
  48. Once completed, and you verify that everything boots as it should, use the command mon to check your work, hopefully you will see all of your OpenMosix nodes in action!

Well, that's about it. I hope that this was helpful and useful. If it becomes necessary to add the items from Richard's How-To for clarification, I will seek his permission and we'll go from there.

Thanks, and happy clustering!

James Jensen
jmsjnsn@nojunkmailplease.linuxfreemail.com

Rev. 1.2