Can't read and write to file without --vfs-cache-mode >= minimal

Hi,

I just installed rclone and walked through the config. I'm on Linux FC30 and connecting to Google Drive (for Work). The mount worked well and I can see my files but I'm getting an error when trying to write to G Drive.

2019/09/26 10:37:31 ERROR : Keepass/PLC.kdbx: WriteFileHandle: ReadAt: Can't read and write to file without --vfs-cache-mode >= minimal
2019/09/26 10:37:31 ERROR : Keepass/PLC.kdbx: WriteFileHandle: Can't open for write without O_TRUNC on existing file without --vfs-cache-mode >= writes

I'm on pre-built 1.48.0. Whatever else is neede just ask. Thanks in advance.

That's an older version, you'd probably want to use the latest stable:

https://rclone.org/downloads/

The error message is saying for the way it's writing files, you need to add:

--vfs-cache-mode writes

to your mount command.

You can see info related to that here:
https://rclone.org/commands/rclone_mount/#file-caching

2 Likes

Wonderful! Figured I'd try the proper mount command before even updating the install and it just worked. That was quick! Thank you so much. (I'll update it now but wanted to be clear the solution was simply the proper mount command).

It helps to understand what the cache modes do (or rather what problems they remedy).

No cache caches nothing - and can download and upload files, but not a lot more than that. (accessing files in simple READ or WRITE mode)

Minimal cache caches only READ+WRITE opened files and can can therefore handle editing of existing files.

Write cache caches all files going to upload and has full compatibility. That is - the OS can ask this drive to do anything that a harddrive could. This makes it great for versatile all-purpose use. You can seek files, retry failed uploads and more. Of course, all that caching has some cost in needing some space to work with and introduces more load on your caching disk.

Minimal will generally fix all the most critical shortcomings in compatibility, but write is the most ideal if you can justify it. Write is also the "safest" if you aren't clear on the limitations - which can be quite technical to understand. Using the lowest mode that you need for your use-case would be most optimal, but I generally recommend just gong with write for most users because it's a catch-all solution,.

(more specifics details can be found in the documentation for mount - this is just a simplified and watered down explanation)

1 Like

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