Kodi unable to see NFS shares
#1
Hello, My main issue is that I can't access NFS shares on Kodi.
I am in the middle of building a new server for my kodi set up including MYSQL library and NFS shares, My old server has been running for years. This time im trying to set up the new server a bit more in line with real server best practices. Anyway I have a fairly goood undertanding of linux and networking so i didnt think i was going to have a hard time, but iv run into an issue i can't seem to figure out. Anyway I will post all the relevant info i have maybe someone will see something i missed. Ill post in the second post below to make it easier to read.

So I can mount the NFS shares on another computer but no matter what i seem to change in the exports, fstab(host) or permissions i cant even see the host in kodi. I have set up the actual data and drives (as best as i can) to have open shared permissions and everything should work if i understand it, but i cant find is stopping me. I wanted to mention that this is currently running on a vm while testing
Reply
#2
fstab
Code:

#/etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system>                                  <mount point>     <type>   <options>           <dump>  <pass>
/dev/mapper/vgxubuntu-root                       /                  ext400  errors=remount-ro               0       1
# /boot/efi was on /dev/sda1 during installation
UUID=E1D3-CE05                                   /boot/efi          vfat    umask=0077                      0       1
/dev/mapper/vgxubuntu-swap_1 none                swap               sw                                      0       0


#Real UUIDs
#UUID=a415f869-4df5-447a-b90f-466acc36b885       /mnt/Multimedia    auto defaults,noexec,x-gvfs-show        0        2
#UUID=23b2a5ae-20bb-4a1f-8ce0-5d18c1abb457       /mnt/Storage       auto defaults,x-gvfs-show               0        2
#UUID=354F04EC43C74F67                           /mnt/Backup        auto suid,nodev,nofail,x-gvfs-show      0        0
#UUID=68470886-3d75-413b-b186-af58f04ea44f       /mnt/Probationary  auto suid,nodev,nofail,x-gvfs-show      0        0

#virtual machine install UUIDs
UUID=27d23ea9-1a4f-4c28-ab95-ad13172ed7c1        /mnt/Multimedia     auto defaults,noexec,x-gvfs-show        0       2
UUID=7B31D6EF7B80D6AE                            /mnt/Storage        auto nosuid,nodev,nofail,x-gvfs-show    0       0


#Bind mounts for NFS
/mnt/Multimedia     /srv/nfs/Multimedia       none   bind   0   0
/mnt/Storage        /srv/nfs/Storage          none   bind   0   0
/mnt/Backup         /srv/nfs/Backup           none   bind   0   0
/mnt/Probationary   /srv/nfs/Probationary     none   bind   0   0


Exports
Code:

# /etc/exports: the access control list for filesystems which may be exported
#               to NFS clients.  See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes       hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
#
# Example for NFSv4:
# /srv/nfs4        gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes  gss/krb5i(rw,sync,no_subtree_check)
#

#Exports
/srv/nfs                              192.168.2.0/24(rw,sync,nohide,no_subtree_check,insecure,crossmnt,fsid=0)
/srv/nfs/Multimedia                       192.168.2.0/24(rw,async,nohide,no_subtree_check,insecure,crossmnt)
/srv/nfs/Multimedia/Games                 192.168.2.0/24(rw,async,insecure,crossmnt,all_squash,anonuid=1000,anongid=1000)
/srv/nfs/Storage                          192.168.2.0/24(rw,async,insecure,crossmnt)
#/srv/nfs/Backup                          192.168.2.0/24(rw,async,insecure,crossmnt)
#/srv/nfs/Probationary                    192.168.2.0/24(rw,async,insecure,nohide,no_root_squash)

Directory Permissions and details
Code:

ketterer@Testsite:/srv/nfs$ ls -la
total 24
drwxrwxrwx 6 ketterer ketterer 4096 Apr 22 14:52 .
drwxr-xr-x 3 root     root     4096 Apr 22 14:52 ..
drwxrwxrwx 2 ketterer ketterer 4096 Apr 22 15:04 Backup
drwxrwxrwx 8 ketterer ketterer 4096 Apr 22 17:34 Multimedia
drwxrwxrwx 2 ketterer ketterer 4096 Apr 22 15:04 Probationary
drwxrwxrwx 1 root     root     4096 Apr 19 21:29 Storage

ketterer@Testsite:/mnt$ ls -la
total 24
drwxr-xr-x  6 root     root     4096 Apr 22 15:04 .
drwxr-xr-x 20 root     root     4096 Apr 22 12:42 ..
drwxrwxrwx  2 ketterer ketterer 4096 Apr 22 15:04 Backup
drwxrwxrwx  8 ketterer ketterer 4096 Apr 22 17:34 Multimedia
drwxrwxrwx  2 ketterer ketterer 4096 Apr 22 15:04 Probationary
drwxrwxrwx  1 root     root     4096 Apr 19 21:29 Storage


Showmount -e all exports
Code:

ketterer@Testsite:~$ showmount -e
Export list for Testsite:
/srv/nfs/Storage          192.168.2.0/24
/srv/nfs/Multimedia/Games 192.168.2.0/24
/srv/nfs/Multimedia       192.168.2.0/24
/srv/nfs                  192.168.2.0/24
Reply
#3
There are some combinations of clients/servers that have NFS browsing issues. When NFS connections are added manually in Kodi in sources.xml, they work fine.

I'm still on Ubuntu 16.04 on my office pc, and having Kodi browse for NFS on other 16.04 Ubuntu machine shares is currently not working.
When using LibreELEC to browse for those same NFS shares, those shares do pop up.
So I don't know which OS you are using on your server(s), but it's probably the Kodi client's OS that has the problem.

I use this in my NFS server: 192.168.1.0/24(rw,nohide,insecure,no_subtree_check,async,all_squash,anonuid=1000,anongid=1000)
Not saying it's the best option security-wise, but it has worked for me for years.
Reply
#4
Some time ago, i had similar problems.
As far as i can remember, it was a problem of different versions of the NFS-protocol. I had to choose an older protocol-version on the server to make the shares visible in Kodi.
Sorry for not getting more into details, but its long ago... Tongue
Reply
#5
Thanks guys ultimatly i think the solution is to manullly add the legacy nfs3 mountpoints for kodi and nfs4 psudo file system for everything else. at least in the test enviroment it is working (mostly lol im now having a scraping shows issue....if you want to help ill be posting a new post under scrapers)
Reply
#6
I'm assuming you are running a *buntu by that fstab. I'm wondering how this all works because I can browse my nfs shares just fine from Ubuntu based Kodi installation > Ubuntu server, either Xenial or Bionic. But could not browse them when I tried to use Debian when I got a new machine for my server. That and some issues with snapd not being new enough for current lxd snap led me to putting Ubuntu 18.04 server on it. Works just fine right now.
Reply
#7
NFS browsing may not be working in Kodi, but file streaming should still be okay. You can add the NFS source(s) manually to the file sources.xml as a quick&dirty solution.
Reply
#8
For what it's worth, I NFS-mount my NAS at OS level (using /etc/fstab) then symlink directories under Kodi's home directory to the mount points, e.g.:
  1. NAS:/music (server) is mounted under /media/music (kodi box)
  2. /home/kodi/music is symlinked to /media/music
... then Kodi adds a local folder path to its media libraries, looking at content "located" in its home directory.

I'm not saying I don't trust the Kodi implementation - I just use the underlying OS to manage networking (my thinking is that if it can't be done in the OS, it can't be done in Kodi) to provide the content to Kodi, rather than have Kodi handle the networking side.  So far it's proven pretty idiot-proof as the sources.xml doesn't really change between upgrades/migrations.
Reply
#9
(2020-04-25, 22:18)Preacher Wrote: For what it's worth, I NFS-mount my NAS at OS level (using /etc/fstab) then symlink directories under Kodi's home directory to the mount points, e.g.:
  1. NAS:/music (server) is mounted under /media/music (kodi box)
  2. /home/kodi/music is symlinked to /media/music
... then Kodi adds a local folder path to its media libraries, looking at content "located" in its home directory.

I'm not saying I don't trust the Kodi implementation - I just use the underlying OS to manage networking (my thinking is that if it can't be done in the OS, it can't be done in Kodi) to provide the content to Kodi, rather than have Kodi handle the networking side.  So far it's proven pretty idiot-proof as the sources.xml doesn't really change between upgrades/migrations. 
+1
Also using fstab mounts has the advantage that in-kernel handling of nfs is faster and more efficient than libnfs.
libnfs is good only for systems that can't handle nfs at os level.
Reply
#10
(2020-04-25, 22:56)asavah Wrote: libnfs is good only for systems that can't handle nfs at os level.
Heh.. I'll have to admit I did NFS and CifS mounts at OS level because... I struggled to navigate through the Kodi menus, but knew how to do them in a command line!

I know command line is not for everyone, but I've found things tend to return to normal after a power-cycle (outage, etc) easier.  I'm guessing the soft/bg mounts are taking care of remote connections and Kodi just waits for the OS to manage things in the background.

(there's also the point that I use remote storage for non-Kodi things, so made more sense to handle the mounting more "globally" at OS level rather than "locally" just for kodi)
Reply

Logout Mark Read Team Forum Stats Members Help
Kodi unable to see NFS shares0