Serving Google Drive remote including Google Docs via NFS

What is the problem you are having with rclone?

We're trying to provide access to a shared Google Drive through rclone's new NFS serving feature. Unfortunately, support for Google Docs/Sheets/etc. seems to be lacking. Files are reported as empty (this is expected behavior with how the integration works), but attempting to read them also yields an empty result, so it appears like rclone isn't attempting to perform the configured export operation when accessing the file via NFS.

I tried this both with and without the --vfs-cache-mode=full option.

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

rclone v1.65.0
- os/version: alpine 3.18.4 (64 bit)
- os/kernel: 5.15.0-75-generic (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.21.4
- go/linking: static
- go/tags: none

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)

rclone serve nfs google-drive: --addr 0.0.0.0:2049 --vfs-cache-mode=full

Subsequently, a read (e.g. cat /mnt/rclone-nfs/sheet.xlsx) on some system that has the NFS share mounted.

Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

[google-drive]
type = drive
scope = drive
service_account_file = /etc/rclone/config/service-account.json
team_drive = XXX
export_formats = xlsx
import_formats = xlsx

A log from the command that you were trying to run with the -vv flag

2023/11/30 08:23:55 DEBUG : rclone: Version "v1.65.0" starting with parameters ["rclone" "serve" "nfs" "google-drive:" "--addr" "0.0.0.0:2049"]
2023-11-30T08:23:55.899536878Z 2023/11/30 08:23:55 DEBUG : Creating backend with remote "google-drive:"
2023-11-30T08:23:55.899603290Z 2023/11/30 08:23:55 DEBUG : Using config file from "/etc/rclone/config/rclone.conf"
2023-11-30T08:23:56.201491397Z 2023/11/30 08:23:56 NOTICE: NFS Server running at [::]:2049
2023/11/30 08:29:59 DEBUG : : OpenFile: flags=O_RDONLY, perm=----------
2023-11-30T08:29:59.252356813Z 2023/11/30 08:29:59 DEBUG : : >OpenFile: fd=/ (r), err=<nil>
2023/11/30 08:29:59 DEBUG : : OpenFile: flags=O_RDONLY, perm=----------
2023-11-30T08:29:59.898211411Z 2023/11/30 08:29:59 DEBUG : : >OpenFile: fd=/ (r), err=<nil>

As per docs:

Google docs will appear (...) as size 0 in anything which uses the VFS layer, e.g. rclone mount and rclone serve.

However an unfortunate consequence of this is that you may not be able to download Google docs using rclone mount. If it doesn't work you will get a 0 sized file. If you try again the doc may gain its correct size and be downloadable. Whether it will work on not depends on the application accessing the mount and the OS you are running - experiment to find out if it does work for you!

So all works as intended.

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