How to Setup NFS Mount with Synolgy NAS on Ubuntu 18.04 / 19.04

nfs-mount-ubuntu-synology

NFS (Network File System) is basically developed for sharing of files and folders between Linux/Unix systems by Sun Microsystems in 1980. NFS si 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.

Some of the benefits of NFS:

  • Store and stream all your media on NAS instead of a virtual machine. For optimal streaming and viewing quality, it is recommended that you install VLC Media Player on your local machine.
  • Store GitLab repositories on NAS to increase redundancy.
  • It uses standard client/server architecture for file sharing between all *nix based machines.
  • Can be secured with Firewalls and Kerberos.
  • With the help of NFS we can configure centralized storage solutions.

This article assumes you have a good understanding of the basic networking, Synology DSM and the Ubuntu operating system.

Step 1. Setup NFS Server

Log into the Synology DSM and open Control Panel > Shared Folder. Choose “Create” and use the following options:

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”.

Step 2. Setup Client

Install everything necessary and create a directory we can mount the share to. In this example, the local mount directory will be “//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.

Hopefully, we should see that “helloworld.txt” in “File Station” on the Synology DSM like below:

Next, we will ensure this mount is configured automatically at boot by adding the entry into our “ file.

Replace “10.0.10.100:/volume2/nas-storage” with your actual Synology NAS IP address and NFS mount path. replace “//-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.

Congratulations! You have successfully configure client. 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!

1 Comment

  1. Don’t you need to specify that it’s an NFS mount?

    # /etc/fstab:
    .
    .
    .
    10.0.10.100:/volume2/nas-storage /nfs/nas-storage nfs auto,nofail,noatime,nolock,intr,tcp,actimeo=1800 0 0

Leave a Reply

Your email address will not be published. Required fields are marked *