Unable to force a vfs refresh on a newly created subdirectory (eg: TV/Showname/Season Number) (unable to vfsrefresh the Season Number folder - if that was newly created)
Note: that I have had to do the vfs/forget to maintain the --dir-cache-timeout in my mount command. you do not need to do the vfs/forget if you do not have the --dir-cache-timeout
To me, this makes sense, because you created a new folder outside of the static, read-only mount which you then run refresh against. How would Rclone know in this case that the folder exists? For your use case, it's probably better you use a writeable mount with the default poll interval, so that changes are reflected before you run refresh.
Come to think of it, the mount doesn't have to be writeable for this to work. Simply change --poll-interval from 0 to something that suits your needs (e.g. 15s), and then set your script to wait slightly longer (e.g. 20s) to trigger the refresh. That should do the trick.
EDIT: If you end up making your mount writeable, make sure you also remove --no-checksum.
Setting the polling to 0 cripples a lot of things like using a high dir cache.
If you remove it or leave it at the default, you don't need to do all the things you are doing and it'll pick up changes by itself on the poll interval.
There's no reason to refresh the mount each time you add something.
Thanks guys completely understand.
My assumption was that:
we mount gdrive with no polling and read only.
we create a folder separately in gdrive.
we do a vfs refresh to update "just that folder" (to save updating the whole cache)
that folder is now available in cache.
with --dir-cache-timeout set with the mount to a long period (like 5000h) you can not vfs/refresh just that directory. however you can refresh it, if you do a vfs/forgetfirst, then a vfs/refresh. seemed to me that a logic set had broken there but if that's the way it is by design then no probs.
That's how I understood your post from last night, yeah. Although it still doesn't make sense to me that a mount that doesn't poll, with a folder created externally, would be able to refresh that particular folder. How does Rclone know of the new folder, even with vfs/forget?
The way I do it, I add to and create on an entirely different mount, and then later run a refresh on the static mount as a whole. Doing so allows refresh to recognize any and all external changes, even if I don't unmount and remount first (as it should).
[quote="VBB, post:11, topic:28412"]
The way I do it, I add to and create on an entirely different mount, and then later run a refresh on the static mount as a whole.......
[/quote] yeah that's right, and it works perfectly fine. For simplicity I also drop into the same gdrive through a different mount too.
I was trying to (and now can with the vfs/forget) just update the single folder and folder contents rather than the whole cache.
because this happens on a per episode/movie, I can get almost instant availability in plex for anything that gets finished uploading. While your vfs refresh takes "about 10 mins" (or there abouts) I can get a refresh done in about 5/10 seconds.
Your word choices there a bit loose. There can be many working solutions to a problem as mine try to follow the "KISS" concept.
I can make my remote not poll and do many steps to make it work but I'd rather do 0 steps to make it work if it takes 5 seconds longer as more steps == more chances for things to break in the process.
I have used Google Drive for a few years now and my setup for my use case requires very little human interaction ever as it's simplistic but robust.