--vfs-cache-mode full - couple of questions

With --vfs-cache-mode full, I’ve got a couple of questions:

  • when you unmount a remote, is cache cleared out? That is, is the disk space used immediately reclaimed?

  • what are the risks of any changes to files not being written back to the remote? If I unmount a mounted remote set to --vfs-cache-mode full, does rclone check there’s no changes waiting to be written to the remote before it unmounts?

No it is kept so it can be re-used if you start the mount again. If enough time has elapsed then mount will delete the cache when you start it (when the contents are older than --vfs-cache-max-age)

This is a risk at the moment - I haven’t figured out a good work-around. There is an issue about this: https://github.com/ncw/rclone/issues/1909 if you have any good ideas!
.

Just posted in the github issue - of the 2 issues in my original post, the 2nd one seems like the more important one.

Files being left in the cache on quitting is just a matter of disc space. There should definitely be some kind of check in place to ensure that rclone commits changes to the remote before quitting/unmounting, or is prevented from quitting/unmounting before local changes are written to the remote

1 Like