Mapping to NFS Share on OSMC

I’m having some trouble mapping to an NFS share on my QNAP using my Raspberry Pi 4B with OSMC. I had no problem accessing the same file share with the same credentials on my old Raspberry Pi 3 with OSMC.

I followed the steps here:

This is in my Auto.Master file

+auto.master
/- /etc/auto.nfs.shares --timeout 15 browse
/mnt/192.168.74.96/nfs 192.168.74.96/nfs

Testing using the ls -lah command shows the following

osmc@osmc:~$ sudo nano /etc/auto.master
osmc@osmc:~$ ls -lah /mnt/192.168.74.96/nfs
total 4.0K
drwxr-xr-x 2 root root 0 Dec 18 18:12 .
drwxr-xr-x 3 root root 4.0K Dec 18 18:12 …
osmc@osmc:~$

I’ve enabled logging and attempted to map to the NFS share within the OSMC gui. the error is “cannot access share, do you want to connect anyway?”

Link to logs:

https://paste.osmc.tv/tinetafexo

I can access the share on a windows machine without issue using the osmc/osmc credentials.

Hi, you need two files (and pay attention to the upper and lower case)

  1. /etc/auto.master
    Content should be:
+auto.master
/- /etc/auto.nfs.shares --timeout 15 browse
  1. /etc/auto.nfs.shares
    Content (pay attention to the colon):
/mnt/192.168.74.96/nfs 192.168.74.96:/nfs
  1. sudo reboot your rpi to get the nfs share mounted

Since the user osmc will not be a real user on your QNAP, you should also pay attention whether the right squash option is set on your NAS: Mounting NFS - QNAPedia. You say you don’t have any issues accessing the NFS share using your rpi 3, so there there might nothing to do here.

If this is all done, you can use the Root Filesystem method to specifiy the access to the data on the NFS share. Use the path /mnt/192.168.74.96/nfs accordingly.

Did you allowed 192.168.74.4 in your NFS export range?

Hello. Thank you for the suggestion. There are no limitations on the network, QNAP accepts connections from all internal network addresses.

Hello,

Thank you, I made the recommended changes, please see the content of /etc/auto.master below.

+auto.master
/- /etc/auto.nfs.shares --timeout 15 browse
/etc/auto.nfs.shares
/mnt/192.168.74.96/nfs 192.168.74.96:/nfs

(I did run sudo reboot after adding this before trying to continue).

I also attempted to add the /mnt/192.168.74.96/nfs to the root filesystem, but the OSMC device is still unable to reach the share.

I’ve enabled logging again and tried to access the shares after that, and uploaded.

https://paste.osmc.tv/tenuqaloku

Thank you in advance, not sure what I have missed?

I double-checked the QNAP NFS host access permissions. It is set to allow all IPs on 192.168.74.0/24 (all IPs on my home network).

The squash option was set to “squash no users”, which works with my old RPi3. I did try flipping that setting to “squash all users” as the referred kb recommended but that didn’t make a difference.

Greg

just to be sure: You have 2 lines in file /etc/auto.master and 1 line in file /etc/auto.nfs.shares?
Or did you just write that all into /etc/auto.master ?

Hi Jim,

This was all added to /etc/auto.master

+auto.master
/- /etc/auto.nfs.shares --timeout 15 browse
/etc/auto.nfs.shares
/mnt/192.168.74.96/nfs 192.168.74.96:/nfs

Please, read again my first post.

2 Likes

Hi Jim,

I think I am getting confused about what 2 lines to add to the +auto.master section.

Should it just be this:

sudo nano /etc/auto.master
/- /etc/auto.nfs.shares --timeout 15 browse

sudo nano /etc/auto.nfs.shares
/mnt/192.168.74.96/nfs 192.168.74.96:/nfs

My apologies for all the questions, I’m not too familiar with these commands or the file system.

No, the /etc/master needs two lines:

+auto.master
/- /etc/auto.nfs.shares --timeout 15 browse

The line starting with the + really means this line including the plus sign to be added.

Example from a system here:

Great, thank you very much for the clarification Jim. I’ll try again over the weekend and update on my progress.

Hi Jim,

Thank you very much for all of your help. I got the shares working with your instructions. I just missed the part of adding the files to the GUI in OSMC so I could access them.

Greg

1 Like