Search notes:

NFS - Network File System

The most ubiquitous distributed file system - one of the oldest still in use.
An NFS Server lets a portion of its local file system be accessed by other nodes. These nodes (the clients) mount that portion.

Prerequisites

All network users have the same UID.
Using a time synchronization daemon is strongly recommended: the clocks in an NFS network should be kept synchronized to eliminate undesired delays.

Configuration

Server Access control

The clients that are allowed to access files on the servers need to be entered into /etc/exports.
After modifying /etc/exports, the file needs to be re-read with exportfs. -r stands for re-read, -a for all (of /etc/exports).
sudo exportfs -ra
Alternatively, the server might be restarted.
The NFS server also respects /etc/hosts.allow and /etc/hosts.deny.

Mounting NFS on the client

sudo mount $NFS_SERVER:/home/rene $MOUNTPOINT

Showing the export list

showmount -e
On the client:
showmount -e $NFS_SERVER

Restarting the server

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

Advantage

The advantage for the client is that he does not be aware of his using NFS, he can use open, close etc as he does with his local files.

Limitations

There are at least four limitations with NFS:
1) The total size of the files of an NFS mount is limited to storage capabilities of the server.
2) No high availability - What happens, if the server goes down?
3) If there are many clients, there might be performance bottlenecks when they simultaneously try to read from or write to the server.
4) Finally, the client need to transfer the data to their local machine
HDFS tries to solve these limitations.
A further perceived limitation might be that GVfs is not supported.

Installation

Ubuntu

Ubuntu distinguishes between a server and a client.

Server

sudo apt-get install nfs-kernel-server

Client

sudo apt-get install nfs-common

Arch linux

Arch does not have such a distinction, both NFS server and client are installed with
sudo pacman -Sy nfs-utils

See also

/etc/default/nfs-kernel-server

Index