Quick post on how to setup a NFS Server on Ubuntu and how to setup the client to interact with the NFS Server.
Setup the Dependencies:
Create the Directory for NFS and set permissions:
Allow the Clients:
We need to set in the
exports file, the clients we would like to allow:
rw: Allows Client R/W Access to the Volume.
sync: This option forces NFS to write changes to disk before replying. More stable and Consistent. Note, it does reduce the speed of file operations.
no_subtree_check: This prevents subtree checking, which is a process where the host must check whether the file is actually still available in the exported tree for every request. This can cause many problems when a file is renamed while the client has it opened. In almost all cases, it is better to disable subtree checking.
Start the NFS Server:
Restart the service and enable the service on boot:
We will mount the NFS Volume to our Clients
Install the dependencies:
Test if we can mount the volume, then unmount it, as we will set the config in our
1 2 3
Set the config in your
fstab, then mount it from there:
1 2 3
Now you shoule be able to write to your NFS Volume from your client.