Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 06-06-2003, 04:07 PM   #1
Registered: Feb 2003
Location: Hawaii
Distribution: Debian
Posts: 130

Rep: Reputation: 16
Question how do I make a cluster?


how do I make my two machines (both with different hardware) run RedHat 9 like one big powerful machine? Somebody recommended MSC.Linux to make my clustering experience less painful. --any thoughts on that one?

I guess I'm looking for a quick and dirty solution, a HOWTO type of thing on Beowulf or some other type of clustering solution using RedHat 9.

Thanks, Randomx
Old 06-06-2003, 04:11 PM   #2
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975
well if you want a kinda cluster kinda HOWTO, how about the cluster HOWTO at
Old 06-09-2003, 07:26 PM   #3
Senior Member
Registered: Feb 2003
Location: N'rn WI -- USA
Distribution: Kubuntu 8.04, ClarkConnect 4
Posts: 1,142

Rep: Reputation: 47
As a_k pointed out, there's HOW-TOs at TLDP. Another good site to check out is << >>.

Putting a network together and running software isn't too hard. Unfortunately, unless you are a good programmer, there's not going to be much you can do with a home cluster. Programs have to be specially written to take advantage of multiple processors in a single computer. Imagine how much more it takes to write a program to take advantage of several computers.

For example, let's look at SETI@home. It's a program that can take several hours to several days to compute the results from one work unit. If you could split it up to two computers, it would take a bit more than half the time, because you have to spend a little time assembling the two results at the end. If you have two identical computers clustered, and it takes one 8 hours to compute a result, it could 4.01 hours to compute the same result. In 8.02 hours, you could have two results. But, if you just had the two separate computers each computing separate results, then you would have two results in 8 hours. Maybe even less than 8, if one gets an easier work unit... If you split a work unit in half, and one half is easier, the one computer will be sitting idle while the other computer finishes so they can return one complete result. Otherwise, the cluster nodes would need to be constantly comparing cpu-load and re-splitting the work unit to even it out, and waste even more time.

If you are looking at it as a project, by all means, have at it. But, a cluster of computers isn't going to be a single super-computer for day-to-day programs.

The OpenMosix cluster is a simple cluster... The nodes compare cpu-loads and suffle processes around to the best computer. It doesn't split a single process up, it just finds the computer best able to handle it.
Old 06-09-2003, 08:31 PM   #4
Senior Member
Registered: Feb 2003
Location: N'rn WI -- USA
Distribution: Kubuntu 8.04, ClarkConnect 4
Posts: 1,142

Rep: Reputation: 47
<< >> might be a simple solution.
Old 10-23-2003, 06:06 PM   #5
Registered: Feb 2003
Location: Hawaii
Distribution: Debian
Posts: 130

Original Poster
Rep: Reputation: 16
Cool got it.

hey you guys, I finally got my cluster to work.

Here's what I did. Reply if you get stuck somewhere.
I got inputs here and there, nothing really helped me so I decided to do it on my own HOWTO using MOSIX to setup my cluster.

Mosix Linux Clustering

1. Two computes running any linux distribution. I'm using Red Hat 9.0.
2. A crossover cable or a regular CAT-5 network cable if using a hub-switch.
3. Go to hxxp:// and get latest Mosix Kernel and User Tool files. In my situation, I downloaded MOSKRN-1.10.1.tar.gz and MOSIX-1.10.1.tar.gz. Please note that those two files work only on kernel-2.4.22. Mosix does not archive old distributions -as soon as a new kernel comes up, they upgrade both MOSKRN kernel patch file and MOSIX user tools file.
4. Get kernel-2.4.22 (or whatever Mosix has patches for) from hxxp://

1. Turn on linux computers . All configuration steps will done as root except the testings.

2. Since I'm using a crossover cable, I will assign to node1 (computer 1) and to node2 (computer 2).

3. edit /etc/hosts file and add the following entry on computer 1.
Code:                 localhost.localdomain   locahost                node1                      localhost
4. edit /etc/hosts file and add the following entry on computer 2.
Code:                 localhost.localdomain   locahost                node2                       localhost
REPEAT STEPS 5 to 24 on both machines before you start the testings

5. Type #neat and input there the IP address you picked for your machine. Subtnet Mask: Gateway address: I put the other machine's IP address. So if I'm working on computer1 I typed If working on computer 2, I typed

6. Put MOSKRN-1.10.1.tar.gz, MOSIX-1.10.1.tar.gz, and Kernel-2.4.22.tar.bzip2 in /usr/src directory.

7. #cd /usr/src

8. Untar MOSKRN-1.10.1.tar.gz and MOSIX-1.10.1.tar.gz.
#tar xvzpf MOSKRN-1.10.1.tar.gz
#tar xvzpf MOSIX-1.10.1.tar.gz

9. #cd /usr/src/MOSKRN-1.10.1

10. # ./mosix-install

11. A wizard will start.
a)"Specify the [unpacked] kernel path: " /usr/src/kernel-2.4.22.tar.bzip2
b)"add to grub?" Y
c) "Create symbolic links?" Y
d) " tools installation?" press enter for all
e) Create MFS mount point? Y
f) User for favorite kernel configuration method. Type here whatever config method you want . [I personally prefer xconfig]

The xconfig window will pop up.

On the top left, you will see MOSIX. Click there and select the following options.

Y[*]    M[ ]   N [ ]     MOSIX process migration support.  [required]
Y [ ]    M[ ]   N[*]     Support clusters with a complex network topology.
Y [ ]    M[ ]   N[*]     MOSIX kernel debugger off.
Y[*]    M[ ]   N [ ]     Mosix Kernel diagnostics.
Y[*]    M[ ]   N [ ]     Direct File-System Access.
Y[*]    M[ ]   N [ ]     Stricter security on MOSIX options.
Y [ ]    M[ ]   N[*]      Create kernel with -mosix extension
Y[*]    M[ ]   N [ ]     MOSIX file system
Y [ ]    M[ ]   N[*]    Poll/Select exceptions on pipes.
Then click OK and move on to other sections such as "network device support" subsection "ethernet (10 or 100 Mbit)", find your network card and select "Y" to load the modules to the kernel at boot time.

When you are all done click on "Save and Exit". A window saying next you need to do 'make dep'. Ignore the message and click OK. We are not doing a manual kernel compilation. ./mosix-install command is doing it for us.

In case you missed it on the kernel config file set up, the wizard might ask you to add ext3 support for the kernel. Say "Y" to that one.

You can also select "Y" when the installation asks you if you want to watch what's going on. I always do that just in case I spot some errors.

At this point you should see a message that says "Kernel compilation will start...."

When the process is all done you will see a message that says the everything is

12. # cd /usr/src/kernel-2.4.22

13. # make install

14. #vi /etc/grub.conf

You will see something like

title **node1 kernel 2.4.22**
        root (hd0,0)
        kernel /vmlinuz-2.4.22 ro root=LABEL=/ hdb=ide-scsi
        initrd /initrd-2.4.22.img
#title Red Hat Linux (2.4.20-8)
#       root (hd0,0)
#       kernel /vmlinuz-2.4.20-8 ro root=LABEL=/ hdb=ide-scsi
#       initrd /initrd-2.4.20-8.img
NOTE: on the line "kernel /vmlinuz-2.4.22 ro root=LABEL=/ hdb=ide-scsi"

get rid of the part that says "ro root=LABEL=/". Or just specify the right path to the kernel image. If you leave it like that, you will get a kernel panic error at boot time. If you don't believe me, try it and fix it later if you want.

15. #reboot [don't forget to select **node1 kernel 2.4.22** or change /etc/grub.conf "default=0" instead of "default=1".

16. When the kernel boots up, you will see the message:
"You have no MOSIX configuration -please edit your now: Editor to use [q to quit] -vi
type vi and add the following entry to the /etc/

1     1
2     1
First column indicates the node number. Right next to it, is the IP address you
assigned to it. "1" at the end is the 'span' argument. Since we are setting up a small cluster, just type "1".

Note that /etc/ file should look exactly the same, with the same entries and everything, ON EACH NODE OF YOUR CLUSTER. Do not forget about that one.

After you are done editing that file, the boot process will continue normally.
You can make any modifications to /etc/ after your computer boots up, but make sure to make those same changes on every /etc/ that's going to
be on every node.

17. vi /etc/rc.d/rc.local [your distro might have a different "start up" file. ]
Add the following line:

/sbin/setpe -W -f /etc/ touch /var/lock/subsys/mosix
18. # cd /

19. #mkdir cluster [or whatever name you prefer]

20. vi /etc/fstab and change the "/mfs" line to specify a mount point

cluster         /mfs            mfs             dfsa=1          0 0
21. # reboot

22. #/sbin/service mosix start

23. #/sbin/chkconfig mosix on [select all runlevels if you want to]

24. To shut down a node in the cluster, make sure you create a shell script or something, with the following code. Execute it before you bring the node down:

echo 0 > /proc/mosix/admin/mospe rm -f /var/locl/subsys/mosix umount /mfs

That line of commands remove the node from the cluster and unmounts the /mfs filesystem. Some distributions don't understand that MFS is a network file system
and will try to unmount at the wrong time.


1. type #mod on any node. You will see a graph bar type of indicating what process have been migrated to the other node in the cluster.

2. Open two or three consoles and type:

awk 'BEGIN {for(i=0;i<100000;i++) for (j=0;j<100000;j++);}'

3. Go back to the console where you typed #mon

You are going to be witnessing your own cluster in action. Migrating processes to each other and everything.


Old 01-05-2004, 06:51 PM   #6
Registered: Dec 2003
Distribution: Mandrake, Red Hat, Gentoo, Fedora, ClusterKnoppix, Scyld Beowulf
Posts: 52

Rep: Reputation: 15
Linux Central has a Scyld Beowuld CD for sale for only a few bucks. It's an excellent start for anyone interested in Beowulf clustering. I set up a 13-node cluster using this software in minutes.
Old 01-23-2004, 06:06 AM   #7
LQ Newbie
Registered: Jan 2004
Posts: 2

Rep: Reputation: 0
Re: got it.


Last edited by chakk_lo; 02-02-2005 at 10:52 PM.
Old 01-26-2004, 12:16 AM   #8
LQ Newbie
Registered: Jan 2004
Posts: 2

Rep: Reputation: 0
no one replied
Old 06-07-2004, 08:51 PM   #9
Registered: May 2004
Location: Singapore
Posts: 30

Rep: Reputation: 15

I kinda have the same problem as chakk_lo. After setting up my cluster (which consisted of only two PCs), My frontend doesn't show my compute node being added. I'm using BioBrew which is derived from ROCKS. How can I check if they are successfully connected? And if thy are not, does anyone knows why?
Old 06-08-2004, 01:23 AM   #10
Registered: May 2004
Location: Singapore
Posts: 30

Rep: Reputation: 15

One more stupid question. Does compute nodes have xwindows?
Old 07-29-2004, 06:00 PM   #11
Registered: Aug 2003
Location: france
Distribution: suse/fedora
Posts: 105

Rep: Reputation: 15
if you want to know if your network works, then use ping from one host to another, ie if your file /etc/ says:

1 fred 1
2 eric 1

then type 'ping fred' from eric, and conversly type 'ping eric' from fred
both will tell you if you have a route to the other.

mosix didn't work for me until I had run 'setpe' on both machines, and setpe needs lots of perl extensions to work.
I have not verified timings for mosix, but it does not seem to be an instant solution, even if processes DO migrate after a while.

if you ever write a unix application use 'fork()' and let the children do dome work, a monolthic program cannot take advantage of mosix. some programs (staroffice?) can, the thing to do is zgrep the source packages for 'fork(' and try to use those for clusters.

I have spent a while trying to get mosix to work because I think it is elegant but I have not noticed any real speed advantage, even when one of the other nodes is a much faster machine with a good network card on both ends. still I try from time to time as I think mosix is the futre.

good luck,

Old 09-14-2004, 06:42 PM   #12
Registered: Mar 2004
Location: Berlinsville
Distribution: Slackware/Fedora
Posts: 103

Rep: Reputation: 15
I found that openMosix is very easy to install, and if you have a Redhat Distro you can use the RPM to get it done in like five minutes. MOSIX didn't work to well for me, that's why I used openMosix.
Old 11-01-2004, 12:56 AM   #13
LQ Newbie
Registered: Oct 2004
Posts: 2

Rep: Reputation: 0
Here i setup LAM-MPI based cluster. It able to run programs written in C. But my actual need is to write something in Perl or Python. I tried Parallel::MPI::Simple in perl but it is not running, i think it is not properly installed. but Make process doesn't show any error. Same with the Python. Make process is success full but when try some sripts it says cannpt import 'mpi'. is there anyone worked on these before.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cluster question: Is it possible to make a bulletproof cluster? ValidiusMaximus Linux - Software 1 09-06-2005 03:07 PM
Setting up a cluster with pxe and cluster knoppix bucovaina78 Linux - Networking 1 05-16-2005 12:29 AM
How to make an account across different nodes in a cluster muneebs123 Linux - Networking 2 08-26-2004 05:39 PM
what do i need to make a cluster with Slackware 9? Athlon_Jedi Linux - Networking 3 12-02-2003 09:39 PM
how do i make a cluster? funkymunky Linux - Software 1 10-03-2003 03:38 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:30 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration