Newly added files not showing until reboot

Not sure exactly when this started, but I noticed today that if I add new files to my shares, they wont show up on the device until I reboot it. I did the februari update the same day it was released, and I went from the browse NFS share to fstab mounting a few days before that. I have my NFS shares mouted with fstab (I followed this guide: Configuring fstab based NFS share mounts) . So, I keep my device always on. The shares are on my PC. If I add a number of files, the library update dont pick them up. And if I check in file browser they dont show up there either. Until I reboot the device. Then they are found both by library update and showing in file manager. Other than that files are playing and everything else is fine. Its weird, its like the fstab mounts dont refresh until reboot.

Here is a log of the reboot, if that helps:

https://paste.osmc.tv/axazanuvux

Instead of rebooting the Vero, if you reboot the PC do they show? It sounds like an issue on your PC as I have NFS mounted drives and newly added files show up immediately on my Vero.

What are you using on the PC to do the NFS shares?

I doubt that it would make a difference, but you could try adding rw,user to your fstab:

192.168.1.227:/Test /mnt/Test	nfs	rw,user,noauto,x-systemd.automount 0 0

(Leave the rw off if you don’t want the mount writeable)

I am using haneWIN NFS server for sharing. I tried rebooting the PC, it had no effect, the problem remains. I also tried just restarting the NFS server, it had no effect. Rebooting OSMC is the only thing that helps.

I then tried adding the share back the old method, using the kodi built in NFS share manager. That one works normally, it get refreshed and the new files show with no reboot. So I think the isssue is not with my haneWIN NFS share, but with the fstab mount.

I will test adding user to fstab, since I am sharing my files with readonly in haneWIN.

Edit. Adding user to fstab did nothing. No new files being shown.

@nixpix Could you provide the output of

findmnt --verbose -u /mnt/Test

so we can see what options went active for this mount point?

This is the output. I removed user from fstab before, since it had no effect.

TARGET SOURCE FSTYPE OPTIONS
/mnt/Test systemd-1 autofs rw,relatime,fd=39,pgrp=1,timeout=0,minproto =5,maxproto=5,direct
/mnt/Test 192.168.1.227:/Test nfs rw,relatime,vers=3,rsize=8192,wsize=8192,na mlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.1.227,moun tvers=3,mountport=1058,mountproto=udp,local_lock=none,addr=192.168.1.227

Mmmhh, so the haneWIN NFS server seems to not support NFS version 4 dialects but support for version 3 + TCP; in my experience the most NFS version 3 servers negotiate UDP.

Can you change the /mnt/Test line in your fstab and bring in the 2 options defaults and proto=udp?

So it looks like similar to

192.168.1.227:/Test /mnt/Test	nfs	defaults,proto=udp,noauto,x-systemd.automount 0 0

If this does not help, remove the changes; but then I’m running out of ideas.

Last idea in case the proto=udp has no effect:

192.168.1.227:/Test /mnt/Test nfs defaults,lookupcache=none,noauto,x-systemd.automount 0 0

This completely deactivates the client NFS cache; in case this also has no effect if you change files on the server side, you should contact the developer of this haneWIN NFS software or take another solution.

No sorry it did not help. And also, I can through my Kaspersky network monitor that hanewin/osmc is uing TCP, regardless of the last proto=udp.

Edit. The strange this is it has been working, it started not working yesterday. So it did work when I initially setup fstab, that was before I did the febrary update. And since then, some days after the update I noticed it wasnt working properly.

See my last post above.

Nope still not working :expressionless:

But, how come it worked like 2 weeks, and for a few days after I did the february update? And how come when browsing through kodis NFS share manager it works? My logic says then the nfs server is doing what it should? Or am I missing something?

What I did is (timeline):

  1. Bought the device
  2. Setup up shares via kodi built in nfs share manager - All working
  3. Realised fstab gave better performance
  4. Switched to fstab - All working for maybe 10 days
  5. Did the february update - All working
  6. A few days later (yesterday) it stops working

Edit. I have had a couple power outages in my livingroom due to a faulty circuit breaker, so the device has had a few inproper shutdowns. Could that have screwed something up? Should I reinstall OSMC?

Library could be corrupt. Try deleting MyVideos.db

But the file manager doesnt show the files? And thats not using the library? And the files dont show up using SSH either, until I reboot the device.

Before re-installing the Vero, collect again some logs:

  1. enable debugging (all flags, expert view) at settings->system->logging
  2. reboot the Vero
  3. visit with the file browser a directory on the nfs share
  4. jump back to the main menu and bring in some new files in this directory on the server
  5. again visit with the file browser the directory
  6. upload logs using the MyOSMC method or grab-logs -A and provide the URL here

The directory name/path and name of new files will help to look into the data.

The file that existed from start in the folder/share is named “jellyfish-60-mbps-hd-h264.mkv”. Its in share name Test (192.168.1.227:/Test /mnt/Test). And the actual file path to it is E:\Temp. This file is shown in Kodi file manager.

Then I added a file named “imax.mkv” to that folder/share. This file is not shown in kodi file manager, or via SSH (same thing I guess hehe)

https://paste.osmc.tv/tefevateli

Don’t know if it help or not, but here is a log when I access the same folder/share, but through the built in nfs share manager. Where the newly added file shows normally, with no reboot.

https://paste.osmc.tv/nojalenuvo

Just an observation. You have NFS shares via Kodi and via fstab to the same data source. For example:

<path pathversion="1">nfs://192.168.1.227/Test/</path>

and

192.168.1.227:/Test /mnt/Test	nfs	noauto,x-systemd.automount 0 0

and

<path pathversion="1">nfs://192.168.1.227/media/## Calibrate HD ##/</path>
<path pathversion="1">nfs://192.168.1.227/media/## Demos ##/</path>

and

192.168.1.227:/media /mnt/Media	nfs	noauto,x-systemd.automount 0 0

In such a situation, the results might well be unpredictable.

Yeah I know.

nfs://192.168.1.227/Test/ - Was added for testing purposes to see wether the files show up using a different method of accessing the same share. Which they do, accessing via fstab dont show newly added files since last reboot, while accessing the same share through nfs share mamanger does show added files.

And the other ones were so I could access content that was not included in the library, through File manager, prior to me setting up fstab. I have now removed all of them. All that is left is fstab mounts + Test share via share manager. It made no difference removing them.

The only unusual things I see in the logs are the strange directory names like ## Demos ##etc … but no errors regarding nfs, cache, file system, whatever.

Just to be sure: If you place new files on the nfs server into such a directory, login via SSH (no mediacenter action) into the Vero and change to the directory, you do not see the new files.

Yeah I know the folder names are a bit odd haha,. but it has been working for +5 years of kodi, so I saw no reason to change it. Didn’t know about the files not showing via SSH tho. But I have been checking on both the device itself and SSH every time. And the /mnt/Test is not named weirdly.

This is really weird and starting to freak me out. I don’t undertstand it at all. I mean the files are all in the same folder. And when accessing the share, the files in that folder should just “be there”, so why the **** arent newly added shown. I have little to no experience with Linux, but in a windows environment this sounds like the mount/share isn’t “refreshed” in realtime, but only at boot. If that makes sense.

Edit. I was wrong, stuff being deleted from the library do get removed.