Rclone mount as a service. Torrents failing

What is the problem you are having with rclone?

I have created an rclone service using nssm that will mount an encrypted google drive on windows. The service has "Log on As"=Local System. The command seems to work as I can see the drive mounted in the file explorer and I can read/write to the drive using the file manager.

The issues come when I am torrenting. I am using uTorrent and I am downloading it directly to the mount. Sometimes this succeeds but other times, the torrent failes and gives the error "Access is denied". This also happened with qBitTorrent and other torrent clients I used leading me to believe that it is something to do with windows rather than my torrent client.

With my limited knowledge, I think the issue might be to do with the cache filling up and the torrent client cant write directly to the drive? But I could be competely wring with this.

Any help on why this error only shows up for some torrents and not other torrents? Also any recommendations to improve my setup is greatly appreciated.

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

rclone v1.63.0        (latest is v1.63.1)
- os/version: Microsoft Windows 11 Home 22H2 (64 bit)
- os/kernel: 10.0.22621.1992 (x86_64)
- os/type: windows
- os/arch: amd64
- go/version: go1.20.5
- go/linking: static
- go/tags: cmount

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

Google Drive (Encrypetd)

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

rclone mount PlexE: G: --dir-cache-time 24h --log-file "C:\Users\aaron\Tools\rclone\rcloneMount.log" --log-level NOTICE --poll-interval 10s --cache-dir "C:\Users\aaron\Tools\rclone_cache" --drive-pacer-min-sleep 10ms --drive-pacer-burst 200 --vfs-cache-mode full --vfs-cache-max-size 20G --vfs-cache-max-age 168h --vfs-cache-poll-interval 5m --bwlimit-file 32M --vfs-read-chunk-size 128M --no-modtime --config="C:\Users\aaron\AppData\Roaming\rclone\rclone.conf" --no-console --allow-other --allow-non-empty

The rclone config contents with secrets removed.

[OneDrive]
type = onedrive
client_id = [REMOVED]
client_secret = [REMOVED]
token = [REMOVED]
drive_id = [REMOVED]
drive_type = personal

[TCDrive]
type = drive
client_id = [REMOVED]
client_secret = [REMOVED]
scope = drive
token = [REMOVED]

[PlexE]
type = crypt
remote = TCDrive:Plex
password = [REMOVED]

A log from the command with the -vv flag

2023/07/21 23:17:51 NOTICE: Config file "C:\\Windows\\system32\\config\\systemprofile\\AppData\\Roaming\\rclone\\rclone.conf" not found - using defaults
2023/07/21 23:17:51 Failed to create file system for "PlexE:": didn't find section in config file
2023/07/21 23:17:53 NOTICE: Config file "C:\\Windows\\system32\\config\\systemprofile\\AppData\\Roaming\\rclone\\rclone.conf" not found - using defaults
2023/07/21 23:17:53 Failed to create file system for "PlexE:": didn't find section in config file
2023/07/21 23:17:57 NOTICE: Config file "C:\\Windows\\system32\\config\\systemprofile\\AppData\\Roaming\\rclone\\rclone.conf" not found - using defaults
2023/07/21 23:17:57 Failed to create file system for "PlexE:": didn't find section in config file
2023/07/21 23:18:05 NOTICE: Config file "C:\\Windows\\system32\\config\\systemprofile\\AppData\\Roaming\\rclone\\rclone.conf" not found - using defaults
2023/07/21 23:18:05 Failed to create file system for "PlexE:": didn't find section in config file
2023/07/21 23:18:22 NOTICE: Config file "C:\\Windows\\system32\\config\\systemprofile\\AppData\\Roaming\\rclone\\rclone.conf" not found - using defaults
2023/07/21 23:18:22 Failed to create file system for "PlexE:": didn't find section in config file
The service rclone has been started.
The service rclone has been stopped.
2023/07/21 23:18:45 ERROR : G:: Unmounted rclone mount
2023/07/21 23:18:54 NOTICE: Config file "C:\\Windows\\system32\\config\\systemprofile\\AppData\\Roaming\\rclone\\rclone.conf" not found - using defaults
2023/07/21 23:18:54 Failed to create file system for "PlexE:": didn't find section in config file
The service rclone has been started.
The service rclone has been stopped.
2023/07/21 23:19:36 ERROR : G:: Unmounted rclone mount
2023/07/21 23:19:58 NOTICE: Config file "C:\\Windows\\system32\\config\\systemprofile\\AppData\\Roaming\\rclone\\rclone.conf" not found - using defaults
2023/07/21 23:19:58 Failed to create file system for "PlexE:": didn't find section in config file
The service rclone has been started.
The service rclone has been stopped.
2023/07/21 23:20:22 ERROR : G:: Unmounted rclone mount
The service rclone has been started.
The service rclone has been stopped.
2023/07/21 23:21:36 ERROR : G:: Unmounted rclone mount
The service rclone has been started.
The service rclone has been stopped.
2023/07/21 23:25:42 ERROR : G:: Unmounted rclone mount
The service rclone has been started.
The service rclone has been stopped.
2023/07/21 23:28:19 ERROR : G:: Unmounted rclone mount
The service rclone has been started.
The service rclone has been stopped.
2023/07/22 00:04:53 ERROR : G:: Unmounted rclone mount
2023/07/22 10:50:30 ERROR : G:: Unmounted rclone mount
2023/07/22 11:06:45 NOTICE: --allow-non-empty flag does nothing on Windows
2023/07/22 11:06:45 NOTICE: --allow-other flag does nothing on Windows
2023/07/22 11:22:07 ERROR : G:: Unmounted rclone mount
2023/07/22 11:23:54 NOTICE: --allow-non-empty flag does nothing on Windows
2023/07/22 11:23:54 NOTICE: --allow-other flag does nothing on Windows
2023/07/22 15:52:17 ERROR : Movies/Up (2009)/Up.2009.1080p.BluRay.x264.YIFY.mp4.bc!: Failed to copy: Post "https://www.googleapis.com/upload/drive/v3/files?alt=json&fields=id%2Cname%2Csize%2Cmd5Checksum%2Ctrashed%2CexplicitlyTrashed%2CmodifiedTime%2CcreatedTime%2CmimeType%2Cparents%2CwebViewLink%2CshortcutDetails%2CexportLinks%2CresourceKey&supportsAllDrives=true&uploadType=resumable&upload_id=ADPycds1-zFsyWMIXfQstoeP4HiYPwGqG8w0dhwMTkpR4AKNWQUAjzfrjRKpcF0ByUsak9Rn4VjTJMZp_wfg8O50vFk-": context canceled

There was a comment on here a while ago about how torrenting is probably the absolute worst case for an rclone mount. Rclone works on the full file always. So when you have a mount and make a small change, once the file is closed, rclone will upload the entire file again. Furthermore, the mount itself doesn't work great with sparse files since a sparse file isn't really a concept on cloud storage.

Most torrent clients have a "move here when finished" setting. That is a better bet! Torrent to a local drive then let it move it to a mount when it is finished. I think you will be MUCH happier with that approach.

In theory you could add:

--vfs-write-back duration            Time to writeback files after last use when using cache (default 5s)

flag to your mount and increase delay to e.g. 1h

But I would rather follow @jwink3101 advice. As much as VFS layer tries to emulate normal disk behaviour it will always have some shortcomings.

Thank you for replying! I ended up going with this solution as it worked the best

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