How to export a volume over NFS?
It is a stardard linux procedure. The NFS server must be installed on the server machine (it is not preinstalled on all standard images). You may install it by:
$ sudo apt-get install nfs-kernel-server - on Ubuntu family $ sudo yum install nfs-utils - on RedHat family
Now you must define the volume to be exported, editing /etc/exports file and adding there a line like:
The volume will be exported as read-write to all other machines in the private network after next reboot, or in this session after the command
$ sudo exportfs -a
The volume must be mounted on other machines. In order to do this nfs client must be installed:
$ sudo apt-get install nfs-client - Ubuntu $ sudo yum install nfs-utils - RedHat family
Now the appropriate entry must be added to /etc/fstab file (assuming the volume is exported from 192.168.0.51 and the share is called „my_volume”):
192.168.0.51:/my_volume /my_volume nfs rw,_netdev 0 0
and the mount point must be created:
$ sudo mkdir /my_volume
The volume will be automatically mounted on each reboot and may be mounted for this session using
$ sudo mount /my_volume
The client machine waits during its boot for the volume to be mounted. If you want to make the machine bootable in the case when the server is not active, add option „noauto” to the fstab entry, and then mount the volume after each reboot with mount command.