Rclone mount with Google Drive

Hi

I'm trying to mound my GDrive with rclone using :
rclone mount gdrive: /mnt/gdrive

It looks ok but lot of files have a 0 size and looks empty when I try to copy them

I get sucessfully the same files with rclone copy thus I think the gdrive: configuration is OK

What am I doing wrong ?

Thx

what version? rclone version

Show us what you mean and a -vv log?

Sorry, I'm using 1.47 on a debian host

Here is the log (I mounted the drive and dit a cp of a google sheet to my local drive, the resulting target file is empty) :

2019/05/22 13:28:10 DEBUG : rclone: Version "v1.47.0" starting with parameters ["rclone" "-vv" "mount" "gdrive:" "/mnt/gdrive"]
2019/05/22 13:28:10 DEBUG : Using config file from "/xxxx/xxxx/.config/rclone/rclone.conf"
2019/05/22 13:28:10 DEBUG : Google drive root '': Mounting on "/mnt/gdrive"
2019/05/22 13:28:11 DEBUG : Adding path "vfs/forget" to remote control registry
2019/05/22 13:28:11 DEBUG : Adding path "vfs/refresh" to remote control registry
2019/05/22 13:28:11 DEBUG : Adding path "vfs/poll-interval" to remote control registry
2019/05/22 13:28:11 DEBUG : : Root:
2019/05/22 13:28:11 DEBUG : : >Root: node=/, err=
2019/05/22 13:28:13 DEBUG : /: Lookup: name="My Folder"
2019/05/22 13:28:14 DEBUG : /: >Lookup: node=My Folder/, err=
2019/05/22 13:28:14 DEBUG : My Folder/: Attr:
2019/05/22 13:28:14 DEBUG : My Folder/: >Attr: attr=valid=1s ino=0 size=0 mode=drwxr-xr-x, err=
2019/05/22 13:28:14 DEBUG : My Folder/: Lookup: name="toto.xlsx"
2019/05/22 13:28:14 DEBUG : My Folder/: >Lookup: node=My Folder/toto.xlsx, err=
2019/05/22 13:28:14 DEBUG : My Folder/toto.xlsx: Attr:
2019/05/22 13:28:14 DEBUG : My Folder/toto.xlsx: >Attr: a=valid=1s ino=0 size=0 mode=-rw-r--r--, err=
2019/05/22 13:28:14 DEBUG : My Folder/toto.xlsx: Open: flags=OpenReadOnly
2019/05/22 13:28:14 DEBUG : My Folder/toto.xlsx: Open: flags=O_RDONLY
2019/05/22 13:28:14 DEBUG : My Folder/toto.xlsx: >Open: fd=My Folder/toto.xlsx (r), err=
2019/05/22 13:28:14 DEBUG : My Folder/toto.xlsx: >Open: fh=&{My Folder/toto.xlsx (r)}, err=
2019/05/22 13:28:14 DEBUG : &{My Folder/toto.xlsx (r)}: Read: len=4096, offset=0
2019/05/22 13:28:14 DEBUG : My Folder/toto.xlsx: ChunkedReader.openRange at 0 length 134217728
2019/05/22 13:28:17 DEBUG : My Folder/toto.xlsx: ChunkedReader.Read at 0 length 4096 chunkOffset 0 chunkSize 134217728
2019/05/22 13:28:17 DEBUG : My Folder/toto.xlsx: ChunkedReader.Read at 4096 length 8192 chunkOffset 0 chunkSize 134217728
2019/05/22 13:28:17 DEBUG : My Folder/toto.xlsx: ChunkedReader.Read at 12288 length 16384 chunkOffset 0 chunkSize 134217728
2019/05/22 13:28:17 DEBUG : My Folder/toto.xlsx: ChunkedReader.Read at 28672 length 32768 chunkOffset 0 chunkSize 134217728
2019/05/22 13:28:17 DEBUG : My Folder/toto.xlsx: ChunkedReader.Read at 61440 length 65536 chunkOffset 0 chunkSize 134217728
2019/05/22 13:28:17 DEBUG : My Folder/toto.xlsx: ChunkedReader.Read at 126976 length 131072 chunkOffset 0 chunkSize 134217728
2019/05/22 13:28:17 DEBUG : My Folder/toto.xlsx: ChunkedReader.Read at 258048 length 262144 chunkOffset 0 chunkSize 134217728
2019/05/22 13:28:17 DEBUG : My Folder/toto.xlsx: ChunkedReader.Read at 520192 length 524288 chunkOffset 0 chunkSize 134217728
2019/05/22 13:28:17 DEBUG : &{My Folder/toto.xlsx (r)}: >Read: read=4096, err=
2019/05/22 13:28:17 DEBUG : &{My Folder/toto.xlsx (r)}: Flush:
2019/05/22 13:28:17 DEBUG : &{My Folder/toto.xlsx (r)}: >Flush: err=
2019/05/22 13:28:17 DEBUG : &{My Folder/toto.xlsx (r)}: Release:
2019/05/22 13:28:17 DEBUG : My Folder/toto.xlsx: ReadFileHandle.Release closing
2019/05/22 13:28:17 DEBUG : My Folder/toto.xlsx: ChunkedReader.Read at 1044480 length 1048576 chunkOffset 0 chunkSize 134217728
2019/05/22 13:28:17 DEBUG : &{My Folder/toto.xlsx (r)}: >Release: err=

It looks to have copied it down fine. Is it zero bytes? or when you open the file is it just 'empty' in whatever program you are using?

Can you provide:

rclone lsl gdrive:"My Folder/toto.xlsx"

ls -l /the/local/file//toto.xlsx

The file is empty 0 bytes :

-rw-r--r-- 1 xxx xxx 0 May 22 13:28 /tmp/toto.xlsx

The rclone lsl gives

   -1 2019-05-22 12:50:34.511000000 toto.xlsx

rclone copy gives a good file :

-rw-r--r-- 1 xxx xxxx 2745299 May 22 12:50 toto.xlsx

I think that is happening because those files are 'google docs' and not regular files. I can recreate that fine by copying from the mount.

https://rclone.org/drive/#import-export-of-google-documents

You may want to try to specify the export formats specifically. See if that helps? I would think this is a bug because the default should be used for docx/xlsx per the doc.

EDIT: That didn't work either specifying the --drive-export-formats..

On the 'con' side, if you do this and edit these directly from the mount, they will be re-imported and since its 'lossy' this may not be what you want anyway.

@ncw Is this a known issue on a mount? I couldn't find an issue for this.

Found it.

https://rclone.org/drive/#limitations

" 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 can’t download Google docs using rclone mount - you will get a 0 sized file. If you try again the doc may gain its correct size and be downloadable."

root@xxxx:~/test# cp "NS xxxx.docx" /tmp/; ls -l /tmp/*docx
-rw-r--r-- 1 root root 0 May 22 10:46 /tmp/NS xxxx.docx
root@xxxx:~/test# cp "NS xxxx.docx" /tmp/; ls -l /tmp/*docx
-rw-r--r-- 1 root root 297796 May 22 10:46 /tmp/NS xxxx.docx

Thx. Thus, I can't do my backups that way.

Thx !

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