X

Mount Synology NAS to Raspberry Pi Using NFS

Here’s the equipment I used, this should work similarly on other software versions:

  • Synology NAS Running DSM 7.0
  • Raspberry Pi running Raspbian 10 (Buster)

This tutorial is based on these instructions from Synology, with modifications because they didn’t work exactly as listed: https://kb.synology.com/en-uk/DSM/tutorial/How_to_access_files_on_Synology_NAS_within_the_local_network_NFS

Enable NFS on the Synology NAS:

  1. From the Synology web interface, Go to Control Panel > File Services > NFS
  2. Check Enable NFS Service. Set Maximum NFS Protocol to NFSv4.1 and click Apply.

Create NFS Permissions:

  1. Still in the Synology web interface, go to Control Panel > Shared Folder
  2. Select the folder you want to share and click Edit
  3. Click NFS Permissions > Create
    1. Enter a hostname or IP for the Raspberry Pi that will be accessing the folder.
    2. Leave Privilege on Read / Write and leave other settings at default, and click Save.
  4. Note the Mount path at the bottom of the folder edit page, then click Save again to save the folder settings.

 

 

Mount share on the Raspberry Pi:

  1. From the terminal – install nfs if not already installed:
    1. sudo apt update
    2. sudo apt install nfs-common
  2. Create the mount directory – change the path as appropriate:
    1. sudo mkdir /mnt/share
  3. Here’s where Synology instructions didn’t work. I kept getting a timeout error when trying to mount the share. This answer helped me get on the right track.
    1. To do a one time mount to ensure everything is working – replace IP address/ hostname and paths are appropriate:
      1. sudo mount -t nfs4 -o proto=tcp,port=2049 192.168.XX.XX:/volume1/share /mnt/share
    2. To mount so it persists after a reboot (thanks to this article):
      1. sudo nano /etc/fstab
      2. Add this line to the bottom, again replacing ip addresses / hostname and file paths as needed:
        1. 192.168.XX.XX:/volume1/share /mnt/share nfs defaults 0 0
      3. Exit, save the file, and reboot the pi (sudo reboot now).
      4. Once the Pi is back up, ensure the mount worked with ls /mnt/share
Categories: Uncategorized
Related Post