Network File System (NFS)

http://www.google.com/#sclient=psy-ab&hl=en&source=hp&q=ubuntu%20nfs%20share%20server&pbx=1&oq=ubuntu%20NFS%20share%20server&aq=0v&aqi=g-v1g-b2&aql=&gs_sm=11&gs_upl=6740l8393l0l12683l4l4l0l0l0l1l546l1746l3-1.2.1l4l0&bav=on.2,or.r_gc.r_pw.,cf.osb&fp=3214e37cdfe9fa8f&biw=1280&bih=854&pf=p&pdl=300

https://help.ubuntu.com/11.04/serverguide/C/network-file-system.html

http://www.youtube.com/watch?v=NR9Ts8GV5Bo&feature=related

http://www.youtube.com/watch?v=iJqVT0KsoZs&feature=relmfu

NFS allows a system to share directories and files with others over a network. By using NFS, users and programs can access files on remote systems almost as if they were local files.

Some of the most notable benefits that NFS can provide are:

  • Local workstations use less disk space because commonly used data can be stored on a single machine and still remain accessible to others over the network.

  • There is no need for users to have separate home directories on every network machine. Home directories could be set up on the NFS server and made available throughout the network.

  • Storage devices such as floppy disks, CDROM drives, and USB Thumb drives can be used by other machines on the network. This may reduce the number of removable media drives throughout the network.

Installation

At a terminal prompt enter the following command to install the NFS Server:

sudo apt-get install nfs-kernel-server

Configuration

You can configure the directories to be exported by adding them to the /etc/exports file. For example:

/ubuntu  *(ro,sync,no_root_squash)/home    *(rw,sync,no_root_squash)

You can replace * with one of the hostname formats. Make the hostname declaration as specific as possible so unwanted systems cannot access the NFS mount.

To start the NFS server, you can run the following command at a terminal prompt:

sudo /etc/init.d/nfs-kernel-server start

NFS Client Configuration

Use the mount command to mount a shared NFS directory from another machine, by typing a command line similar to the following at a terminal prompt:

sudo mount example.hostname.com:/ubuntu /local/ubuntu

The mount point directory /local/ubuntu must exist. There should be no files or subdirectories in the /local/ubuntu directory.

http://ubuntuhandbook.org/index.php/2014/08/map-network-drive-onto-ubuntu-14-04/

An alternate way to mount an NFS share from another machine is to add a line to the /etc/fstab file. The line must state the hostname of the NFS server, the directory on the server being exported, and the directory on the local machine where the NFS share is to be mounted.

The general syntax for the line in /etc/fstab file is as follows:

example.hostname.com:/ubuntu /local/ubuntu nfs rsize=8192,wsize=8192,timeo=14,intr

If you have trouble mounting an NFS share, make sure the nfs-common package is installed on your client. To install nfs-common enter the following command at the terminal prompt:

sudo apt-get install nfs-common

Tag Cloud