Friday, June 1, 2007

NFS done

How to set up NFS:

BEFORE ANYTHING IT IS VERY IMPORTANT.. to change the home directory of the local admin name. If this is not done, the computer will mount to the server and then there will be an error that the home directory that you are currently working in can not be found. To do this go into

system > administration > users and groups
-click the properties of the local admin name
-under the "advanced" tab, change the home directory name

Then, get the install:

sudo apt-get install portmap nfs-common

Next, edit the program files:
to mount to NFS the following files need to be edited:

/etc/fstab
copy and paste:

# /etc/fstab: static file system information.
#
#
proc /proc proc defaults 0 0
/dev/sda1 / ext3 defaults,errors=remount-ro 0 1
/dev/sda3 /storage xfs defaults 0 2
/dev/sda2 none swap sw 0 0
/dev/hdb /media/cdrom0 udf,iso9660 user,noauto 0 0
moe.cs.haverford.edu:/home /home nfs rw,hard,intr 0 0
***************************************************************************
/etc/hostname
should be the name of the computer
eg: burns, patti, krusty
***************************************************************************
/etc/hosts
add to top so it looks something like :
127.0.0.1 localhost krusty
165.82.168.31 moe.cs.haverford.edu moe
***************************************************************************
/etc/mtab
copy and paste:

/dev/sda1 / ext3 rw,errors=remount-ro 0 0
proc /proc proc rw 0 0
/sys /sys sysfs rw 0 0
varrun /var/run tmpfs rw 0 0
varlock /var/lock tmpfs rw 0 0
procbususb /proc/bus/usb usbfs rw 0 0
udev /dev tmpfs rw 0 0
devpts /dev/pts devpts rw,gid=5,mode=620 0 0
devshm /dev/shm tmpfs rw 0 0
lrm /lib/modules/2.6.15-28-686/volatile tmpfs rw 0 0
moe.cs.haverford.edu:/home /home nfs rw,hard,intr,addr=165.82.168.31 0 0
/dev/sda3 /storage xfs rw 0 0
***************************************************************************
I'm not sure this is necessary for NFS but I found this in the /etc/ of another lap computer on the network

ntp.conf
add to bottom:

server moe.cs.haverford.edu
***************************************************************************

then restart nfs, portmap:

sudo /etc/init.d/nfs-common restart
sudo /etc/init.d/portmap restart

then mount,

sudo mount moe.cs.haverford.edu:/home