Ashoori Group

Ashoori Group | Homepage

  • Increase font size
  • Default font size
  • Decrease font size

Setting up NFS

NFS is probably the most powerful and convenient way to use electron. However, it's also probably the most difficult method to set up initially. If it's already set up, however, it's very easy to use!

If NFS is already set up

On most of our lab machines, NFS is already running. To use it, just start a terminal, and run

ln -s /mnt/electron_home/$USER electron_home

Now, the directory "electron_home" in your home directory will have all the files you have on electron in it.

If NFS is not already set up

NFS needs a way to tell which files are yours, and which belong to other users. Unix users are identified two different ways: by a user name, which is a word like "Oliver", and by a user ID, or UID, which is a number like 1000. It turns out that it's much easier to set up NFS using user numbers than it is using user ID's, so that's what we have done. This means it's critical that you have the same UID on all the machines you intend to use NFS from. To tell if this is already true, run id -u on both electron and the machine you'd like to set up. If you see different answers, you need to fix your UID. If you see the same ID, you're good to go.  If not, use these instructions to fix your UID on the local machine.

If this is a computer that will be permanently in lab that different people might use, you should consider setting up LDAP on it, so the account information from electron will automatically be used.

First, become root using su

Install the software you'll need. Under Debian or Ubuntu, type:

apt-get update; apt-get install nfs-common nfs-kernel-server

Next, set up the NFS mount point.

mkdir /mnt/electron_home

Finally, add an entry to the file /etc/fstab to tell Linux to mount the NFS partition.

emacs -nw /etc/fstab (or your favourite editor)

Page down to the bottom, and add the line

electron:/home /mnt/electron_home nfs defaults,rw 0 0

Don't forget to put a carriage return at the end of the line.

Hit Control-x then Control-s to save (in emacs). Hit Control-x then Control-c to quit (in emacs).

Mount the share (it'll happen automatically at boot from now on) by typing

mount -avt nfs

Check things out, by typing

ls /mnt/electron_home

You should see a list of all the users on electron.

Type exit so you're no longer root, and follow the directions above under "If NFS is already set up".