Raspberry PI OS - mount Google Drive file type / size issue

What is the problem you are having with rclone?

I can successfully mount Google Drive locally and open some files, for example .pdf. But all .docx and .xlsx have size 0 bytes and type text document and cannot be opened from local mount.

What is your rclone version (output from rclone version)

1.55.1

Which OS you are using and how many bits (eg Windows 7, 64 bit)

Raspberry Pi OS 32 bit

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 mount remotePP: $HOME/mnt/GDrivePP --vfs-cache-mode >= minimal

The rclone config contents with secrets removed.

[remotePP]
type = drive
client_id = -redacted-
client_secret = -redacted-
scope = drive
token = {"access_token":"-redacted-","token_type":"Bearer","refresh_token":"-redacted-","expiry":"2021-05-17T12:28:49.584042066+01:00"}

A log from the command with the -vv flag

2021/05/17 12:02:41 DEBUG : Using config file from "/home/pi/.config/rclone/rclone.conf"
2021/05/17 12:02:41 DEBUG : rclone: Version "v1.55.1" starting with parameters ["rclone" "mount" "remotePP:" "/home/pi/mnt/GDrivePP" "--vfs-cache-mode" "minimal" "-vv"]
2021/05/17 12:02:41 DEBUG : Creating backend with remote "remotePP:"
2021/05/17 12:02:41 DEBUG : Google drive root '': root_folder_id = "0AHflgNV8qsz7Uk9PVA" - save this in the config to speed up startup
2021/05/17 12:02:41 DEBUG : vfs cache: root is "/home/pi/.cache/rclone/vfs/remotePP"
2021/05/17 12:02:41 DEBUG : vfs cache: metadata root is "/home/pi/.cache/rclone/vfs/remotePP"
2021/05/17 12:02:41 DEBUG : Creating backend with remote "/home/pi/.cache/rclone/vfs/remotePP"
2021/05/17 12:02:41 DEBUG : Google drive root '': Mounting on "/home/pi/mnt/GDrivePP"
2021/05/17 12:02:41 INFO  : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2021/05/17 12:02:41 DEBUG : : Root: 
2021/05/17 12:02:41 DEBUG : : >Root: node=/, err=<nil>
2021/05/17 12:02:41 DEBUG : /: Lookup: name="BDMV"
2021/05/17 12:02:42 DEBUG : /: >Lookup: node=<nil>, err=no such file or directory
2021/05/17 12:02:42 DEBUG : /: Attr: 
2021/05/17 12:02:42 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2021/05/17 12:02:42 DEBUG : /: Lookup: name=".xdg-volume-info"
2021/05/17 12:02:42 DEBUG : /: >Lookup: node=<nil>, err=no such file or directory
2021/05/17 12:02:42 DEBUG : /: Lookup: name="autorun.inf"
2021/05/17 12:02:42 DEBUG : /: >Lookup: node=<nil>, err=no such file or directory
2021/05/17 12:02:42 DEBUG : /: Lookup: name=".Trash"
2021/05/17 12:02:42 DEBUG : /: >Lookup: node=<nil>, err=no such file or directory
2021/05/17 12:02:42 DEBUG : /: ReadDirAll: 
2021/05/17 12:02:42 DEBUG : /: >ReadDirAll: item=32, err=<nil>
2021/05/17 12:02:42 DEBUG : /: Lookup: name=".Trash-1000"
2021/05/17 12:02:42 DEBUG : /: >Lookup: node=<nil>, err=no such file or directory
2021/05/17 12:02:42 DEBUG : /: Attr: 
2021/05/17 12:02:42 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2021/05/17 12:02:42 DEBUG : /: ReadDirAll: 
2021/05/17 12:02:42 DEBUG : /: >ReadDirAll: item=32, err=<nil>
2021/05/17 12:02:42 DEBUG : /: Attr: 
2021/05/17 12:02:42 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2021/05/17 12:02:42 DEBUG : /: ReadDirAll: 
2021/05/17 12:02:42 DEBUG : /: >ReadDirAll: item=32, err=<nil>
2021/05/17 12:02:42 DEBUG : /: Attr: 
2021/05/17 12:02:42 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2021/05/17 12:02:42 DEBUG : /: ReadDirAll: 
2021/05/17 12:02:42 DEBUG : /: >ReadDirAll: item=32, err=<nil>
2021/05/17 12:02:42 DEBUG : /: Attr: 
2021/05/17 12:02:42 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2021/05/17 12:02:42 DEBUG : /: ReadDirAll: 
2021/05/17 12:02:42 DEBUG : /: >ReadDirAll: item=32, err=<nil>
2021/05/17 12:02:42 DEBUG : /: Attr: 
2021/05/17 12:02:42 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2021/05/17 12:02:42 DEBUG : /: ReadDirAll: 
2021/05/17 12:02:42 DEBUG : /: >ReadDirAll: item=32, err=<nil>
2021/05/17 12:02:42 DEBUG : /: Attr: 
2021/05/17 12:02:42 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2021/05/17 12:02:42 DEBUG : /: ReadDirAll: 
2021/05/17 12:02:42 DEBUG : /: >ReadDirAll: item=32, err=<nil>
2021/05/17 12:02:42 DEBUG : /: Attr: 
2021/05/17 12:02:42 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2021/05/17 12:02:42 DEBUG : /: ReadDirAll: 
2021/05/17 12:02:42 DEBUG : /: >ReadDirAll: item=32, err=<nil>
2021/05/17 12:02:42 DEBUG : /: Attr: 
2021/05/17 12:02:42 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2021/05/17 12:02:42 DEBUG : /: ReadDirAll: 
2021/05/17 12:02:42 DEBUG : /: >ReadDirAll: item=32, err=<nil>
2021/05/17 12:02:42 DEBUG : /: Attr: 
2021/05/17 12:02:42 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2021/05/17 12:02:42 DEBUG : /: ReadDirAll: 
2021/05/17 12:02:42 DEBUG : /: >ReadDirAll: item=32, err=<nil>
2021/05/17 12:02:42 DEBUG : /: Attr: 
2021/05/17 12:02:42 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2021/05/17 12:02:42 DEBUG : /: ReadDirAll: 
2021/05/17 12:02:42 DEBUG : /: >ReadDirAll: item=32, err=<nil>
2021/05/17 12:02:42 DEBUG : /: Attr: 
2021/05/17 12:02:42 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2021/05/17 12:02:42 DEBUG : /: ReadDirAll: 
2021/05/17 12:02:42 DEBUG : /: >ReadDirAll: item=32, err=<nil>
2021/05/17 12:02:42 DEBUG : /: Attr: 
2021/05/17 12:02:42 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2021/05/17 12:02:42 DEBUG : /: ReadDirAll: 
2021/05/17 12:02:42 DEBUG : /: >ReadDirAll: item=32, err=<nil>
2021/05/17 12:02:42 DEBUG : /: Attr: 
2021/05/17 12:02:42 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2021/05/17 12:02:42 DEBUG : /: ReadDirAll: 
2021/05/17 12:02:42 DEBUG : /: >ReadDirAll: item=32, err=<nil>
2021/05/17 12:02:42 DEBUG : /: Attr: 
2021/05/17 12:02:42 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2021/05/17 12:02:42 DEBUG : /: ReadDirAll: 
2021/05/17 12:02:42 DEBUG : /: >ReadDirAll: item=32, err=<nil>
2021/05/17 12:02:42 DEBUG : /: Attr: 
2021/05/17 12:02:42 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2021/05/17 12:02:42 DEBUG : /: ReadDirAll: 
2021/05/17 12:02:42 DEBUG : /: >ReadDirAll: item=32, err=<nil>
2021/05/17 12:02:42 DEBUG : /: Attr: 
2021/05/17 12:02:42 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2021/05/17 12:02:42 DEBUG : /: ReadDirAll: 
2021/05/17 12:02:42 DEBUG : /: >ReadDirAll: item=32, err=<nil>
2021/05/17 12:02:42 DEBUG : /: Attr: 
2021/05/17 12:02:42 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2021/05/17 12:02:42 DEBUG : /: ReadDirAll: 
2021/05/17 12:02:42 DEBUG : /: >ReadDirAll: item=32, err=<nil>
2021/05/17 12:02:42 DEBUG : /: Attr: 
2021/05/17 12:02:42 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2021/05/17 12:02:42 DEBUG : /: ReadDirAll: 
2021/05/17 12:02:42 DEBUG : /: >ReadDirAll: item=32, err=<nil>
2021/05/17 12:02:42 DEBUG : /: Attr: 
2021/05/17 12:02:42 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2021/05/17 12:02:42 DEBUG : /: ReadDirAll: 
2021/05/17 12:02:42 DEBUG : /: >ReadDirAll: item=32, err=<nil>
2021/05/17 12:02:42 DEBUG : /: Attr: 
2021/05/17 12:02:42 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2021/05/17 12:02:42 DEBUG : /: ReadDirAll: 
2021/05/17 12:02:42 DEBUG : /: >ReadDirAll: item=32, err=<nil>
2021/05/17 12:02:42 DEBUG : /: Attr: 
2021/05/17 12:02:42 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2021/05/17 12:02:42 DEBUG : /: ReadDirAll: 
2021/05/17 12:02:42 DEBUG : /: >ReadDirAll: item=32, err=<nil>
2021/05/17 12:02:42 DEBUG : /: Attr: 
2021/05/17 12:02:42 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=<nil>
2021/05/17 12:02:42 DEBUG : /: ReadDirAll: 
2021/05/17 12:02:42 DEBUG : /: >ReadDirAll: item=32, err=<nil>
2021/05/17 12:02:42 DEBUG : /: Lookup: name="autorun.inf"
2021/05/17 12:02:42 DEBUG : /: >Lookup: node=<nil>, err=no such file or directory
2021/05/17 12:03:41 DEBUG : Google drive root '': Checking for changes on remote
2021/05/17 12:03:41 INFO  : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2021/05/17 12:04:41 DEBUG : Google drive root '': Checking for changes on remote
2021/05/17 12:04:41 INFO  : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2021/05/17 12:05:41 DEBUG : Google drive root '': Checking for changes on remote
2021/05/17 12:05:41 INFO  : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2021/05/17 12:06:41 DEBUG : Google drive root '': Checking for changes on remote
2021/05/17 12:06:41 INFO  : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)

This is covered in the docs

https://rclone.org/drive/#limitations-of-google-docs

Limitations of Google Docs

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

This is because rclone can't find out the size of the Google docs without downloading them.

Google docs will transfer correctly with rclone sync, rclone copy etc as rclone knows to ignore the size when doing the transfer.

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!

Thank you, I had missed that detail in the docs.

Copy has done the trick, now to experiment with mount and sync to see what suits my needs as the Google Drive contents don't get changed very often.

hi,

i have a pi.
i try to minimize disk usage as it is a sd card.
to copy files to/from the cloud, i use rclone sync, not rclone mount,

i run a rclone mount for my media server; i do not use vfs cache tho i do use --buffer-size
in testing, for streaming, i found no advantage to vfs cache.

Thank you. Looks like rclone sync is what I need.

Fortunately I don't have to worry about streaming (yet :slight_smile: )

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