|
Building A Diskless Folding @ Home Farm
Project: Folding @ Home
Date Written: November 25, 2002
Written By: Jason Rabel
Setting Up IP Masquerading:
IP Masquerading will essentially forward the packets from your farm network to your home network and out to the Internet, and vice versa. I found a sample config
file to run on the server. The only thing to check really is to make sure
the files are pointing to the proper directories and eth0 & eth1 are set for
the proper sides of your network. I then saved this file as /etc/rc.d/rc.firewall
on the farm server. Depending on your distro there are different ways to start
this file, the easiest for redhat is to add the line to add a line to execute it in your /etc/rc.d/rc.local file.
After setting up the IP Masquerading you can now setup clients
and hopefully they will work right!
Setting Up The Clients:
Setting up each client is very easy. The hardest part is you
will need to find out the MAC address of the NIC to put in the dhcp.conf file, which I already talked about how to do that earlier.
The Intel NICs & some onboard NICs use PXE to boot, which keeps things nice and simple. I did run into one problem with my Intel NICs not wanting to boot at first, but I discovered it was because they had a really old version of the PXE firmware on them, you can snag a program from Intel that will let you flash the firmware to the latest version.
Since most non-Intel NICs don't have boot ROMs on them, I took the easy
way out and created a floppy that has the boot ROM code. I looked around the Internet and to
get a burned eprom costs about $15, however you can get a floppy drive for less,
it's your call on which you really want. If
you want to purchase the ROMs, a couple places I have found is DisklessWorkstations.com
& Linux Central,
if anyone knows of other sources please let me know and I can add them to this page.
Anyhow, if you go to the ROM-o-matic website,
you can generate and download the code to copy to a floppy for your NIC to boot from. I have a mixture of
all sorts of NICs, PCI & onboard, and they were all just as easy to setup & boot. The hardest part
when adding another client is remembering to add on their configuration data to the different files &
creating the folding directory.
So once you have your files configured (and be sure to restart
the relevant services), you can boot up your client. I like to have a video card
in the system the first time so I can see what is going on. If all goes well you should see it download the proper files over the network and start booting like a regular linux machine. Within a minute or so you should be at a shell prompt on the client machine, which you can then enter the usual set of linux commands to do stuff. I usually just do a quick "ps aux" to see what is running, and you should see the F@H client running somewhere in the list.
Additionally you can
check the server's /var/log/messages file for debugging. Another file that I
mentioned before is the /fah/ws00x/FAHlog.txt file which outputs what you would
usually see on the screen to a file.
Are We Done?!?!:
That's pretty much it in a nutshell. It really isn't that complicated if you take it one step at a time. Once you get a single client running, adding more clients is a trivial matter. Be sure to restart the DHCP & NFS server after you edit the configuration files.
You can check out the LTSP site for more info if you would like to run more than just F@H on the workstations, since LTSP was originally created for making terminal servers. You can run X-Windows sessions quite nicely I've heard. Also there is a LTSP-MOSIX project, which adding on MOSIX gives you some nice clustering ability should you need it for special projects.
You don't have to run F@H on your farm, you could just as easily run any of the other many popular distributed projects, as long as they support a Linux client. You could even segment off your farm to have part of them run one project, and another part run another, simply create another script in the /opt/ltsp/i386/etc/rc.d/ directory, and use that different script in the RCFILE line in the /opt/ltsp/i386/etc/lts.conf file.
As promised, you can download the file folding_farm.zip which has all of the configuration files I used in this article, they might come in handy.
Also since some people requested it, you can also download this entire how-to in .PDF format (much easier to print): FAH_Diskless_Farm.pdf (116 Kb).
Questions / Comments?:
Any feedback or questions are welcome, you can contact me directly or you can post a question about it in the distributed computing section on The EXTREME Overclocking Forum.
Now with all the money you save from not having to buy hard drives or video cards you can purchase more CPUs!
|