louiscar
Posts: 19
Joined: Wed May 18, 2016 3:08 am

Rtorrent - won't write to NAS

Tue Jul 05, 2016 1:55 am

Hi,

I finally got rtorrent up and running on the Pi the other day.
However, it just won't write to the NAS mounted share I provide and I am not experienced enough to know what is really going on.

Curiously there are no errors shown, the torrent will simply be marked as 'queued' if I try to give it the NAS location. If I give it a local location or even an attached External usb stick or drive it'll download.

The NAS mount works perfectly with other downloaders such as get_iplayer so I am at a loss what might be the problem especially as I don't get any errors. It seems rtorrents simply doesn't appear to see the location as valid but even that is speculation at this stage.

As a last ditch effort I tried to use the default ~/Downloads location and then mount that to the NAS. Works unmounted and doesn't if I mount it.

Any help would be appreciated

User avatar
RaTTuS
Posts: 10559
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Rtorrent - won't write to NAS

Tue Jul 05, 2016 7:09 am

how are you mounting the drive
after mount what does
ls -la <mountpoint>
show
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

louiscar
Posts: 19
Joined: Wed May 18, 2016 3:08 am

Re: Rtorrent - won't write to NAS

Tue Jul 05, 2016 3:40 pm

RaTTuS wrote:how are you mounting the drive
after mount what does
ls -la <mountpoint>
show
Hi,
Thanks for the reply.
I mount the Nas share like this:

Code: Select all

sudo mount.cifs //192.168.1.118/test ~/Downloads -o cred=/etc/nas-cred,user=admin
ls -la ~/Downloads give me the contents of the /test folder as expected. As I say I use this method to connect to the NAS for get_iplayer to put its stuff directly in there and it's always been fine.

Since writing this I've played about with fstab and sudoers in case this was a permission issue but all to no avail and I would expect some kind of error from rtorrent if this was the case but it just sits there quite happily displaying 'Queued' instead of 'downloading'.
Again, the moment I 'umount ~/Downloads' off it goes downloading.

louiscar
Posts: 19
Joined: Wed May 18, 2016 3:08 am

Re: Rtorrent - won't write to NAS

Tue Jul 05, 2016 6:46 pm

Digging around in the code to see what causes a 'Queued' status I found this:

Code: Select all

elif (state & dStatus['hashing']):
    status = "Queued"
I can't say I'm particularly enlightened. :?

louiscar
Posts: 19
Joined: Wed May 18, 2016 3:08 am

Re: Rtorrent - won't write to NAS

Tue Jul 05, 2016 9:15 pm

Ok I think I sussed it finally. It was a permissions issue.
I got a clue when I dropped down the upload torrents from file and saw that the Downloads folder wasn't shown when it was mounted.

The problem seems to be that using sudo mount.cifs was the problem. I keep my credential file in /ect/nas-cred with chmod 600 and so if I try to run the mount script without sudo it can't read the file.

I entered the following into fstab:

Code: Select all

//192.168.1.118/test /home/pi/Downloads cifs credentials=/etc/nas-cred,file_mode=0777,dir_mode=0777,rw,sec=ntlm 0       0
Which was a PIA to get right as I kept getting 'invalid argument' but the above works.

Now the only way I can connect to the share is to run:

Code: Select all

sudo mount -a
If I run the script under sudo it still doesn't work so this seems to be the only way to get it to work. Rtorrent can see the share now and will download ok. Perhaps I can run the mount.cifs script if I set different permissions on the /etc/nas-cred but I'm told that one should set it at 600 even though it's in the /etc directory. Is that right?

Return to “General discussion”