NFS not being seen

Does sudo systemctl status rpcbind report rpcbind as active running?


 Active: active (running) since Tue 2017-03-07 11:16:47 PST; 1h 25min ago

Could it be something simple I’m missing here, like a basic “do this first” kind of step?

I started with this guide (to share the library):
And it led me to this guide (to share the actual files):

I had this setup with my V2 (before I fried it) and I didn’t need help before. But it would be very like me to stumble over something super basic.

On the device which is serving your share (ie the one your hdd is plugged into) try running

sudo showmount -e

That will prove whether or not the entries in /etc/exports are actually being shared correctly.

If they are then try

sudo showmount -e IP.OF.SERVER on the client machine. That will determine if they’re visible. If they aren’t, ensure you have connectivity with ping -c5 IP.OF.SERVER

If you have connectivity and the first showmount was ok then try adding a line like this to the /etc/fstab file on the client:

IP.OF.SERVER:/mnt/hdd/Media /mnt/temp nfs x-systemd.automount,_netdev,nfsvers=3,rw,intr,noatime,rsize=32768,wsize=32768,nolock,async 0 0

then running the following on the client:

sudo mkdir /mnt/temp
sudo mount -a
cd /mnt/temp
ls -al

Thanks for the reply!

osmc@osmc:~$ sudo showmount -e
clnt_create: RPC: Program not registered

I was playing around with that a little bit last night, but I couldn’t find a good resolution for why its giving me that error. I double checked that NFS server and portmapper were installed and they seemed to be up to date (although portmapper is now rpcbind or something).

@yknivag Saw your post here: Some services failing to start at boot - #15 by yknivag
Even tried doing the sudo systemctl restart nfs-kernel-server command, but it doesn’t fix the problem so I don’t think its related to the timing issue that you had.

It will probably be the same issue. It arises because NFS still uses a file in /etc/init.d to start and systemd (the startup software used by OSMC) isn’t properly backwards compatible.

I used to fix this by adding a sleep command to the nfs-kernel file in init.d but this is no longer necessary in the RPi OSMC images (maybe newer systemd code).

The Vero 4K uses a different kernel though so you may need to do something similar.

Or you could do the following:

sudo nano /etc/rc.local

and add the following just above the exit 0 line

systemctl restart rpcbind
systemctl restart nfs-kernel-server

This will cause them to restart in the correct order at the end of the boot process.

I think everyone is a bit offtrack here. If I understand correctly, you want to have a MySQL database and your files on the Vero shared to your other system.

If I’m correct, then you don’t need to do anything other than add the shares to your fstab on the ‘slave’ system. Something like:

 kaled.local:/media/tardis /media/tardis nfs rw,user,auto,nofail

Just make sure that where you are mounting on the ‘slave’ is the same place you have it mounted in the master. The database stores the paths, so they have to match on all systems.

@yknivag I could try that, but even manually doing the systemctl restart command still yields the “RPC: program not registered” problem.

EDIT: Tried the init.d edit. No change in RPC error when using showmount -e

@bmillham You have my need pegged correctly. The problem is that the share does not appear to be visible to the slave system. In fact, I can’t even see it on the master system (showmount -e is failing).

EDIT: Tried it anyway. Still getting “mount.nfs: Connection timed out”.
Just for clarification it also pings fine.

osmc@Pi3:/mnt/hdd/Media$ ping -c5
PING ( 56 data bytes
64 bytes from seq=0 ttl=64 time=9.719 ms

@sam_nazarko Saw this line in the logs:

nfs-kernel-server[773]: Not starting NFS kernel daemon: no support in current kernel. 

Could that cause this kind of issue?

That’s weird. Is this on the Pi or Vero?


@sam_nazarko This is on the V4K.

I’m confused. I thought you were trying to share the drive from the Pi to the Vero 4K. You shouldn’t have nfs kernel server on the Vero 4K, it should be on the PI 3


Other way around. The V4K has the external HD attached. I’m trying to share those files (and the MySQL Library) to the PI 3.

My apologies if I did not make this clear.

Oh okay, that makes more sense. I just need to enable support for NFS in the kernel config I suspect. I’ll check this for you shortly.


1 Like


Hopefully the issue is now addressed with the following commit:

I’d appreciate it if you could test this and provide feedback before we release this as an update to other users. To test this update:

  1. Login via the command line
  2. Edit the file /etc/apt/sources.list
  3. Add the following line: deb jessie-devel main
  4. Run the following commands to update: sudo apt-get update && sudo apt-get dist-upgrade && reboot
  5. Your system should have have received the update.

Please see if the issue is resolved.

I also recommend you edit /etc/apt/sources.list again and remove the line that you added after updating. This will return you to the normal update channel.

@sam_nazarko Looks like you have found and fixed the issue! (kind of surprised I’m the first to report it).

Out of curiosity, when access a global file share is it best practice to “mount” an nfs source and then use the mounted directory or just add the NFS path to your library?

Thanks again for your help!

Use fstab to mount. Works much better that way.

1 Like

To expand on this more…

Using fstab gives you flexibility in your setup. Say your files are on SystemA, and you have ClientB.

On SystemA, make sure that the media drive is mounted to, for example


On ClientB, mount to the same place, /media/MyFiles

Now you want to move the files from SystemA to clientB. All you need to do is modify fstab and exports.

No need to worry about changing the MySQL database, since the files all appear in the same place.

The number of people that use an NFS server is quite low, particularly as it’s not part of the App Store.

fstab is the best solution as it has readahead (kernel). It’s also useful if you want to use the mount outside of Kodi, e.g. for downloading, sharing other files.