Delay in synchronizing different mounts

What is the problem you are having with rclone?

I have a mount of the same bucket on two different PCs. I notice there's a considerable delay of several minutes until changes are visible at the other end.
I guess it is just a matter of correct parameters and I would appreciate any help.
Changes made are immediately visible in the web-backend of the storage provider so it seems it is not an upstream issue but downstream. Unmounting and re-mounting updates the contents as well.

Run the command 'rclone version' and share the full output of the command.

rclone v1.59.0-beta.6093.6da352249

  • os/version: Microsoft Windows 10 Enterprise 21H2 (64 bit)
  • os/kernel: 10.0.19044.1682 (x86_64)
  • os/type: windows
  • os/arch: amd64
  • go/version: go1.18.1
  • go/linking: dynamic
  • go/tags: cmount

Which cloud storage system are you using? (eg Google Drive)

Contabo Object Storage (S3 compatible)

The command you were trying to run (eg rclone copy /tmp remote:tmp)

I tried either of below but they don't make a difference.
1.

rclone mount contabo:storage c:\inetpub\storage --config c:\Inetpub\rclone\config\rclone.conf --vfs-cache-mode full --vfs-cache-max-age 1s --vfs-cache-poll-interval 1s --cache-dir c:\Inetpub\rclone\cache

2.

rclone mount contabo:storage c:\inetpub\storage --config c:\Inetpub\rclone\config\rclone.conf --vfs-cache-mode full --poll-interval 10s --cache-dir c:\Inetpub\rclone\cache

The rclone config contents with secrets removed.

[contabo]
type = s3
provider = Other
access_key_id = ***
secret_access_key = ***
endpoint = eu2.contabostorage.com
acl = private

A log from the command with the -vv flag

1.

INFO  : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)

(repeats every second)
2.

2022/04/27 09:02:41 DEBUG : /: >Getattr: errc=0
2022/04/27 09:02:41 DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
2022/04/27 09:02:41 DEBUG : /: >Getattr: errc=0
2022/04/27 09:02:41 DEBUG : /: Opendir:
2022/04/27 09:02:41 DEBUG : /: OpenFile: flags=O_RDONLY, perm=-rwxrwxrwx
2022/04/27 09:02:41 DEBUG : /: >OpenFile: fd=/ (r), err=<nil>
2022/04/27 09:02:41 DEBUG : /: >Opendir: errc=0, fh=0x0
2022/04/27 09:02:41 DEBUG : /: Releasedir: fh=0x0
2022/04/27 09:02:41 DEBUG : /: >Releasedir: errc=0

(upon refreshing the explorer)

This is the parameter you want to adjust - it is how long rclone keeps the directory listings in memory.

--dir-cache-time duration   Time to cache directory entries for (default 5m0s)

I would remove these --vfs-cache-max-age 1s --vfs-cache-poll-interval 1s - the first controls the time to keep the cached files and the second the time to poll for changes which S3 doesn't support.

Note that you can use the rc to refresh the mount on demand with vfs/refresh

Thank you, @ncw, works like a charm.
(I was just playing around with those options... didn't keep them permanently.)

Is there any downside to set a low cache time duration?

1 Like

The lower cache time you set the more times rclone will list the directory. If you are paying for API transactions then that will cost you money, so set it as high as you can and still make your use case work.

@ncw, thank you for support, well understood now.

1 Like

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