1

i am running rtorrent in a ubuntu-VM. the vm's host is sharing a folder "downloads" with the vm, which is mounted inside the guest by adding the following line to /etc/fstab:

downloads /media/rtmount/downloads 9p trans=virtio,version=9p2000.L,rw 0 0

the shared folder gets mounted correctly, i can navigate to it and create files within, no problem (i am using the same user that rtorrent is run with):

touch /media/rtmount/downloads/testfile

now i want rtorrent to download to /media/rtmount/downloads. if i start a torrent rtorrent will create the file e.g. /media/rtmount/downloads/ubuntu-14.10-desktop-amd64.iso but never start to download. it will sit with status "downloading" but never actually start.

if i set the download-directory to something else e.g. /home/peter/ it will create the file as well and start downloading as it is supposed to.

what i don't understand is why it can create the file (with the according file-size as well) within the shared folder (so it must have write-privileges) but won't start downloading. seeding/uploading from the shared folder is not an issue, works well.

1 Answer 1

3

The solution

Add a cache=mmap option to your mount options.

So you would have something like the following:

downloads /media/rtmount/downloads 9p trans=virtio,version=9p2000.L,cache=mmap,rw 0 0

The issue

This issue can occur when a file system does not implement mmap. Without mmap it is still possible to create and manipulate files (as you observed), however the rTorrent client requires mmap to download files.

You can verify this by enabling storage logging in rTorrent. Add the following to your rtorrent.rc to enable logging:

log.open_file = "storage", /tmp/rtorrent_storage.log
log.add_output = "storage_debug", "storage"

In the case of the mmap issue, you should see something like the following when attempting to download a torrent:

Could not create: memory:524288 block:1 errno:22 errmsg:Invalid argument.

Sources:

https://www.kernel.org/doc/Documentation/filesystems/9p.txt https://github.com/rakshasa/libtorrent/issues/20 (a bit different, but similar issue)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .