Xubuntu and NFS
HOW-TO ARTICLE written by STAFF
Page 1 of 5 RETURN TO DIRECTORY BACK | NEXT
Overview...
With most of my DC crunchers now running Xubuntu Linux, I needed limited access to network resources in order to be able to move files around on the Linux machines on the network. This article will discuss setting up a NFS fileserver and allowing the other Linux machines to use some shared directories on the fileserver. Keep in mind, this is going to work only for the Linux machines, not the Windows machines on the network. For that, we need to use samba which we'll cover in another article.
The scope of this article is fairly narrow, in that our needs are rather specific. This will allow one of the machines to act as a fileserver, hosting directories which we can access with the dedicated crunchers on the network. Of course, you could set them all up to act as fileservers, if you needed. I simply needed one of the machines, which is in a 30-inch tall whitebox server case with multiple hard drives, an internal Zip 100 drive, floppy drive and CD-RW drive to act as a location on the network for me to pull files needed by the dedicated crunchers, which run headless and are controlled by VNC (Virtual Network Computing).
This machine also runs some other non-BOINC related services as well as crunching fulltime. Since the NFS and other server daemons running on it are only accessed occasionally, this hasn't affected its crunching performance in any measurable way. On the dedicated crunchers, we'll be using the NFS client components and autofs to automatically mount the fileserver directories when they boot up. You could, of course, open a terminal and manually mount the directories, but we wanted them automounted. The daemon actually will unmount them after a timeout period, and automount them again only when a user attempts to access them. This is seamless and transparent to the user.
Getting started...
The first thing to do is to decide which Linux machine should act as the fileserver. This should be a machine with working USB ports, hard drive space and other drives to make it quick and easy to get the data/files onto the fileserver. The machine should be reliable. This is more important than performance. Any old single core machine with 256mb of RAM will work fine. We chose an older 1200MHz Athlon machine with 512mb of PC-2100 in it, and this is overkill. But, the machine has run pretty much continuously since I built it around 2000 and was our test web server for a couple of those years. The large case is easy to access for repairs and holds a lot of drives, and has several case fans in it.
The fileserver normally runs headless (no keyboard, mouse or monitor) but we hooked up these peripherals during setup and configuration, just for convenience. Please note that we are using version 8.04.1 of Xubuntu and older kernels may not support the software versions that we are using for this article.
Using the Synaptic Package Manager, search for the nfs-common and nfs-kernel-server packages. Click on the APPLY button to apply the changes. Be sure and mark the dependencies for installation when the dialog pops up. The software will be downloaded and installed.
Server configuration...
The first thing we need to do is to edit the /etc/hosts file and add the IP address and hostname for each of the Linux machines on the network that we want to be able to access the fileserver. Open a terminal and issue the following command, using whichever editor you prefer instead of the mousepad editor used in all of our examples:
Here's an example of what it should look like, using some phony machine addresses and hostnames:
|
# This machine, our NFS Fileserver... 127.0.0.1 localhost 127.0.1.1 nfs1
# Machines on the network... 192.168.0.105 cruncher1 192.168.0.110 cruncher2 192.168.0.115 cruncher3
# The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts
|
The highlight colors are added for clarity. The red hostname is obviously the name of our fileserver. The blue ones are the hostnames of our dedicated crunchers. Use the actual static IP addresses and hostnames of your machines.
This change allows our fileserver to find the crunchers on the network (that will be allowed to see the shared directories) without having to perform a DNS lookup.
Page 1 of 5 RETURN TO DIRECTORY BACK | NEXT
|