Zero size volume when mounting OneDrive SharePoint

What is the problem you are having with rclone?

image

I can still read and delete files. When copying files, the filesystem warns zero space.

What is your rclone version (output from rclone version)

1.53.1

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

Win10 64

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

onedrive

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

rclone mount ########: W: -vv --vfs-cache-mode full --cache-dir cache --log-file log.txt --debug-fuse

The rclone config contents with secrets removed.

[########]
type = onedrive
client_secret = ########
token = ########
drive_id = ########
drive_type = documentLibrary
client_id = ########
server_side_across_configs = true
no_versions = true

A log from the command with the -vv flag

DEBUG : rclone: Version "v1.53.1" starting with parameters ["rclone" "mount" "########:" "W:" "-vv" "--vfs-cache-mode" "full" "--cache-dir" "cache" "--log-file" "log.txt" "--debug-fuse"]
DEBUG : Creating backend with remote "########:"
DEBUG : Using config file from "########\\rclone.conf"
INFO  : One drive root '': poll-interval is not supported by this remote
DEBUG : vfs cache: root is "cache\\vfs\\########"
DEBUG : vfs cache: metadata root is "cache\\vfs\\########"
DEBUG : Creating backend with remote "cache\\vfs\\########"
DEBUG : fs cache: renaming cache item "cache\\vfs\\########" to be canonical "//?/D:/App/rclone/cache/vfs/########"
DEBUG : fs cache: switching user supplied name "cache\\vfs\\########" for canonical name "//?/D:/App/rclone/cache/vfs/########"
DEBUG : One drive root '': Mounting on "W:"
DEBUG : One drive root '': Mounting with options: ["-o" "fsname=########:" "-o" "subtype=rclone" "-o" "max_readahead=131072" "-o" "attr_timeout=1" "-o" "atomic_o_trunc" "-o" "debug" "-o" "uid=-1" "-o" "gid=-1" "--FileSystemName=rclone" "-o" "volname=########"]
INFO  : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
DEBUG : One drive root '': Init: 
DEBUG : One drive root '': >Init: 
DEBUG : /: Statfs: 
DEBUG : /: >Statfs: stat={Bsize:4096 Frsize:4096 Blocks:0 Bfree:0 Bavail:0 Files:1000000000 Ffree:1000000000 Favail:0 Fsid:0 Flag:0 Namemax:255}, errc=0
DEBUG : /: Getattr: fh=0xFFFFFFFFFFFFFFFF
DEBUG : /: >Getattr: errc=0
DEBUG : /: Readlink: 
DEBUG : /: >Readlink: linkPath="", errc=-40
The service rclone has been started.

Can you run this and report back what rclone prints please?

rclone about ########: -vv --dump bodies

It looks like something strange is being reported to rclone.

Thanks for helping !

Sure, here are the dumps:

DEBUG : rclone: Version "v1.53.1" starting with parameters ["rclone" "about" "########:" "-vv" "--dump" "bodies"]
DEBUG : Using config file from "D:\\App\\rclone\\rclone.conf"
DEBUG : Creating backend with remote "########:"
DEBUG : You have specified to dump information. Please be noted that the Accept-Encoding as shown may not be correct in the request and the response may not show Content-Encoding if the go standard libraries auto gzip encoding was in effect. In this case the body of the request will be gunzipped before showing it.
DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
DEBUG : HTTP REQUEST (req 0xc000444200)
DEBUG : GET /v1.0/drives/########/root HTTP/1.1
Host: graph.microsoft.com
User-Agent: rclone/v1.53.1
Authorization: XXXX
Accept-Encoding: gzip

DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
DEBUG : HTTP RESPONSE (req 0xc000444200)
DEBUG : HTTP/1.1 200 OK
Cache-Control: private
Client-Request-Id: ########
Content-Type: application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8
Date: Tue, 06 Oct 2020 17:58:01 GMT
Odata-Version: 4.0
Request-Id: ########
Strict-Transport-Security: max-age=31536000
Vary: Accept-Encoding
X-Ms-Ags-Diagnostic: {"########"}}

{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#drives('########')/root/$entity","createdDateTime":"########","id":"########","lastModifiedDateTime":"########","name":"root","webUrl":"########","size":2778236796,"parentReference":{"driveId":"########","driveType":"documentLibrary"},"fileSystemInfo":{"createdDateTime":"########","lastModifiedDateTime":"########"},"folder":{"childCount":5},"root":{}}
DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
DEBUG : HTTP REQUEST (req 0xc000276800)
DEBUG : GET /v1.0/drives/######## HTTP/1.1
Host: graph.microsoft.com
User-Agent: rclone/v1.53.1
Authorization: XXXX
Accept-Encoding: gzip

DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
DEBUG : HTTP RESPONSE (req 0xc000276800)
DEBUG : HTTP/1.1 200 OK
Cache-Control: private
Client-Request-Id: ########
Content-Type: application/json;odata.metadata=minimal;odata.streaming=true;IEEE754Compatible=false;charset=utf-8
Date: Tue, 06 Oct 2020 17:58:01 GMT
Odata-Version: 4.0
Request-Id: ########
Strict-Transport-Security: max-age=31536000
Vary: Accept-Encoding
X-Ms-Ags-Diagnostic: {"ServerInfo":{"########"}}

{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#drives/$entity","createdDateTime":"########","description":"########","id":"########","lastModifiedDateTime":"########","name":"Documents","webUrl":"########","driveType":"documentLibrary","createdBy":{"user":{"########"}},"lastModifiedBy":{"user":{"########"}},"quota":{"deleted":0,"remaining":0,"total":0,"used":0}}
2020/10/06 18:57:59 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Total:   0
Used:    0
Free:    0
Trashed: 0
2020/10/06 18:57:59 DEBUG : 5 go routines active

This is the problem.

It seems to say your quota is 0.

The docs say this

Which doesn't mention 0 as being a special value.

Maybe I should detect if they are all 0 and ignore them.

How does that sound?

I don't think it's quota problem because:

  1. copy/sync still works
  2. I can mount my personal drive with the same client ID without problem.

Something must have gone wrong when reading the quota for that SharePoint drive. Maybe I don't have permission ?

If the quota is not read, what value should you tell fuse about used/free space ? Is there a way to override the used/free space value (pushing -o to fuse) ?

Maybe the sharepoint API doesn't support it? It isn't mentioned in the docs though.

Try this which detects the all 0s returned by sharepoint and just returns unknown instead. I think this should fix the problem.

v1.54.0-beta.4812.321d5f6bf.fix-onedrive-about on branch fix-onedrive-about (uploaded in 15-30 mins)

image

Can confirm read/write works.

Thanks!

Thanks for testing.

I've merged this to master now which means it will be in the latest beta in 15-30 mins and released in v1.53.2

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