Rclone mount and rtorrent issue

What is the problem you are having with rclone?

Hi,
I use rclone mount with rtorrent to download files to a cloud storage.
But when I try to use it, all torrents I try when automatically in Pause.
My command is
rclone mount pC: /home/user/torrents/rtorrent/pC/ --allow-other --no-modtime

I have no problem to copy files to folder
cp test /home/user/torrents/rtorrent/pC/

I see that [Paradox55] had the same problem and it was solved.
But the version I use has the problem.

What is your rclone version (output from rclone version)

rclone v1.50.2

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

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

Linux ubuntu 16.04 LTS

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

I use pCloud Drive. I also try to use crypt with no success.

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

rclone mount pC: /home/user/torrents/rtorrent/pC/ --allow-other --no-modtime

A log from the command with the -vv flag (eg output from rclone -vv copy /tmp remote:tmp)

Log with rtorrent KO

2020/01/30 20:40:00 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=
2020/01/30 20:40:00 DEBUG : /: Lookup: name="TorrentFilm.avi"
2020/01/30 20:40:00 DEBUG : /: >Lookup: node=, err=no such file or directory
2020/01/30 20:40:00 DEBUG : /: Lookup: name="TorrentFilm.avi"
2020/01/30 20:40:00 DEBUG : /: >Lookup: node=, err=no such file or directory
2020/01/30 20:40:00 DEBUG : /: Lookup: name="TorrentFilm.avi"
2020/01/30 20:40:00 DEBUG : /: >Lookup: node=, err=no such file or directory
2020/01/30 20:40:00 DEBUG : /: Create: name="TorrentFilm.avi"
2020/01/30 20:40:00 DEBUG : TorrentFilm.avi: Open: flags=O_RDONLY|O_CREATE
2020/01/30 20:40:00 DEBUG : TorrentFilm.avi: >Open: fd=<nil *ReadFileHandle>, err=can't open file - writer failed
2020/01/30 20:40:00 DEBUG : /: >Create: node=, handle=, err=can't open file - writer failed
2020/01/30 20:40:00 DEBUG : /: Lookup: name="TorrentFilm.avi"
2020/01/30 20:40:00 DEBUG : /: >Lookup: node=, err=no such file or directory
2020/01/30 20:40:00 DEBUG : /: Create: name="TorrentFilm.avi"
2020/01/30 20:40:00 DEBUG : TorrentFilm.avi: Open: flags=O_RDONLY|O_CREATE
2020/01/30 20:40:00 DEBUG : TorrentFilm.avi: >Open: fd=<nil *ReadFileHandle>, err=can't open file - writer failed
2020/01/30 20:40:00 DEBUG : /: >Create: node=, handle=, err=can't open file - writer failed

#############################
Log with a file copy OK

2020/01/30 20:50:50 DEBUG : /: >Attr: attr=valid=1s ino=0 size=0 mode=drwxrwxr-x, err=
2020/01/30 20:50:50 DEBUG : /: Lookup: name="rclone-v1.50.2-linux-amd64.deb"
2020/01/30 20:50:50 DEBUG : : Re-reading directory (11m25.997658449s old)
2020/01/30 20:50:51 DEBUG : /: >Lookup: node=, err=no such file or directory
2020/01/30 20:50:51 DEBUG : /: Lookup: name="rclone-v1.50.2-linux-amd64.deb"
2020/01/30 20:50:51 DEBUG : /: >Lookup: node=, err=no such file or directory
2020/01/30 20:50:51 DEBUG : /: Create: name="rclone-v1.50.2-linux-amd64.deb"
2020/01/30 20:50:51 DEBUG : rclone-v1.50.2-linux-amd64.deb: Open: flags=O_WRONLY|O_CREATE|O_EXCL
2020/01/30 20:50:51 DEBUG : rclone-v1.50.2-linux-amd64.deb: >Open: fd=rclone-v1.50.2-linux-amd64.deb (w), err=
2020/01/30 20:50:51 DEBUG : /: >Create: node=rclone-v1.50.2-linux-amd64.deb, handle=&{rclone-v1.50.2-linux-amd64.deb (w)}, err=
2020/01/30 20:50:51 DEBUG : rclone-v1.50.2-linux-amd64.deb: Attr:
2020/01/30 20:50:51 DEBUG : rclone-v1.50.2-linux-amd64.deb: >Attr: a=valid=1s ino=0 size=0 mode=-rw-rw-r--, err=
2020/01/30 20:50:51 DEBUG : &{rclone-v1.50.2-linux-amd64.deb (w)}: Write: len=131072, offset=0
2020/01/30 20:50:51 DEBUG : &{rclone-v1.50.2-linux-amd64.deb (w)}: >Write: written=131072, err=
2020/01/30 20:50:51 DEBUG : &{rclone-v1.50.2-linux-amd64.deb (w)}: Write: len=131072, offset=131072
2020/01/30 20:50:51 DEBUG : pcloud root '': Target remote doesn't support streaming uploads, creating temporary local FS to spool file
2020/01/30 20:50:51 DEBUG : &{rclone-v1.50.2-linux-amd64.deb (w)}: >Write: written=131072, err=
2020/01/30 20:50:51 DEBUG : &{rclone-v1.50.2-linux-amd64.deb (w)}: Write: len=131072, offset=262144
2020/01/30 20:50:51 DEBUG : &{rclone-v1.50.2-linux-amd64.deb (w)}: >Write: written=131072, err=
2020/01/30 20:50:51 DEBUG : &{rclone-v1.50.2-linux-amd64.deb (w)}: Write: len=131072, offset=393216
2020/01/30 20:50:51 DEBUG : &{rclone-v1.50.2-linux-amd64.deb (w)}: >Write: written=131072, err=
2020/01/30 20:50:51 DEBUG : &{rclone-v1.50.2-linux-amd64.deb (w)}: Write: len=131072, offset=524288
2020/01/30 20:50:51 DEBUG : &{rclone-v1.50.2-linux-amd64.deb (w)}: >Write: written=131072, err=
2020/01/30 20:50:51 DEBUG : &{rclone-v1.50.2-linux-amd64.deb (w)}: Write: len=131072, offset=655360
2020/01/30 20:50:51 DEBUG : &{rclone-v1.50.2-linux-amd64.deb (w)}: >Write: written=131072, err=
2020/01/30 20:50:51 DEBUG : &{rclone-v1.50.2-linux-amd64.deb (w)}: Write: len=131072, offset=786432
2020/01/30 20:50:51 DEBUG : &{rclone-v1.50.2-linux-amd64.deb (w)}: >Write: written=131072, err=
2020/01/30 20:50:51 DEBUG : &{rclone-v1.50.2-linux-amd64.deb (w)}: Write: len=131072, offset=917504
2020/01/30 20:50:51 DEBUG : &{rclone-v1.50.2-linux-amd64.deb (w)}: >Write: written=131072, err=
2020/01/30 20:50:51 DEBUG : &{rclone-v1.50.2-linux-amd64.deb (w)}: Write: len=131072, offset=1048576
2020/01/30 20:50:51 DEBUG : &{rclone-v1.50.2-linux-amd64.deb (w)}: >Write: written=131072, err=

Try adding --vfs-cache-mode writes to your command line.

Thanks for your answer.

I had the same problem

2020/01/31 00:31:48 DEBUG : Dean/: >Lookup: node=, err=no such file or directory
2020/01/31 00:31:48 DEBUG : Dean/: Create: name="Dean.avi"
2020/01/31 00:31:48 DEBUG : Dean/Dean.avi: Open: flags=O_RDONLY|O_CREATE
2020/01/31 00:31:48 DEBUG : Dean/Dean.avi: >Open: fd=<nil *ReadFileHandle>, err=can't open file - writer failed
2020/01/31 00:31:48 DEBUG : Dean/: >Create: node=, handle=, err=can't open file - writer failed
2020/01/31 00:32:01 DEBUG : : Statfs:
2020/01/31 00:32:01 DEBUG : : >Statfs: stat={Blocks:1835008 Bfree:1832099 Bavail:1832098 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=
2020/01/31 00:32:01 DEBUG : : Statfs:
2020/01/31 00:32:01 DEBUG : : >Statfs: stat={Blocks:1835008 Bfree:1832099 Bavail:1832098 Files:1000000000 Ffree:1000000000 Bsize:4096 Namelen:255 Frsize:4096}, err=

It's still in Pause.

I guess this is the problem. The flags O_RDONLY and O_CREATE are a weird set of flags to use! This says open the file read only, but if it doesn't exist then create it.

I think rclone is handling that in a different way to other linux file systems as it comes up with

Probably because it has a read only file handle...

I had a grep through rtorrent's source and I couldn't see where it is doing that.

Can you try the latest version of rtorrent?

Can you strace rtorrent to see whether it is calling open with O_RDONLY|O_CREATE or whether that is being lost in translation somewhere?

Hi,

Finally, I use Deluge instead of rtorrent and it works with option --vfs-cache-mode writes.
deluged -v
deluged: 1.3.12
libtorrent: 1.0.7.0

Thanks for your help.

1 Like