Setting download folder to a USB mount on Raspberry Pi
Forum rules
Help us help you:
Help us help you:
- Are you using the latest stable version of SABnzbd? Downloads page.
- Tell us what system you run SABnzbd on.
- Adhere to the forum rules.
- Do you experience problems during downloading?
Check your connection in Status and Interface settings window.
Use Test Server in Config > Servers.
We will probably ask you to do a test using only basic settings. - Do you experience problems during repair or unpacking?
Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Setting download folder to a USB mount on Raspberry Pi
Hi there
I have sabnzbd and Sickbeard running great on a Raspberry Pi.
Problem is that the SD card on the Pi is only 8GB so I wanna mount a 16GB USB at the location of the normal sab downloads (in my case, /var/sabnzbd/Downloads).
I mount the folder using something like this:
sudo mount -t ntfs -o uid=sabnzbd,gid=sabnzbd,fmask=000,dmask=000 /dev/sda1 /var/sabnzbd/Downloads
It mounts fine and the web interface shows 15GB available but if I try to manually load up an nzb the log file says it can't create folder /var/sabnzbd/Downloads/incomplete.
BTW. I manually created the folders 'complete' and 'incomplete' before I mounted it.
Basically what I wanna know is what's the easiest way to mount a USB drive (to the default download location) on a Raspberry Pi so that sabnzbd can put all downloads on the USB instead of the SD card.
I have sabnzbd and Sickbeard running great on a Raspberry Pi.
Problem is that the SD card on the Pi is only 8GB so I wanna mount a 16GB USB at the location of the normal sab downloads (in my case, /var/sabnzbd/Downloads).
I mount the folder using something like this:
sudo mount -t ntfs -o uid=sabnzbd,gid=sabnzbd,fmask=000,dmask=000 /dev/sda1 /var/sabnzbd/Downloads
It mounts fine and the web interface shows 15GB available but if I try to manually load up an nzb the log file says it can't create folder /var/sabnzbd/Downloads/incomplete.
BTW. I manually created the folders 'complete' and 'incomplete' before I mounted it.
Basically what I wanna know is what's the easiest way to mount a USB drive (to the default download location) on a Raspberry Pi so that sabnzbd can put all downloads on the USB instead of the SD card.
Re: Setting download folder to a USB mount on Raspberry Pi
@BTW: If so, you created those folders on the local file system, not on the drive you mounted afterwards.feoZA wrote: sudo mount -t ntfs -o uid=sabnzbd,gid=sabnzbd,fmask=000,dmask=000 /dev/sda1 /var/sabnzbd/Downloads
It mounts fine and the web interface shows 15GB available but if I try to manually load up an nzb the log file says it can't create folder /var/sabnzbd/Downloads/incomplete.
BTW. I manually created the folders 'complete' and 'incomplete' before I mounted it.
So: mount the external drive, and then:
Code: Select all
df -h
touch /var/sabnzbd/Downloads/hello.txt
sudo touch /var/sabnzbd/Downloads/hello2.txt
Re: Setting download folder to a USB mount on Raspberry Pi
I'm a complete beginner so please have patience with me if I did this wrong.
Code: Select all
pi@raspberrypi /var/sabnzbd/Downloads $ df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 7.3G 3.7G 3.3G 53% /
/dev/root 7.3G 3.7G 3.3G 53% /
devtmpfs 93M 0 93M 0% /dev
tmpfs 19M 212K 19M 2% /run
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 37M 0 37M 0% /run/shm
/dev/mmcblk0p1 56M 17M 40M 30% /boot
//192.168.0.102/TV Shows 1.8T 1.5T 318G 83% /media/NAS
/dev/sda5 15G 87M 15G 1% /var/sabnzbd/Downloads
pi@raspberrypi /var/sabnzbd/Downloads $ touch /var/sabnzbd/Downloads/hello.txt
pi@raspberrypi /var/sabnzbd/Downloads $ sudo touch /var/sabnzbd/Downloads/hello2.txt
pi@raspberrypi /var/sabnzbd/Downloads $
Re: Setting download folder to a USB mount on Raspberry Pi
That looks good. What is the output of:
ls -al /var/sabnzbd/Downloads
whoami
ls -al /var/sabnzbd/Downloads
whoami
Re: Setting download folder to a USB mount on Raspberry Pi
sander wrote:That looks good. What is the output of:
ls -al /var/sabnzbd/Downloads
whoami
Code: Select all
pi@raspberrypi ~ $ ls -al /var/sabnzbd/Downloads
total 16
drwxr-xr-x 4 sabnzbd sabnzbd 4096 Nov 24 09:41 .
drwxr-xr-x 5 sabnzbd nzb 4096 Nov 17 14:43 ..
drwxrwxrwx 5 sabnzbd sabnzbd 4096 Dec 3 04:50 complete
drwxr-xr-x 2 sabnzbd sabnzbd 4096 Dec 3 04:51 incomplete
Code: Select all
pi@raspberrypi ~ $ whoami
pi
Re: Setting download folder to a USB mount on Raspberry Pi
A user 'sabnzbd'? How did you do that? And why?
Anyway: does this work:
sudo chmod 777 /var/sabnzbd/Downloads/*
ls -al /var/sabnzbd/Downloads
Anyway: does this work:
sudo chmod 777 /var/sabnzbd/Downloads/*
ls -al /var/sabnzbd/Downloads
Re: Setting download folder to a USB mount on Raspberry Pi
A user 'sabnzbd'? How did you do that? And why?
Anyway: does this work:
sudo chmod 777 /var/sabnzbd/Downloads/*
ls -al /var/sabnzbd/Downloads
Anyway: does this work:
sudo chmod 777 /var/sabnzbd/Downloads/*
ls -al /var/sabnzbd/Downloads
Re: Setting download folder to a USB mount on Raspberry Pi
I followed the tutorial here: http://www.cylindric.net/blog/raspberrypi-setup/sander wrote:A user 'sabnzbd'? How did you do that? And why?
Anyway: does this work:
sudo chmod 777 /var/sabnzbd/Downloads/*
ls -al /var/sabnzbd/Downloads
Code: Select all
pi@raspberrypi ~ $ sudo chmod 777 /var/sabnzbd/Downloads/
pi@raspberrypi ~ $ ls -al /var/sabnzbd/Downloads
total 8
drwxrwxrwx 1 sabnzbd sabnzbd 4096 Dec 4 19:25 .
drwxr-xr-x 5 sabnzbd nzb 4096 Nov 17 14:43 ..
Re: Setting download folder to a USB mount on Raspberry Pi
He, what happened? The subdirectories in /var/sabnzbd/Downloads/ are gone. Did you reboot, or disconnect the drive?
What is the output of
df -h
What is the output of
df -h
Re: Setting download folder to a USB mount on Raspberry Pi
The Pi wasn't picking up the USB so I formatted in windows quickly and connected it back to the Pi.sander wrote:He, what happened? The subdirectories in /var/sabnzbd/Downloads/ are gone. Did you reboot, or disconnect the drive?
What is the output of
df -h
I'm so confused right now.
All I want is to have the /var/sabnzbd/Downloads folder point to the USB instead of the SD card.
I've given up for the night will post back here tomorrow.
BTW. df -h will shows that the USB (sda5) is mounted at /var/sabnzbd/Downloads like the first time you asked.
Re: Setting download folder to a USB mount on Raspberry Pi
I understand, but why all the work for a 16GB USB stick? That will fill up quite quickly. Can't you use a 500GB+ USB harddisk?
When you disconnect and then connect the USB-stick (or reboot the Raspi), you have to manually "sudo mount ..." the stick again. Very annoying. The solution is to add an entry to the /etc/fstab.
When you disconnect and then connect the USB-stick (or reboot the Raspi), you have to manually "sudo mount ..." the stick again. Very annoying. The solution is to add an entry to the /etc/fstab.
Re: Setting download folder to a USB mount on Raspberry Pi
I've added the line to fstab to automount it.sander wrote:I understand, but why all the work for a 16GB USB stick? That will fill up quite quickly. Can't you use a 500GB+ USB harddisk?
When you disconnect and then connect the USB-stick (or reboot the Raspi), you have to manually "sudo mount ..." the stick again. Very annoying. The solution is to add an entry to the /etc/fstab.
That's not the problem.
The problem is that when sabnzbd tries to download when the USB is mounted, there's something not right, I THINK it's permission issues.
Also, 16GB is plenty considering that the files are deleted off the USB as soon as Sickbeard post processes them. I only have 5GB left on the SD card after the OS and stuff so that's definitely not enough.
Re: Setting download folder to a USB mount on Raspberry Pi
If you've added it to fstab to automount it, but it does not automount, I would say there is something wrong with the fstab entry.
Yes, I think it's permission too. Therefore the "chmod ..." thing. However, the directories where gone, so something else is going too. Maybe the not-working fstab entry?
Yes, I think it's permission too. Therefore the "chmod ..." thing. However, the directories where gone, so something else is going too. Maybe the not-working fstab entry?
Re: Setting download folder to a USB mount on Raspberry Pi
OK let's forget the automount thing for now.
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.
Problem is when I upload an nzb to test if it works like usual, it doesn't. sabnzbd just freezes up and I can't figure out why.
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.
Problem is when I upload an nzb to test if it works like usual, it doesn't. sabnzbd just freezes up and I can't figure out why.
Re: Setting download folder to a USB mount on Raspberry Pi
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.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.
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)