No cache dir being created

I don’t see anything in the cache folder when requesting a file through the mounted cache. I have tried this for mounting:

rclone mount --config /home/peter/.config/rclone/rclone.conf --cache-db-path=/home/peter/.cache/rclone/cache-backend --log-file=/home/peter/rclone.log -vv --allow-other --allow-non-empty gdrive-media-cached: /mnt/media

I also tried adding it to rclone.conf:

[gdrive-cache]
type = cache
remote = gdrive:
db_path = /home/peter/.cache/rclone/cache-backend

According to the docs, chunks should appear here:

If you specify a custom location for “–cache-db-path” and don’t specify one for “–cache-chunk-path” then “–cache-chunk-path” will use the same path as “–cache-db-path”.

I have also not used the path setting at all, as its value would by default be the same as what I used above, but that also didn’t store any chunks on disk.

What am I missing?

The cache.db is stored in this location:

--cache-db-path string                       Directory to store file structure metadata DB. (default "/home/ncw/.cache/rclone/cache-backend")

The cache chunks would be stored here:

--cache-chunk-path string                    Directory to cache chunk files. (default "/home/ncw/.cache/rclone/cache-backend")

You’d want to change the cache-chunk-path to be where you want your chunks to be stored.

Not according to the section from the docs I quoted. If only db path is set, the chunk path will inherit that. But even without any parameters (so the defaults) I don’t see a cache dir being created anywhere on this machine (did on another, same config, same Ubuntu).

Can you share the log file with the debug of your output when you try the mount?

Can you try setting the chunk path and validate that works?

Here’s my log of your command working with that being set:

2018/10/22 12:07:19 DEBUG : rclone: Version "v1.44" starting with parameters ["rclone" "mount" "--cache-db-path=/tmp" "--log-file=/home/felix/test.log" "-vv" "--allow-other" "gcache:" "/home/felix/test"]
2018/10/22 12:07:19 DEBUG : Using config file from "/data/rclone/rclone.conf"
2018/10/22 12:07:20 DEBUG : gcache: wrapped GD:media at root
2018/10/22 12:07:20 INFO  : gcache: Cache DB path: /tmp/gcache.db
2018/10/22 12:07:20 INFO  : gcache: Cache chunk path: /tmp/gcache
2018/10/22 12:07:20 INFO  : gcache: Chunk Memory: true
2018/10/22 12:07:20 INFO  : gcache: Chunk Size: 5M
2018/10/22 12:07:20 INFO  : gcache: Chunk Total Size: 10G
2018/10/22 12:07:20 INFO  : gcache: Chunk Clean Interval: 1m0s
2018/10/22 12:07:20 INFO  : gcache: Workers: 4

And the cache.db and the chunk dir:

drwxrwxr-x 3 felix felix   4096 Oct 22 12:07 gcache
-rw-rw-r-- 1 felix felix     32 Oct 22 12:07 95tj3q4gj5ban13ppu0kisguco
-rw-r--r-- 1 felix felix  65536 Oct 22 12:07 gcache.db

The chunks downloaded when I copied a file:

felix@gemini:/tmp/gcache$ ls -alR
.:
total 28
drwxrwxr-x  3 felix felix  4096 Oct 22 12:07 .
drwxrwxrwt 22 root  root  20480 Oct 22 12:08 ..
drwxrwxr-x  2 felix felix  4096 Oct 22 12:07 95tj3q4gj5ban13ppu0kisguco

./95tj3q4gj5ban13ppu0kisguco:
total 12
drwxrwxr-x 2 felix felix 4096 Oct 22 12:07 .
drwxrwxr-x 3 felix felix 4096 Oct 22 12:07 ..
-rwxrwxr-x 1 felix felix   32 Oct 22 12:07 0

I’m going slightly crazy here: copied my config from the machine on which it works to the one on which it doesn’t, replaced keys and such, ended up with the exact same file and now it works. Must have added some invisible character somewhere that tripped the parser, or something like that. Anyway, I’ve got a cache dir. Thanks for the help :slight_smile:

Awesome. Happy it is working!