Ubuntu NFS Server Problem

I think the vers=X is a client option, not a server option.

The NFS browser used to work with my Ubuntu server, I used it in the past on my older coreelec Kodi boxes. Im building a new coreelec Kodi box and now it doesnt work.

Sorry, you are right about it being a client option.
At least both servers seem to support NFS3 and NFS4.

Are you able to access the NFS share on your Ubuntu server from any other machine (e.g. from your CentOS server)?

Please try the following exports contents and restart your NFS server afterwards:
/MOVIES *(ro,insecure,no_subtree_check,no_root_squash)

If that doesn’t work, maybe your nfs server logs contain some useful information, why the connection fails.

sm is the ubuntu server. No problems mounting it from CentOS-7.

[root@centos7 /]# mount sm:/MOVIES /Z
[root@centos7 /]# mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
devtmpfs on /dev type devtmpfs (rw,nosuid,size=8142140k,nr_inodes=2035535,mode=755)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
.
.
.
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
nfsd on /proc/fs/nfsd type nfsd (rw,relatime)
sm:/MOVIES on /Z type nfs4 (rw,relatime,vers=4.1,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=192.168.100.245,local_lock=none,addr=192.168.100.241)
[root@centos7 /]# ls -1 /Z
007
101GOPRO
A-C
Animation
D-R
S-S
T-Z

Did you try the exports contents I’ve posted above?

root@supermicro:~# cat /etc/exports

/MOVIES *(ro,insecure,no_subtree_check,no_root_squash)

Nothing in your server logs while connecting from Kodi?
Are you able to mount it directly on the OS level (on the CE device)?

I was going to try that on an hour when I’m off work.

It works from the shell.

CoreELEC:~ # mkdir Z
CoreELEC:~ # mount 192.168.100.241:/MOVIES Z
CoreELEC:~ # ls Z
007
101GOPRO
A-C
Animation
D-R
S-S
T-Z

I installed LibreElec & OSMC on a RPi 3, both have the same issue, so this is probably a Kodi problem, not a problem specific to Coreelec.

Kodi is very picky about NFS share configurations.
Because it works on the OS, I would just permanently mount it there and use the local mount point in Kodi instead.

Where should I mount it to? I assume I can edit /etc/fstab & put the mounts in there.
I made a post to Kodi.tv forums, see if I get anything from them.

You could use a systemd service to mount it.

nano /storage/.config/system.d/storage-movies.mount

[Unit]
Description=nfs mount script
Before=kodi.service

[Mount]
What=192.168.100.241:/MOVIES
Where=/storage/movies
Options=
Type=nfs

[Install]
WantedBy=multi-user.target

Start it to test this service:
systemctl start storage-movies.mount

If it works enable it to start on boot:
systemctl enable storage-movies.mount

1 Like

I ssh’d to an old Kodi box that has the Ubuntu server mounted back when the NFS browser worked.
I dont see anything mounted from the Ubuntu server (from the mount command), yet it is playing content from /MOVIES.

Yes, because Kodi itself is using it as a source, which doesn’t need it to be mounted.
You can keep on playing around with your exports options (maybe user mapping is necessary), but the easy way would be the automatic mount using systemd.

So Kodi is actually doing the NFS mount, not the underlying OS, I get it.
I’ll try the systemd mount.
Thanks for your help & knowledge.
Im a UNIX/Linux Administrator w/ 25 years of experience, I love these Libreelec / OSMC / Coreelec dists that have Linux as the underlying OS, being able to ssh in & see whats going on in the background.

From the Kodi.tv forum...

In /storage/.kodi/userdata/sources.xml, add the mount points in the  <video> section.



<video>
    <default pathversion="1"></default>
    <source>
        <name>MOVIES</name>
        <path pathversion="1">nfs://192.168.100.241/MOVIES/</path>
        <allowsharing>true</allowsharing>
    </source>
</video>

According to forums @ kodi.tv the NFS browser is not likely going to be fixed anytime soon. The method in which they look for servers on the network has been patched by many linux distros as a security problem. In “Browse for New Share” you can “Add a New Share” with the IP of the server, path names, etc.

Okay, as long as directly inputting the IP of the server works, I don’t see a serious problem with it.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.