Using --use-mmap flag with a OneDrive business mount breaks it

What is the problem you are having with rclone?

I'm trying to use rclone mount with vfs along Microsoft OneDrive Business. I currently use Google Drive and have a copy of my data in OneDrive in case I need it, I'm testing to confirm I can use OneDrive as a failover if I ever need. Using the --use-mmap flag on Google Drive works great, but with OneDrive it slows down the whole machine and lot of commands won't work. Seems a problem with fuse layer as even df -h will hang.

What is your rclone version (output from rclone version)

rclone version

rclone v1.53.3

  • os/arch: linux/amd64
  • go version: go1.15.5

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

CentOS Linux release 7.9.2009 (Core) X64

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

Microsoft OneDrive Business

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

/usr/bin/rclone mount Crypt: /mnt/Site \
--allow-other \
--cache-dir /gcache/ \
--dir-cache-time 1000h \
--log-file /root/mount.log \
--log-level INFO \
--rc \
--rc-addr \
--uid 1000 \
--use-mmap \
--vfs-cache-max-age 336h \
--vfs-cache-max-size 50G \
--vfs-cache-mode full \
--vfs-read-chunk-size 32M

The rclone config contents with secrets removed.

type = onedrive
client_id = xxx
client_secret = xxx
token = {"access_token": xxx
drive_id = xxxx
drive_type = business

type = crypt
remote = OneD:Site
filename_encryption = obfuscate
directory_name_encryption = true
password = xxx
password2 = xxx

A log from the command with the -vv flag

2021/01/18 23:58:22 DEBUG : rclone: Version "v1.53.3" starting with parameters ["rclone" "mount" "Crypt:" "/mnt/Site" "--allow-other" "--cache-dir" "/gcache/" "--uid" "1000" "--vfs-cache-max-age" "336h" "--vfs-cache-max-size" "50G" "--vfs-cache-mode" "full" "--vfs-read-chunk-size" "32M" "--use-mmap" "-vv"]
2021/01/18 23:58:22 DEBUG : Creating backend with remote "Crypt:"
2021/01/18 23:58:22 DEBUG : Using config file from "/root/.config/rclone/rclone.conf"
2021/01/18 23:58:22 DEBUG : Creating backend with remote "OneD:Site"
2021/01/18 23:58:23 INFO  : Encrypted drive 'OneD:': poll-interval is not supported by this remote
2021/01/18 23:58:23 DEBUG : vfs cache: root is "/gcache/vfs/Crypt"
2021/01/18 23:58:23 DEBUG : vfs cache: metadata root is "/gcache/vfs/Crypt"
2021/01/18 23:58:23 DEBUG : Creating backend with remote "/gcache/vfs/Crypt"
2021/01/18 23:58:23 DEBUG : Encrypted drive 'Crypt:': Mounting on "/mnt/Site"
2021/01/18 23:58:23 INFO  : vfs cache: cleaned: objects 0 (was 0) in use 0, to upload 0, uploading 0, total size 0 (was 0)
2021/01/18 23:58:23 DEBUG : : Root:
2021/01/18 23:58:23 DEBUG : : >Root: node=/, err=<nil>

Using --use-mmap works great with my GDrive mount.

There's nothing in the debug log other than it starting up? Can you share more details or steps to recreate whatever the issue is?

Hey Animosity, sorry for the delay. Yeah I don't see anything else in log when mounting with --use-mmap. I use screen and in another terminal simply do a df -h and it will freeze. I think it's also OneDrive being sensitive and pace limiting very quickly, which I can see when I don't use -use-mmap flag.

But it works OK without --use-mmap?

And it locks up without doing any transfers? Transfers are where the mmap-ed memory is used so I wouldn't expect it to lock up before then.

That is a strange problem.

Can you try this with the latest beta to see if it behaves the same way?

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