NFS4 Server setup

Hi all,

After several days trying to configure my NFS server and clients I am going to have to ask for some help. I did have all of this set up and working before I had to switch one RasPi to OSMC to enable KODI as a media player.

My set up is this…

Raspberry Pi 2 running OSMC booting from SD with / on 1TB USB HDD. 4TB HDD for media storage and files. Wifi connected to home network (

Raspberry Pi B+ running Raspbian Jessie. Wifi connected to home network (

Desktop PC running Manjaro. Ethernet connected to network (

I was using the Pi B+ as a torrent/file server writing/reading data via NFS share served from the Pi 2 over direct wired connection between the Pi B+ ( and the Pi 2 (

The Pi 2 also serves the NFS share to the Manjaro PC but over the wifi. The idea is to limit the amount of data going over the wifi and allow the torrent server fast read/write to the data HDD.

Pi 2 has this /etc/exports configuration…

Pi B+ has this line in /etc/fstab… /mnt/4TB-DATA nfs4 user,rw,auto 0 0

Manjaro PC has this in /etc/fstab… /mnt/4TB-DATA nfs4 rw,users,auto 0 0

When I try to mount the NFS share on the Pi B+ I get this error…

mount.nfs4: access denied by server while mounting

From Manjaro PC I get this…

mount: No such file or directory

I understand you might not be able to help with the Manjaro PC but any pointers to help with the OSMC/Raspbian set up would be greatly appreciated.

If there are any other config files you need to see please ask.


Your exports doesn’t look right, as a simple test (it’s less secure this way, but probably not a worry if you are on a small home network. Try this in your /etc/exports

/srv/nfs4/4TB-DATA *(rw,sync,no_subtree_check)

this will grant access from any IP.

Also, double check your permissions on /srv/nfs4/4TB-DATA. That directory has to be rwx for the user accessing it via NFS.

Thanks Brian, that has allowed the Pi B+ to mount the share over the wired link.

My Manjaro PC still cannot connect and gives this error…

mount: No such file or directory

I wonder if this is because Manjaro implements NFS4.

Is OSMC running NFS3?

Thanks again,


OSMC’s Pi kernel should have nfsv4 enabled


Okay everything seems to have sorted itself out after restarting the systems.

Thanks again for the very helpful comments.


Diesel1, after making the changes to /etc/exports, make sure you do this:

sudo exportfs -ra

Otherwise the changes you make won’t take until a reboot.

If you’d like more info about setting up NFS4, give this page a read:

SettingUpNFSHowTo Lots of good information about configuring users, etc.

Glad to hear you got things working!

1 Like

Yes I did use exportfs to refresh the daemon and had tried single lines for each export in /etc/exports…


but the other computers couldn’t mount the shares.

I have also read the NFS4 howto many times. I have been using GNU/Linux since 1998 and consider myself reasonably competent but this just wasn’t happening for me. :disappointed:

Anyhow, thanks for your help.