NFS (Network File System) is a protocol enabling multiple remote connections to a singular shared folder. This is most beneficial in scenarios such as web applications where multiple compute resources are enlisted to read and write from one folder.
In this article, we are going to create an NFS enabled shared folder on a Synology NAS and then configure a persistent file system mount on an Ubuntu 18.04 machine.
Store Plex media on NAS instead of a virtual machine.
Store GitLab repositories on NAS to increase redundancy.
Distributed WordPress deployment with a shared “wp-content” directory for your website.
This article assumes you have a good understanding of the basic networking, Synology DSM and the Linux operating system.
Note that enabling encryption will prevent you from enabling NFS access to the shared folder.
Apply the desired settings or copy from the above. On the permissions screen, navigate to the “NFS Permissions” tab and create an NFS rule for the host(s) you will be using to access the NFS share.
If multiple hosts will be accessing the NFS share, you can add rules for each host.
Take note of the “Mount path” at the bottom of the NFS PErmissions screen. In our example, the mount path is “/volume2/nas-storage”.
Install everything necessary and create a directory we can mount the share to. In this example, the local mount directory will be “/nfs/general-storage” but you can make it whatever you like.
Let’s test out everything so we know for sure it actually works. Replace “10.0.10.100” with the actual IP of your Synology NAS.
Next, we will ensure this mount is configured automatically at boot by adding the entry into our “fstab file.
Replace “10.0.10.100:/volume2/nas-storage” with your actual Synology NAS IP address and NFS mount path. Also replace “/nfs/nas-storage” with the real local NFS mount directory you created earlier.
The best way to ensure this configuration is going to work forever is to reboot the entire system and test the local NFS mount directory after start-up.
After reboot, you should have a fully working NFS mount on the client machine. To enable NFS access to other servers on your network, just repeat the process!