Ubuntu NFS Server

Well I always seem to need these notes for setting up the NFS server for Ubuntu so here they are. Also I found NFS to be a great storage share for anything related to backing up or moving around files. I even use it for VMware and databases.

NFS Installation
Run this as root
apt-get install nfs-kernel-server nfs-common portmap

When configuring portmap do not bind loopback. If you do you can either edit /etc/default/portmap using the following:
nano /etc/default/portmap

Restart Portmap using the following command
/etc/init.d/portmap restart

NFS Server Configuration
NFS exports from a server are controlled by the file /etc/exports. Each line begins with the absolute path of a directory to be exported, followed by a space-seperated list of allowed clients.
You need to edit the exports file using the following command
nano /etc/exports

Here are the mounts for our infrastructure

Now you need to restart NFS server using the following command
/etc/init.d/nfs-kernel-server restart

If you make changes to /etc/exports on a running NFS server, you can make these changes effective by issuing the command
exportfs -a

Client Connection
This is the command you would want to run from a computer that would connect back to the NAS
mount /mnt/nas

Additional Information
If you're connection to a Linux NFS server from Mac OS X, you need to specify 'insecure' in your exports and map the user IDs since Macs use uid 501 for the first regular user. For my /etc/exports I use:
/home,async,insecure,all_squash,anonuid =1000,anongid=1000)


Popular posts from this blog

Console over SSH (ONTAP)

Brocade Zone Setup

OpenSolaris ZFS Setup