Now that I have Azureus mostly running on Ubuntu, I’ve been focusing on integrating the machine into my download/watch/archive pipeline.
Back when I ran BT on a Windows XP box, I kept a drive mapped to my media share on nemes, my 2TB NAS box. Whenever a download finished, I’d copy it over to that share. Now that BT is running on Linux, I want much the same functionality.
Initially I went with NFS, since NFS is the closest thing to a native network filesystem technology on Linux, and my NAS box, being a Linux derivative itself, also supports it. However, I had alot of trouble with the UIDs not matching between nemes and aenea, such that I could copy files to the media share, but then they’d be read-only when I accessed them from Windows. Lame.
Rather than fuck about, I just switched to using Samba on Ubuntu to get at the Windows share. Lame, but I don’t give a shit.
Anyway, since it’s been at least six months since I last had to set up Samba, I forgot how to do it and Goggled about. I found a post somewhere about setting up an fstab entry to mount the Windows share with the smbfs file system driver. Something like this:
# Mount nemes via Samba
//nemes/media /usr/local/nemes/media smbfs auto,credentials=/etc/samba/nemes_creds,rw,uid=anelson 0 0
//nemes/warez /usr/local/nemes/warez smbfs auto,credentials=/etc/samba/nemes_creds,rw,uid=anelson 0 0
I tried it, it worked, yay.
But then I started getting really annoying problems. If I kept the box up for very long I’d start to get crap like this in syslog:
syslog.0:Oct 24 22:04:11 aenea kernel: [86867.358441] smb_add_request: request [ffff81000dd4de00,mid=23932] timed out!
syslog.0:Oct 24 22:10:30 aenea kernel: [87245.396073] smb_add_request: request [ffff8100205e0e00,mid=23934] timed out!
syslog.0:Oct 24 22:10:30 aenea kernel: [87245.396095] smb_add_request: request [ffff8100025d2e00,mid=23935] timed out!
And timeouts trying to copy files into the mount point for the share. If I tried to umount the volume, I’d get device busy errors.
Turns out, smbfs is deprecated in favor of cifs. I then reworded fstab to:
# Mount nemes via Samba
//nemes/media /usr/local/nemes/media cifs auto,credentials=/etc/samba/nemes_creds,rw,uid=anelson 0 0
//nemes/warez /usr/local/nemes/warez cifs auto,credentials=/etc/samba/nemes_creds,rw,uid=anelson 0 0
That still wasn’t working, though. Something about an error -13 from cifs. Turns out whitespace is now significant in the credentials file, so I edited /etc/samba/nemes_creds and removed the whitespace to the left and right of the =, and that took care of it.
Now I have stable Windows share mounts, with decent transfer performance.