8

I would like to mount a NFS folder share from my Synology NAS on my RPi. So far, all my efforts have been unsucessful.

I get stuck on :

pi@raspberrypi ~ $ sudo mount -t nfs 192.168.0.100:/volumes1/Movies /mnt/Movies
mount.nfs: access denied by server while mounting 192.168.0.100:/volumes1/Movies

Guides followed :
https://www.synology.com/en-us/support/tutorials/566
http://wiki.xbmc.org/index.php?title=NFS#Synology
http://www.robvanhamersveld.nl/2012/12/14/share-media-from-synology-to-xbmc-with-nfs/

Topology :

Devices :
RPi - NFS Client OS: Raspbian Synology NAS - NFS Server OS:DSM5.0

IP :
RPi - 192.168.0.17
Synology NAS - 192.168.0.100

Actual state and configuration :

Synology Configuration

Export file

DS> cat /etc/exports

/volume1/Movies  192.168.0.17(rw,async,no_wdelay,insecure,no_root_squash,anonuid=1000,anongid=100)  

Folder permission to share

DS> ls -ls /volume1/ | grep Movies
   4 drwxrwxrwx    2 root     root          4096 Jul 23 07:14 Movies

uid and gud on raspberry

pi@raspberrypi ~ $ id
uid=1000(pi) gid=1000(pi) groups=1000(pi),4(adm),20(dialout),24(cdrom),27(sudo),29(audio),44(video),46(plugdev),60(games),100(users),105(netdev),999(input),1001(indiecity),1002(spi),1003(gpio)

I think the issue is related with uid and gud but I don't know how to match it on client.

Thanks for all advices and possibles solutions.

0

7 Answers 7

4

The error might mean you can't mount it locally, even though it says server. Everything looks to be set up fine on the Synology.

You might just want to allow everybody on your LAN to access that share for now. In IP add this. Just to make sure restart it after changing settings on NFS.

192.168.0.0/24

I am not sure what the security tab does in synology but if you can view /etc/exports on the synology there should be an entry similar to this.

/volumes1/Movies 192.168.0.0/24(rw,sync,no_subtree_check)

Make sure your mount directories are created properly on the Pi

sudo mkdir -p /mnt/movies
sudo chmod 777 /mnt/movies

You should be able to mount it easily just like this on the Pi

sudo mount 192.168.0.100:/volumes1/Movies /mnt/movies

This really shouldn't be that complicated, you might just be looking at the wrong place. I hope this solves your issue.

2
  • Many thanks ! The synology config didn't work well out-of-the-box with raspbian. After some trials and finally putting your suggested line on /etc/exports I finally mount the NFS share on RPi.
    – cgasp
    Aug 27, 2014 at 19:24
  • Make sure your mount directories are created properly on the Pi. - Thank you very much, that did the trick. Otherwise only root could acess the files properly, they were readonly for all others.
    – sjas
    Sep 12, 2016 at 17:54
2

For Synology DSM 5.1, Set Privilege to "Read only" (unless you want your pi to write files) and Squash to "Map all users to admin"

enter image description here

2

Before to mount the nfs,

you must start rpc

sudo /etc/init.d/rpcbind start
2

The actual error may be that you are trying to mount /volumes1/Movies which is a typo error to ls -ls /volume1/ | grep Movies

1
  • 1
    Oh yes, the extra s in volumes1, well spotted! Aug 19, 2018 at 9:37
1

I used cifs connections before and did not see /volume1 was missing. The following examples are working in my configuration similar to the ones above:

sudo mount -t nfs 192.168.178.62:/volume1/pi/client0 /mnt

sudo mount -t nfs DiskStation.local:/volume1/pi/client0 /mnt

sudo mount -t cifs -o username=admin //DiskStation.local/pi/client0 /mnt
0

Don't forget to open the firewall ports for this (the list of built-in application rules has one for Mac/Linux file server that does the trick).

0

I wrote a blog series on this. Maybe this is useful for any reader of this question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.