I’ve recently moved my Plex server to run on a Raspberry Pi but I wanted to find a way where I could keep all of my data on the Synology. This is the way I mounted shared folders from my Synology to my Pi so I could use them in Plex.
Make sure NFS is enabled on your Synology
Allow access to a shared folder on your Synology
Create a new NFS rule
Once the edit panel is open, click “NFS Permissions” and then “Create”.
Hostname or IP: This should be the IP address of your Raspberry Pi (ideally a static address)
Privilege: What abilities do you want the Pi to have? I usually select “Read only”
Squash: Map all to admin
Tick “Allow users to access mounted subfolders”
Click “Ok”.
That should be it from the Syndology side, onto the Raspberry Pi side.
Set up the mounts on the Pi
First thing I do is create a new directory in the /media folder on the Pi, in this case I called it NAS (/media/NAS)
sudo mkdir -p /media/NAS
Next up we need to mount the network folder to this folder we’ve just created.
sudo mount -t nfs 10.0.synolgy.address:/volume1/video /media/NAS
Replace 10.0.synology.address with your Synology’s IP adress. Also replace /volume1/video with the mount path you made a note of earlier (found under each NFS rule).
Almost there! Sudo mount is not a permanent command, so we need to make sure it still works next time you reboot your Pi. To do this:
sudo nano /etc/fstab
Then on a new line in there, paste the following (making sure to replace the same details as before):
10.0.synolgy.address:/volume1/video /media/NAS nfs defaults 0 0
Save and exit fstab and you should be ready to go!
In theory, you should be able to run “ls /media/NAS” and you should see the files/folders from your Syndology! This should also now mean you can add these folders to Plex on your Pi as libraries, simple!
Known issues
Not being mounted at boot
Sometimes I’ve noticed the mounts don’t always mount when the Pi boots. I’ve yet to find a permanent solution for this, for the meantime I just run:
sudo mount -a
Update 20/11/2021 – Some searching has suggested that adding “_netdev” to our fstab options may help, this should stop fstab trying to mount the drives until the network connection is set up.
In theory, the fstab command would become:
10.0.synolgy.address:/volume1/video /media/NAS nfs defaults,_netdev 0 0
A full list of fstab options can be found here.
Mounting but with no permissions
This is one I experienced recently, I could mount the folder from the Synology on the Pi but I was not able to do anything with it (not even list files in the directory using “ls”). I ended up noticing this was down to permissions on the Synology with the admin account.
Within the shared folder settings in the Synology control panel, make sure “admin” has access to read/write the folder you’re trying to share.