- Now go to your linux box
- How to Use NFS to Mount Synology to Linux as a Storage Space?
- Things You Will Need
- Enable NFS File Service
- Configuring Shared Folders for NFS Access
- Installing NFS Client on Ubuntu/Debian/Linux Mint
- Installing NFS Client on CentOS 8/RHEL 8
- Installing NFS Client on Arch Linux
- Mounting Shared Folders via NFS from the Command Line
- Accessing Shared Folders via NFS using the Nautilus File Manager
- Accessing Shared Folders via NFS using the Dolphin File Manager
- Conclusion
- Mounting a Synology NAS NFS Shared Folder on a Ubuntu 16.10 Client
- Step 2 — Create/Edit a Shared Folder to Add NFS Permissions:
- Step 3 — Make Sure nfs-common is Installed
- Step 4 — Mount a Share
- Step 5 — Auto Mount at Boot
- Helpful Links
- Updates
- Tags
Now go to your linux box
Create a mount point, this can be anywhere on the system, but is generally done under /mnt/:
You can change the permission with chmod, if you wish but not required
Edit your fstab:
At the bottom of the file create a new line for your mount. Notice that you may need to change what volume your data is on depending on what volume it resides on you synology. You can have as many mount points as you like, one per line. DO NOT EDIT anything already there above, These are your actual hard drives, any changes can break your system.
10.0.0.50:/volume1/Media /mnt/media nfs auto,defaults,nofail 0 0
Above is a very basic example
B. Volume on the DiskStation
C. Share name. This is Case Sensitive!
D. Local folder/mount point on Linux box that you created above
E. Mount point type, nfs in this case
G. Will continue to boot the system if mount fails instead of halting
For more mounting options visit: https://help.ubuntu.com/community/SettingUpNFSHowTo
Save the fstab
Mount the shares immediately:
If you don’t receive any errors you should be good! The most common error is permission denied and usually are from the following:
- Wrong ip permissions on synology, doesn’t match from the host you are coming from
- bad user mapping on synology — (Squash)
- Mistyping in fstab
- Case sensitive share names e.g. if you have a share call Media, it must also have a capital «M» in the fstab
- Wrong volume specified
How to Use NFS to Mount Synology to Linux as a Storage Space?
You can use the NFS protocol to access your Synology NAS shared folders from Linux. In this article, I will show you how to do that. So, let’s get started.
Things You Will Need
To follow this article, you need to have:
- Synology NAS device
- laptop or computer to access the DSM web management interface of your Synology NAS
You also need to know the IP address of your Synology NAS.
The IP address of my Synology NAS is 192.168.0.110. It will be different for you, so, make sure to replace it with yours from now on.
Enable NFS File Service
To be able to access your Synology shared folders via the NFS protocol, you must enable the NFS file service on your Synology NAS.
To do that, open the Control Panel app and click on File Services, as marked in the screenshot below.
The File Services section of the Control Panel app should be opened.
Now, scroll down to the NFS section, as marked in the screenshot below.
To enable the NFS file service, check the Enable NFS checkbox.
If you want to enable support for NFS version 4, check the Enable NFSv4.1 support checkbox as well, as shown in the following screenshot.
Once you’re done, click on Apply.
The NFS file service should be enabled.
Configuring Shared Folders for NFS Access
Once you’ve enabled the NFS file service, you must configure your shared folders for NFS access.
To configure a shared folder for NFS access, open the Control Panel app and click on the Shared Folder icon, as marked in the screenshot below.
Select a shared folder which you want to configure for NFS access and click on Edit, as shown below.
Now, navigate to the NFS Permissions tab.
To create an NFS permission rule, click on Create.
The NFS permission rule creation window should be displayed. You can create an NFS rule from here.
In the Hostname or IP* section, you have to type in the hostname or the IP address of the client computer or the network subnet that will be allowed to access this shared folder via NFS.
Using the Privilege dropdown menu, you can select whether you want to allow Read, Write, or Read/Write access to this shared folder via NFS.
Using the Squash dropdown menu, you can configure the user map settings of the NFS server.
No mapping: All the users of the NFS client maintain their original access privileges.
Map root to admin: The root user of the NFS client gets equivalent access privileges as the admin user of the Synology NAS.
Map root to guest: The root user of the NFS client gets equivalent access privileges as the guest user of the Synology NAS.
Map all users to admin: All the users of the NFS client get equivalent access privileges as the admin user of the Synology NAS.
Map all users to guest: All the users of the NFS client get equivalent access privileges as the guest user of the Synology NAS.
Checking the Enable asynchronous checkbox allows your Synology NAS to reply to requests from NFS clients before any changes to files are completed. This improves the NFS performance.
Checking the Allow connections from non-privileged ports (ports higher than 1024) checkbox allows the NFS clients to use ports greater than 1024 when connecting to the Synology NAS via NFS.
Checking the Allow users to access mounted subfolders checkbox will allow the NFS clients to access mounted subfolders.
Once you’re done configuring the NFS rule, click on OK.
An NFS rule should be created, as you can see in the screenshot below.
The mount path for the shared folder should also be displayed in the NFS Permissions section. You need it to mount this shared folder on your computer. So, remember it.
Once you’re done configuring the NFS Permissions for the shared folder, click on OK.
Installing NFS Client on Ubuntu/Debian/Linux Mint
If you want to mount your Synology NAS shared folders on Ubuntu/Debian/Linux Mint via NFS from the command line, you need to install the NFS client package nfs-common on your computer.
NOTE: You can skip this section if you don’t want to mount your Synology NAS shared folders via NFS from the command line.
First, update the APT package repository cache with the following command:
Install the nfs-common package with the following command:
To confirm the installation, press Y and then press .
The nfs-common package is being installed.
At this point, the NFS client package nfs-common should be installed.
Installing NFS Client on CentOS 8/RHEL 8
If you want to mount your Synology NAS shared folders on CentOS 8/RHEL 8 via NFS from the command line, you need to install the NFS client package nfs-utils on your computer.
NOTE: You can skip this section if you don’t want to mount your Synology NAS shared folders via NFS from the command line.
First, update the DNF package repository cache with the following command:
To install the nfs-utils package, run the following command:
The NFS client package nfs-utils package should be installed. In most cases, it should already be installed on your computer.
Installing NFS Client on Arch Linux
If you want to mount your Synology NAS shared folders on Arch Linux via NFS from the command line, you need to install the NFS client package nfs-utils on your computer.
NOTE: You can skip this section if you don’t want to mount your Synology NAS shared folders via NFS from the command line.
First, update the Pacman package repository cache with the following command:
To install the nfs-utils package, run the following command:
To confirm the installation, press Y and then press .
The nfs-utils package is being installed. It may take a few seconds to complete.
At this point, The NFS client package nfs-utils should be installed.
Mounting Shared Folders via NFS from the Command Line
Once you’ve installed the NFS client program on your desired Linux distribution, you can mount your Synology NAS shared folder on your computer from the command line.
First, you need to create a directory where you can mount your Synology NAS shared folder via NFS.
For demonstration, I will mount the Files shared folder from my Synology NAS in the /synology-nas/Files directory of my computer.
To create a directory /synology-nas/Files for mounting the shared folder Files, run the following command:
To mount the shared folder Files in the /synology-nas/Files directory via NFS, run the following command:
NOTE: Here, /volume2/Files is the mount path of the Files shared folder of my Synology NAS. It will be different for you. So, make sure to replace it with yours from now on. You can find the mount path in the NFS Permissions tab of your shared folder’s settings window, as I have shown in Configuring Shared Folders for NFS Access section of this article.
The Synology NAS shared folder Files should be mounted in the /synology-nas/Files directory, as you can see in the screenshot below.
As you can see, the files that are in the Files shared folder are accessible.
Accessing Shared Folders via NFS using the Nautilus File Manager
If you’re using the GNOME 3 desktop environment or the Nautilus file manager, then you can access your Synology NAS shared folders very easily using the Nautilus file manager, the default file manager of the GNOME 3 desktop environment.
First, open the Nautilus file manager and navigate to the Other Locations section, as marked in the screenshot below.
Now, you have to type in the NFS access URL of your Synology NAS shared folder in the Connect to Server section, as marked in the screenshot below, to connect to it.
To access the Synology NAS shared folder Files that have the mount path /volume2/Files, the NFS access URL will be nfs://192.168.0.110/volume2/Files.
Type in the NFS access URL and click on Connect.
You should be connected to your desired Synology NAS shared folder and access all the files.
Accessing Shared Folders via NFS using the Dolphin File Manager
If you’re using the KDE desktop environment or the Dolphin file manager, then you can access your Synology NAS shared folders very easily using the Dolphin file manager, the default file manager of the KDE desktop environment.
First, open the Dolphin file manager and double-click on the directory path, as marked in the screenshot below.
The directory path should be editable.
You have to type in the NFS access URL of the shared folder of your Synology NAS here.
To access the Synology NAS shared folder Files that has the mount path /volume2/Files, the NFS access URL will be nfs://192.168.0.110/volume2/Files.
Type in the NFS access URL and press to access it.
You should be connected to your desired Synology NAS shared folder and access all the files.
Conclusion
In this article, I have shown you how to enable the NFS file service on your Synology NAS and configure shared folders for NFS access. I have also shown you how to mount the Synology NAS shared folders on Linux from the command line, as well as how to access them graphically using the Nautilus and Dolphin file managers.
Mounting a Synology NAS NFS Shared Folder on a Ubuntu 16.10 Client
If NFS is not enabled on the NAS, you must first enable it. The checkbox for the setting can be found under:
Control Panel → File Services → Win/Mac/NFS → NFS Service → Enable NFS
For further details and screenshots on how to enable NFS see these instructions within the Synology guide on setting up NFS.
Step 2 — Create/Edit a Shared Folder to Add NFS Permissions:
Step 3 — Make Sure nfs-common is Installed
sudo apt install nfs-common
Step 4 — Mount a Share
Create a target directory for your mount point, and execute the following command adjusted with the NFS server IP and the mount directory:
sudo mount 192.168.1.214:/volume1/Downloads /media/NAS/Downloads
Step 5 — Auto Mount at Boot
If it is desired for the NFS share mount to persist after reboot/shutdown, add an entry to the /etc/fstab file:
192.168.1.214:/volume1/Downloads /media/NAS/Downloads nfs rsize=8192,wsize=8192,timeo=14,intr
The mounted share should now be accessible on the client. Check via the CLI or file manager of your choice:
Helpful Links
- Old but helpful for steps 1 and 2: https://www.ryananddebi.com/2013/01/15/linuxmint-or-ubuntu-how-to-automount-synology-shares/
- Info about the client configuration (steps 3, 4, and 5): https://help.ubuntu.com/lts/serverguide/network-file-system.html#nfs-client-configuration
- Synology Support Center guide to setting up an NFS share: https://www.synology.com/en-global/knowledgebase/DSM/tutorial/File_Sharing/How_to_access.
Updates
These steps are also working for Ubuntu 19.10, (and I assume they work on versions inbetween, such as the 18.04 LTS release, and also probably the 16.04 LTS release prior).