Torrents downloading with deluge into /mounted with cache?


#1

Is it now possible to mount google drive as folder, to which torrent files will be downloaded?

I tried following:

rclone --config=/root/.config/rclone/rclone.conf mount -v --default-permissions --cache-dir /localcache --vfs-cache-mode full --vfs-cache-max-age 24h --no-modtime --dir-cache-time 1m0s gdrivedecrypted:remotefolder /mounted --allow-other &

but deluge downloads some part and stops, like at 300mb, 25%
tried with --cache-writes but same behavior, what should i change?

gdrivedecrypted is crypt


#2

I’d recommend you use deluge’s ability to download to a temporary folder and move on completion to the mount. It won’t use any extra space compared to writing to vfs cache which is essentially trying to do the same thing.

Also if you’re trying to seed from the mount, be aware, if the mount itself disconnects/isn’t available to deluge for any given reason when it’s seeding actively deluge will mark the file as needing a force re-check, which on a remote mount takes a very long time.


#3

There are complications with this. @spicypixel summarized well and also keep in mind that a rescan of the torrent will essentially download the entire data locally.

I don’t think I will ever do this. Cache is more optimized to run media in players that random access data. I don’t know exactly how the torrent client chunks data or if it reads the file in sequence. I doubt it does that which would make it a poor reader for cache.


#4

@ncw ok it works fine, but have questions.
I do this:
in config:

[gdrive]
type = drive
client_id = yyyyyy
client_secret = xxxx

[gdrivecached]
type = cache
remote = gdrive:data
chunk_size = 10M
info_age = 24h
chunk_age = 6h
warmup_age = 6h
chunk_total_size = 3G

[decrypted]
type = crypt
remote = gdrivecached:
filename_encryption = standard
password = ttttttxxxxx
password2 = tttttttyyyyy

and mount:

rclone mount -v --default-permissions --no-modtime --dir-cache-time 30m0s -cache-dir /shared --cache-chunk-path=/dircache --cache-db-path=/dircache --cache-tmp-upload-path=/dircache --vfs-cache-mode writes decrypted: /mounted --allow-other --allow-non-empty --cache-chunk-clean-interval=15m --gid=33 --uid=33 --umask=0000 &

and it works fine when i tell deluge to download into /mounted

but:
before deluge starts to download with full speed, first rclone is full allocating this allocation file in gdrive.

So if i want to download torrent 2GB, deluge allocates it on disk,
not downloading yet but waits,
rclone is uploading this 2GB preallocated file,
deluge starts to download
after something like 15minutes rclone updates preallocated 2GB file with correctly downloaded 2GB file.

What can i do to make rclone not upload this prealloacted file, only upload the one correctly downloaded after 15minutes?


#5

I would instead tell deluge to move the data after it downloaded to the mount folder rather than tell it to download it directly there. I know it supports that cause I do it. I first download on a SSD to get the full speed and then deluge moves it to a extern HDD.


#6

yes i know, this is one of the way and it works, but i want to test cache backend, use it and help @ncw to make it better.


#7

I think @remus.bunduc is correct that there isn’t a way at the moment. If deluge closes the file then rclone will thing it is good to upload.


#8

So don’t use full allocation, try the partial one?!