Rclone Gdrive Cache

Hi, is it possible to use same cache location between two systems?


this has been discussed in the forum.
that rclone is not designed share a cache, even on the same system.

no idea really, but might try an experiment, if the cache was pointing to a read-only mount.

tho others users might have suggestions.

No, it's not meant to be shared and things would end up breaking.

Hi Hassan,

I could say definitively YES and definitively NO, depending on the assumptions I do about all the information you didn't fill out in the template. If you want a better answer, then please post all the requested info (except the debug log).

Thanks as always for guidance. Let me post the details and I hope that will give some more info.

I am using very similar to your service file and thanks for your guidance :innocent:


ExecStart=/usr/bin/rclone mount gdrive: /mnt/gdrive \
--dir-cache-time 9999h \
--log-file /home/ezio/.docker/appdata/rclone/rclone.log \
--log-level DEBUG \
--umask 002 \
--rc \
--rc-addr \
--rc-no-auth \
--cache-dir=/mnt/local/.rclone \
--vfs-cache-mode full \
--vfs-cache-max-size 10000G \
--vfs-fast-fingerprint \
--vfs-read-chunk-size 32M \
--vfs-write-back 1h \
--vfs-cache-max-age 9999h \
--vfs-read-ahead 1G \
--tpslimit 12 \
--tpslimit-burst 0 \
--bind \
ExecStop=/bin/fusermount -uz /mnt/gdrive
ExecStartPost=/usr/bin/rclone rc vfs/refresh recursive=true --rc-addr _async=true

rclone v1.61.1
- os/version: ubuntu 18.04 (64 bit)
- os/kernel: 4.15.0-197-generic (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.19.4
- go/linking: static
- go/tags: none

I had number of services accessing rclone cache on the same system without any issues but I thought should be okay to use the same cache on different system too but don't want to mess up :grinning: because cache is bit huge currently

Are you asking if you can execute the exact same command using the exact same remote (gdrive:) and then share the cache data in /mnt/local/.rclone?

If so, what are you trying to achieve by that?

Yes using the same command. But I can change cache mode if that works and that's what I am looking for the solution.

Cache has lot of files in the queue and I am looking to access those files without waiting for them to upload first.

Why start a new mount to do that?

I would expect them to be visible/accessible in the mount uploading them, that is /mnt/gdrive

Cache on Machine C
Machine A using Machine C cache
Machine B using Machine C cache (not setup yet)

I hope this will give some more info

I can understand C if a pure file server.

What do you want to achieve by having several machines?

Because I have two machines and number of services.

I am not sure I fully understand your situation, but guess you could do something like this:

Machine C having the cache on local disk, exeuting rclone mount and then sharing the mount (/mnt/gdrive)
Machine A (linux) mounting the mount folder (/mnt/gdrive) from C and running services on top of that
Machine B (linux) mounting the mount folder (/mnt/gdrive) from C and running services on top of that

That will make C a kind of rclone mount server.

I'd probably want to get the full use case and the why as sharing the cache out is just adding such a layer of complexity and the chance of blowing things up.

To use the cache, I'd imagine you'd have to run full on all the mounts and if something happened on one machine, it would break the cache for another machine.

If it's working, Godspeed as cache was built to be single use / not shared.

Agree and thats exactly what happened with me test setup. So I have decided to just installed the tge service on Machine A :slight_smile:

Thank you all for lookikg into this.

Perhaps I didn't explain well.

I did not suggest sharing the cache folder, which I fully agree would be hazardous and most likely break things at some point.

I suggested sharing the mount folder, such that is only a single rclone mount program running. This way the machines will indirectly share the cache content and thereby be able to see files not yet uploaded to the remote.

That is sharing /the/mount/folder over the network if this is the mount command:

rclone mount remote: /the/mount/folder --cache-dir=/the/cache/folder

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.