When using rclone rc vfs/refresh recursive=true _async=true as the ExecStartPost of a rclone mount command, there are a lot of files that are not cached.
E.g. find /path/to/mount | wc -l with the above command enabled, I get 16173 as the no. of files.
However without the vfs/refresh command, I get 19633, although it takes nearly 5 mins. to run the command.
Sorry as my wording is a poor choice. There isn't actual size / stat information on a directory so it's not really relevant in a caching perspective. You are caching the file metadata along with the directory structure.
If you are mounting and only seeing 18414 items one time and remounting and seeing 19943 items, something is dreadfully wrong.
Have to look at some full debug logs with rclone.conf as well so you have to decide what you want to share or not if you want to get to the bottom of it. You can share with @ncw instead but without any data to look at, addressing it will be impossible.
My guess is that this is caused by duplicate file or directory names. Have you runrclone dedupe on the source?
There are several "shortcuts" in the drive, that contain the majority of files.
While I'm not sure about duplicates, I can confirm that I initially investigated this issue because there were missing files that I noticed in folders where there are no duplicates.
Yes:
agneev@falcon ~> rclone size mydrive:
Total objects: 17.758k (17758)
Total size: 38.582 GiB (41427170208 Byte)
agneev@falcon ~> rclone size /mnt/rc-mydrive
Total objects: 19.332k (19332)
Total size: 47.117 GiB (50591786300 Byte)
Have you got a single folder with missing files? We can run more tests on that if you have. I'd like to see the results of rclone lsf in that directory on the mount and on drive.
Running rclone dedupe --dry-run will at least tell you if you have duplicate file names.