[Solved] Pi2 NFS share folder not persistent on reboot

Hi all.

Did a fresh install of Alpha 4 on new Pi2, ran the updates from the GUI and setup NFS sharing according to various forum posts and it all works… until I reboot and the NFS share mount folder disappears. So I recreate it and it all works until a reboot… lather,rinse, repeat. Am I missing something… besides the mount folder? :wink:


1 Like

A bit hard to tell when you haven’t provided much information.

What does your /etc/fstab file look like ?

You aren’t trying to mount your NFS share under /media by any chance ? If so don’t. Mount it under /mnt instead.

This is because we automatically remove any empty directories under /media during boot so that the automounter doesn’t clash with any previous mount directories that were left behind from an unclean shutdown. (Which would cause a removable drive to be mounted to a different location thus breaking Library entries that relied on the normal path to the removable drive)

Thanks @DBMandrake.

Well that would explain it. I was mounting under /media as per the directions in the forum posts mentioned. I will change that to /mnt.

Hmm… Still not quite there. The folder is present on reboot but the nfs share is not mounting at all now.


proc            /proc           proc    defaults         0       0
devpts          /dev/pts        devpts  rw,nosuid,noexec,relatime,gid=5,mode=620        0       0
/dev/mmcblk0p1  /boot    vfat     defaults,noatime    0   0
/dev/mmcblk0p2  /    ext4      defaults,noatime    0   0
XXX.XXX.XXX.XXX:/mnt/DroboFS/Shares/Media     /mnt/Media     nfs     noatime,async,nfsvers=3,rsize=8192,wsize=8192,nolock,local_lock=all,bg,soft,retrans=2,udp 0 0

Thanks again.

Your fstab line is almost word for word identical to one that I recommended on the old osmc/raspbmc forum for use with raspbmc - not with OSMC.

That’s why it doesn’t automount. Please see the following post for the correct mount options to automount in OSMC:


Right. Yes, it probably was originally from your optimizing NFS performance post.

Removed the bg option and added x-systemd.automount,noauto. It is mounting and persisting. Thanks @DBMandrake. I really do appreciate your help.


Glad to hear its working properly now.

Some advice for setting up NFS mounts (including using /mnt not /media, and the correct systemd options) should find its way into the Wiki by release day.

It seems to be a common issue because systemd requires different mount options than any other init system and the internet is full of NFS mount advice that is wrong for systemd…


Well at least we have you here to set us straight on the differences.

I look forward to seeing the updates to the Wiki and potentially, further talk of NFS optimization under OSMC. Now that I’ve been able to test it, I have been seeing some buffering, specifically when seeking within movies. Currently, SMB shares are performing better than NFS shares on my humble network. Seems a bit backwards to me, but we are still talking Alpha4, and admittedly, I am barefoot when it comes to NFS.

Thanks again, @DBMandrake

I have also noticed poor seeking performance over kernel mode (fstab) NFS - not sure what the cause is at the moment but it will be investigated.

Do you see the same problems with seeking if you connect using Kodi’s built in NFS client instead of going via your mount in /mnt ?

I haven’t yet tried the built-in NFS client as I was hoping that kernel mode would provide the same benefits as it did in RaspBMC but I will certainly try it when I return home this evening and provide an update.

Update: Well, I tried the built in NFS client (though I could only access the NFS share via the Zeroconf browser) and while initially it seemed a bit better on the first 10 minute forward seek, subsequent forward or backward seeks (either 10 minute or 30 second) were quite laggy and, I can only assume, buffering for some time as there is no indication of buffering in the OSMC skin, currently. So, there seems little performance difference between the built in NFS client and kernel mode, if at all.

Just adding this here in case anyone visits this post. I’ve run into problems mounting to /mnt/ with Kodi. As per Sam in this post /home/osmc/mnt is a better location. Can't browse sources in /mnt in root file system? - #5 by sam_nazarko

1 Like

Thanks for the update @spacemanspiff.

I will reconfigure with this new info when I return home and report my findings.

Edit: Made the suggested changes to the mount point but still experiencing the same performance issues mentioned above under NFS.


i did what was suggested and chose /home/osmc but i got this message instead /home/osmc/Torrents : ignored
i tried to mount using nfs because i have a hard drive which is formatted on that system and even have one for windows using cifs none of them worked for mounting.
i was getting permissiong denied on cifs before i added x-systemd.automoun to the equation after-which i’m getting : ignored message

Updated: I’ve had it worked now, i was using Tomato router as NFS server and i wasn’t using the right firmware after I flashed the one with nfs capability and followed the post above all went well and it working perfectly
thanks you all