I have a plex setup on Ubuntu with Deluge, Jackett, *arr apps, etc. All is gravy.
Except I currently need to manually run rclone copyto
on completed Deluge torrents in order to [reliably] pipe the media to rclone/Plex.
Context:
- Deluge downloads to
~/local/
- rclone is mounted to
~/gdrive/
using:
rclone mount gdrive: ~/gdrive --allow-other --vfs-cache-mode off --bwlimit 15M --tpslimit 4 --tpslimit-burst 4
- Plex serves from
~/gdrive/Media/TV
and~/gdrive/Media/Movies
Initially I was using Deluge Labels to auto-move completed downloads, but this resulted in IO errors (and occasionally illegal disk seeks when I messed with enabling vfs cache writes).
I tried setting up a cron job to monitor ~/local/
for completed files then copying to rclone, but that resulted in IO errors.
The ONLY reliable solution I’ve found is manually running rclone copyto
from a screen
session for completed downloads. It works but it’s a pain in the ass.
My questions for yall:
-
Any idea why I’m getting these IO errors? I’m not pegging the CPU or the disk. There doesn’t seem to be hardware issue, it really feels like the problem relates to rclone and Google’s APIs
-
Any idea how to troubleshoot this and get downloads automatically moving? Any logging mechanism I use (Deluge, rcloone, kernel) just gives generic IO errors. It doesn’t point me in any direction
I ran into the same problem when first setting up a similar program stack. The problem I found was that some programs need to have the rclone mount setup before they first attempt to access the local folders. Just allowing the programs to start randomly would typically result in I/O errors.
My solution was to use the healthcheck feature of docker-compose to ensure that the mount was accessible before anything downstream booted. I placed a small “test” file in the mount and wait until it’s available. I use bash, which means the rclone container needs to have it installed. Below is the dockerfile I use for rclone and my docker-compose file that controls the boot-up sequence.
One thing to note: only docker-compose uses the depends-on argument, so when your server boots-up the default is that docker starts the containers at random. You can get around this by turning off the auto-start using docker and then setting a cron-job that runs the docker-compose up commands at start-up.
Rclone Dockerfile FROM rclone/rclone:latest RUN apk update &&
apk add bash
docker-compose.yml version: ‘3.5’
One more thing. I’d highly recommend using vfs-cache for rclone since it takes care of moving the files to your remote source. You can see in my setup rclone will keep a local copy for 24 hrs and then automatically transfer it to the remote.
I was originally using an external script to copy/move files but vfs-cache is so much easier. Just let rclone handle everything in the background.