HOWTO setup NFS for the online computers
This page was written to document how the gluon02-gluon05 machines were configured to mount a directory from gluon02 via NFS. The intent is for gluon02 to serve as a temporary file server for the gluon machines until the dedicated server is delivered and installed.
The gluon machines are running Red Hat Enterprise Linux 6.3
Configuring NFS server
- Create a directory to that you wish to export:
- Edit the file /etc/exports
- This should specify a range a range of IP addresses, but for now, each of the 4 machines in the counting house are listed individually. (Yes, it is unnecessary to list gluon2 since it is the host machine, but I did it anyway)
- The lines look like this:
/group/gluoncfs 220.127.116.11(rw,no_root_squash,async) /group/gluoncfs 18.104.22.168(rw,no_root_squash,async) /group/gluoncfs 22.214.171.124(rw,no_root_squash,async) /group/gluoncfs 126.96.36.199(rw,no_root_squash,async)
- Fire up the nfs server:
- Enable the NFS service so it starts automatically on reboot
- Go to System->Administration->Services.
- When the window finally gives you control, select "nfs" and hit the green "Enable" button
- Note that I did not reboot gluon02 after doing doing this and just assume it will work
Configuring NFS Clients
- Edit the file /etc/fstab to include a line like this:
gluon02:/group/gluoncfs /group/gluoncfs nfs tcp 0 0
- Create a directory as the mount point
- Mount the NFS volume
- This should auto-mount on reboot since it is in /etc/fstab, but only if gluon02 is already up and running. If it is not, there may be some sort of delay on startup while it times out. This was not tested.
Setting up home directories
The "right" way to do this is probably to set the home directory in a configuration file at the system level. (A stand-alone system would do this in /etc/passwd but I don't know how to do it when using NIS)
What I did was on the client machine:
- Create a directory /group/gluoncfs/home/davidl (need to be root to do this)
- Change owner to davidl via: chown davidl /group/gluoncfs/home/davidl
- Change permissions: chmod 755 /group/gluoncfs/home/davidl
- (this is needed to allow ssh to use my keys in .ssh for password-less logins)
- Rename my default home directory in /home to davidl.old
- Create a symbolic link in /home pointing to /group/gluoncfs/home/davidl
Now I have the same home directory (hosted by gluon02) no matter which gluon machine I log into.