A distributed file system Application Layer Protocol that allows a Client to access files on a Server much like local storage is accessed.

It works between Linux and Unix systems.

Configuration

The file-systems available to Clients can be seen in the /etc/exports/ file.

The config options for these file-systems are:

  • rw: read and write permissions.
  • ro: read only permissions.
  • sync: synchronous data transfer. (A bit slower)
  • async: asynchronous data transfer. (A bit faster)
  • secure: ports above 1024 will not be used.
  • insecure: ports above 1024 will be used.
  • no_subtree_check: this option disables the checking of subdirectory trees.
  • nohide: if another file system was mounted below an exported directory, this directory is exported by its own exports entry.
  • root_squash: assigns all permissions to files of root UID/GID 0 to the UID/GID of anonymous, which prevents root from accessing files on an NFS mount.
  • no_root_squash: all files created by root are kept with the UID/GID 0.

Mounting

An empty folder can be created to which the NFS share will be mounted

mkdir <folder name>
sudo mount -t nfs <target IP>:/ ./<folder name>/ -o nolock