Page 2 of 2
Re: Setting download folder to a USB mount on Raspberry Pi
Posted: December 5th, 2012, 6:41 am
by feoZA
sander wrote:feoZA wrote:O
If I manually mount the USB to /var/sabnzbd/Downloads then all I expect should happen is that sabnzbd will show 15GB free in my Download folder and not 5GB free, which it does.
If you mount it, and it is visible in "df -h", and then you start SABnzbd, and SAB points to /var/sabnzbd/Download for incomplete and complete, and it is writable for the user under which SABnzbd is running ... yes, then it should work like you want.
So: an external drive is not an easy thing.
So let's do first things first: does SAB work for a file of 100 MB, just downloading to the SD-card in the Raspi? (No external drive in use)
Yes, it works perfectly if there's no USB or external drive in use. In fact I've downloaded 5GB so far onto the SD card via sabnzbd.
Re: Setting download folder to a USB mount on Raspberry Pi
Posted: December 5th, 2012, 11:28 am
by sander
OK, good.
So what's your next step? How do you take care the the USB stick is mounted? Manually, or via fstab? As soon as that works, and it works reliable between reboots, and you can write to it as the user under which SABnzbd is running (is it 'sabnzbd'?), etc, (which are all non-SABnzbd things), you can point SABnzbd incomple and complete directory to the drive.
Finally a note: SABnzbd is picky on external drives. If they are unavailable, SAB will fall back to the defult directory. If the are unwritable, errors will occur.
Once again: for only 15GB I wouldn't bother. Probably better and easier to get a 16GB SD card and write you Raspi-OS (Raspbian?) to it, and let SABnzbd save it locally.
Re: Setting download folder to a USB mount on Raspberry Pi
Posted: December 5th, 2012, 1:41 pm
by feoZA
Well, say I mount it manually.
I'd use something like this to mount it:
Code: Select all
sudo mount -t ntfs -o uid=998,gid=999,fmask=000,dmask=000 /dev/sda5 /var/sabnzbd/Downloads
How do I check what user sabnzbd is running as?
Re: Setting download folder to a USB mount on Raspberry Pi
Posted: December 5th, 2012, 2:43 pm
by sander
It's probably 'sabnzbd' as you seem to have made that user
Command to execure (again) as a test:
df -h
ls -al /var/sabnzbd/Downloads
sudo -u sabnzbd touch /var/sabnzbd/Downloads/hello4.txt
If that works, start SABnzbd, and point the folders to /var/sabnzbd/Downloads
Re: Setting download folder to a USB mount on Raspberry Pi
Posted: December 6th, 2012, 1:00 am
by feoZA
So just to be clear, I should run those commands while the USB is mounted?
Also, mind giving a quick explanation of what each command does exactly?
Re: Setting download folder to a USB mount on Raspberry Pi
Posted: December 6th, 2012, 1:11 am
by sander
Yes, indeed.
The commands are there to *check* the USB drive is mounted and writable
df -h
... Show "disk free" human-readable format. In your case: it will show if the USB drive is mounted, and how much free space it has.
ls -al /var/sabnzbd/Downloads
... Show all and in long format the contents of /var/sabnzbd/Downloads
sudo -u sabnzbd touch /var/sabnzbd/Downloads/hello4.txt
... As user 'sabnzbd', touc (=create or touch) the file /var/sabnzbd/Downloads/hello4.txt
These command are not needed if it all works. However, with these commands you have a tool to avoid you can also say "it doesn't work".
Re: Setting download folder to a USB mount on Raspberry Pi
Posted: December 6th, 2012, 3:29 am
by feoZA
Cool thanks very much for the explanation.
I'm not home at the moment but will post the results of running those commands later in the day.
Re: Setting download folder to a USB mount on Raspberry Pi
Posted: December 12th, 2012, 5:22 pm
by niftyshellsuit
I came here with the exact same problem, it's been driving me mad!
I discovered my problem is that my stick was formatted as FAT32, and apparently FAT32 does not support linux permissions, hence why all the mysterious 'permission denied' errors.
I have formatted my USB as ext3 now (using sudo mkfs.ext3 /dev/sda1) and mounted it using vfat and... it works!
Don't know if this will solve your issue, but it's the first time I've ever had the answer to someone's linux question so I thought I'd share
Re: Setting download folder to a USB mount on Raspberry Pi
Posted: December 16th, 2012, 1:17 pm
by feoZA
niftyshellsuit wrote:I came here with the exact same problem, it's been driving me mad!
I discovered my problem is that my stick was formatted as FAT32, and apparently FAT32 does not support linux permissions, hence why all the mysterious 'permission denied' errors.
I have formatted my USB as ext3 now (using sudo mkfs.ext3 /dev/sda1) and mounted it using vfat and... it works!
Don't know if this will solve your issue, but it's the first time I've ever had the answer to someone's linux question so I thought I'd share
Haha cool.
Reason I haven't posted back here is that it was giving me a headache so I just bought a 16GB SD card to house all my downloads before Sickbeard post processes them and frees up the space again.
I'll try formatting in a different format (I've been trying with NTFS only so far) so I guess it's worth a shot.
So to format the USB as ext3, I just run the command you specified? That's it?