Starting Up Your Cluster
Okay, so now you've got a couple of machines with openMosix installed and booted, it's time to understand how to add systems to your cluster and make them work together.
OpenMosix has two ways of doing this:
1. Auto-discovery of cluster nodes
OpenMosix includes a daemon called 'omdiscd' which identifies other openMosix nodes on the network by using multicast packets (for more on multicasting, please see our multicast section). This means that you don't have to bother manually configuring the nodes. This is a simple way to get your cluster going as you just need to boot a machine and ensure it's on the network. When this stage is complete, it should then discover the existing cluster and add itself automatically!
Make sure you set up your network properly. As an example, if you are assigning an IP address of 192.168.1.10 to your first ethernet interface and your default gateway is 192.168.1.1 you would do something like this:
ifconfig eth0 192.168.1.1 netmask 255.255.255.0 broadcast 192.168.1.255 up (configure's your system's ethernet interface)
route add default gw 192.168.1.1 (adds the default gateway)
The auto-discovery daemon might have started automatically on bootup, check using:
ps aux | grep 'omdiscd'
The above command should reveal the 'omdiscd' process running on your system.
If it hasn't, you can manually start by typing 'omdiscd'. If you want to see the nodes getting added, you can choose to run omdiscd in the foreground by typing 'omdiscd -n'. This will help you troubleshoot the auto-discovery.
2. /etc/openmosix.map file configuration
If you don't want to use autodiscovery, you can manually manage your nodes using the openmosix.map file in the /etc directory. This file basically contains a list of the nodes on your cluster, and has to be the same across all the nodes in your cluster.
The syntax is very simple, it is a tab delimited list of the nodes in your cluster. There are 3 fields:
Node ID, IP Address and Number.
Node ID is the unique number for the node.
IP address is the IP address of the node.
Number specifies how many nodes in the range after the IP.
As an example, if you have nodes
your file would look like this:
1 192.168.1.10 2
2 192.168.1.50 1
We could have manually specified the IP's 192.168.1.11 and 192.168.1.12, but by using the 'number' field, openmosix counts up the last octet of the IP, and saves you the trouble of making individual entries.
Once you've done your configuration, you can control openMosix using the init.d script that should have been installed. If they were not, you can find it in the scripts directory of the userland tools you downloaded, make it executable and copy it to the init.d directory like this:
mv ./openmosix /etc/init.d
chmod 755 /etc/init.d/openmosix
You can now start, stop and restart openMosix with the following commands:
Next up we'll take a look on how you can test your new cluster!
Next: Testing Your Cluster