VFS Cache preventing GDrive mount

What is the problem you are having with rclone?

My storage quota on Google Drive has been exceeded, however I wanted to keep reading from it.
When attempting to mount though, the Google api is throwing Error 403 as vfs-cache is trying to write to the remote, regardless of which mode I choose to run it in.

I already looked for help on reddit where people recommended to delete everything in the cache folder. I am sceptical about this and saw on here that Nick suggested to use the--cache-db-purge flag. However, even if I cleared my cache now it would just fill itself back up again and lead to future errors when attempting to upload again, right?

So should I purge and set max-size to 0G, not specifying any cache directory, or what is the correct way to go about this?

Thanks for your help!

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

v1.60.0

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

Google Drive

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

/usr/bin/rclone mount \
  --config=/home/user/.config/rclone/rclone.conf \
  --log-level=INFO \
  --log-file=/opt/rclone/logs/rclone-mount.log \
  --user-agent=rclonedrive \
  --umask=002 \
  --gid=1000 \
  --uid=1000 \
  --allow-other \
  --timeout=1h \
  --poll-interval=15s \
  --dir-cache-time=1000h \
  --cache-dir=/opt/rclone/cache/gmedia \
  --vfs-cache-mode=full\
  --vfs-cache-max-size=40G \
  --vfs-cache-max-age=12h \
  gdrive-media-crypt: /mnt/gmedia-cloud

Start with updating your rclone - you are using really old one.

As your remote does not allow any writes the simplest solution is to mount it as read-only but supplying --read-only flag.

Leave cache options on - it will still cache reads making everything much more snappier.

Okay I just tried both. My rclone version is now 1.64.2, the service file looks as follows:

[Unit]
Description=Gmedia RClone Mount Service
After=network-online.target

[Service]
Type=notify
ExecStart=/usr/bin/rclone mount \
  --config=/home/cp/.config/rclone/rclone.conf \
  --log-level=INFO \
  --log-file=/opt/rclone/logs/rclone-mount.log \
  --user-agent=rclonedrive \
  --umask=002 \
  --gid=1000 \
  --uid=1000 \
  --allow-other \
  --timeout=1h \
  --poll-interval=15s \
  --dir-cache-time=1000h \
  --cache-dir=/opt/rclone/cache/gmedia \
  --read-only \
  --vfs-cache-mode=full\
  --vfs-cache-max-size=40G \
  --vfs-cache-max-age=12h \
  gdrive-media-crypt: /mnt/gmedia-cloud
ExecStop=/bin/fusermount -uz /mnt/gmedia-cloud
Restart=on-abort
RestartSec=5
StartLimitInterval=60s
StartLimitBurst=3

[Install]
WantedBy=multi-user.target

I also reloaded the daemons. Unfortunately I still run into a timeout when starting the service. Logs have not changed.

2023/11/15 14:57:00 ERROR : movies/<moviename>.nfo: vfs cache: failed to upload try #2, will retry in 20s: vfs cache: failed to transfer file from cache to remote: googleapi: Error 403: The user's Drive storage quota has been exceeded., storageQuotaExceeded

Can you change cache location? e.g. to

--cache-dir=/opt/rclone/cache/gmedia1

I think you have to create this folder first.

It will make sure that there are no some weird remaining stuff in old cache pending upload.

And if still does not work change:

  --log-level=INFO \
  --log-file=/opt/rclone/logs/rclone-mount.log \

to

  --log-level=DEBUG \
  --log-file=/opt/rclone/logs/rclone-mount-debug.log \

and post rclone-mount-debug.log here

Thank you, this solved my problem!

Just out of curiousity: would the outcome have been different if I had just deleted all the contents of the old cache folder? I think I read somewhere here on the forum that people were advised not to do so.

Yes. Outcome would be the same.

Risk is that maybe there is still some content in the cache pending upload - in such case you would lose these files. Obviously in your situation it is not really relevant... as nothing can be uploaded anyway.

Keep --read-only flag on - it will ensure that nothing even by chance is saved in cache with the purpose of uploading. It will keep your log error free:)

For read only cache all its content is ephemeral. You can delete cache any time. If item is in cache rclone will use it - if not it will be downloaded.

If you delete the cache folder, you LOSE all data that has not been uploaded so it should be used with some certainty that you will lose your data not uploaded.

That's generally why it's not recommended. If you are sure and/or don't care about the data, delete away at your own risk.

Understood. Thanks for the reply!

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