unRAID with SABnzbd


Recommended Posts

  • Replies 734
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

If you use sabnzbd quite a lot this could give excessive read/writes on your flash drive?

It's a total of 5 files, of which only 3 are actually used for my setup, and those files are 31.1 KB, 11 bytes and 14 bytes accordingly. One file is for RSS data, which is updated every 15 minutes. I agree that this will increase writes to the flash drive, but I think I'm safe with at least a million possible writes to a memory cell before it starts to fail.

Link to comment

It's not hard to use.

Unzip the file into the root of the flash drive. Either in the flash share from the network or /boot from the server. I used 7-zip on W7 to do this.

Put the line "cp /boot/par2 /usr/bin/par2" into the go file right after the dependencies install.

Type "cp /boot/par2 /usr/bin/par2" at the command line to move the file without rebooting.

 

You could store the file in another place too if you wanted.

 

Note that you can still get failures due to not enough repair blocks but this takes care of the ones that say they failed to verify without any reason.

 

Peter

 

 

Thank you!!!!!

Link to comment

Are you running sabnzbd as it's own user? Are the files it downloads owned by "nobody" still. I'm having issues with files being owned by "root" with 5.0 beta 2.

 

I have SABnzbd/Transmission running as user 'download' and have the files setup to be owned by user 'download'. The user 'download' is only member of the group 'download'. This is my restricted user account. In this way, if those programs are compromised, then they can not access any of the files in my array. Previously I had them running as user 'nobody', but that user seems too promiscuous especially when all of your files are owned by 'nobody'.

 

The files are not written directly to my array. After they are finished and I double-check the files, I do a 'chown nobody.users * && chmod 0660 *' on them before moving them into the array.

 

Link to comment

Are you running sabnzbd as it's own user? Are the files it downloads owned by "nobody" still. I'm having issues with files being owned by "root" with 5.0 beta 2.

 

I have SABnzbd/Transmission running as user 'download' and have the files setup to be owned by user 'download'. The user 'download' is only member of the group 'download'. This is my restricted user account. In this way, if those programs are compromised, then they can not access any of the files in my array. Previously I had them running as user 'nobody', but that user seems too promiscuous especially when all of your files are owned by 'nobody'.

The files are not written directly to my array. After they are finished and I double-check the files, I do a 'chown nobody.users * && chmod 0660 *' on them before moving them into the array.

 

 

That is quite user intensive, I admire your dedication!

 

Do you invoke the application as another user directly from the go script? If so could you post that part of the script please?  I've tried a couple of ways but not managed it. I think I will just run it as nobody if I can manage it.

 

Link to comment

If you use sabnzbd quite a lot this could give excessive read/writes on your flash drive?

It's a total of 5 files, of which only 3 are actually used for my setup, and those files are 31.1 KB, 11 bytes and 14 bytes accordingly. One file is for RSS data, which is updated every 15 minutes. I agree that this will increase writes to the flash drive, but I think I'm safe with at least a million possible writes to a memory cell before it starts to fail.

Did you ever try the setting "Article Cache Limit", by chance?  It allows you to specify a size to cache to memory.  I am thinking about trying that after I confirm my cache drive is not sleeping (need to let me queue finish, as that will definitely keep my cache up and running). 

Link to comment

No. I have these applications tied into /etc/rc.d/rc.local. They automatically start that way. Once again, the handling of running as the user 'downloads' that is handled by the start-stop-daemon utility. The earlier /etc/rc.d/rc.sabnzbd script I posted passes that as a parameter to that utility.

 

As for my security items, it's not user intensive at all. Its only 1 more step I do after verifying the downloads. I'd rather be secure than slightly less burdened but left vulnerable.

 

The same can be accomplished by using 'at'/'cron'/'sabnzbd' to schedule the running of 'newperms' script as well.

 

I am running unRAID 5.0beta2 installed on top of Slackware64 13.2 (Current), so its easier to do setups that persist through reboots as it's a persistent install OS.

 

In a typical unRAID USB OS, have you tried using 'sudo' to run the files as a different user?

 

 

#!/bin/sh
#
# /etc/rc.d/rc.local:  Local system initialization script.
# kick off identd
if [ -x /etc/rc.d/rc.oidentd ]; then
  . /etc/rc.d/rc.oidentd start
fi

# Invoke the 'go' script
if [ -f /boot/config/go ]; then
  echo "Starting unRAID GO script..."
  fromdos </boot/config/go >/var/tmp/go
  chmod +x /var/tmp/go
  /var/tmp/go
fi

if [ -x /etc/rc.d/rc.unRAID ]; then
  echo "Starting unRAID..."
  . /etc/rc.d/rc.unRAID start
fi

if [ -x /etc/rc.d/rc.sabnzbd ]; then
  echo "Starting Usenet daemon..."
  . /etc/rc.d/rc.sabnzbd start
fi

if [ -x /etc/rc.d/rc.transmission-daemon ]; then
  echo "Starting Torrent daemon..."
  . /etc/rc.d/rc.transmission-daemon start
fi

if [ -x /etc/rc.d/rc.eggdrop ]; then
  echo "Starting IRC daemon..."
  . /etc/rc.d/rc.eggdrop start
fi

# invoke apc ups
if [ -x /etc/rc.d/rc.apcupsd ]; then
  echo "Starting APC UPS daemon..."
  . /etc/rc.d/rc.apcupsd start
fi

Link to comment

Did you ever try the setting "Article Cache Limit", by chance?  It allows you to specify a size to cache to memory.  I am thinking about trying that after I confirm my cache drive is not sleeping (need to let me queue finish, as that will definitely keep my cache up and running). 

Hmm... well, I made the setting to 200MB, put the log directory under /var/log, made sure I don't have a watched folder, and haven't downloaded anything (or copied anything to my array) and the cache drive still won't spin down.  My guess is its the general cache folder which stores "admin" items.  I wonder if I could just set the cache directory to the ramdisk... but then again I only have 4 GB of RAM.  Anyone have any thoughts?  My cache drive is a Caviar Black, so it's the most power hungry in the box.  It would be a shame if it's spinning 24/7. 

Link to comment

No. I have these applications tied into /etc/rc.d/rc.local. They automatically start that way. Once again, the handling of running as the user 'downloads' that is handled by the start-stop-daemon utility. The earlier /etc/rc.d/rc.sabnzbd script I posted passes that as a parameter to that utility.

 

As for my security items, it's not user intensive at all. Its only 1 more step I do after verifying the downloads. I'd rather be secure than slightly less burdened but left vulnerable.

 

The same can be accomplished by using 'at'/'cron'/'sabnzbd' to schedule the running of 'newperms' script as well.

 

I am running unRAID 5.0beta2 installed on top of Slackware64 13.2 (Current), so its easier to do setups that persist through reboots as it's a persistent install OS.

 

In a typical unRAID USB OS, have you tried using 'sudo' to run the files as a different user?

 

 

The sudo command isn's present in this OS unfortunately. 

 

Thanks for sharing your config, I'll have a proper sit down and try and set mine up in a similar way soon.

Link to comment

Did you ever try the setting "Article Cache Limit", by chance?  It allows you to specify a size to cache to memory.  I am thinking about trying that after I confirm my cache drive is not sleeping (need to let me queue finish, as that will definitely keep my cache up and running). 

Hmm... well, I made the setting to 200MB, put the log directory under /var/log, made sure I don't have a watched folder, and haven't downloaded anything (or copied anything to my array) and the cache drive still won't spin down.  My guess is its the general cache folder which stores "admin" items.  I wonder if I could just set the cache directory to the ramdisk... but then again I only have 4 GB of RAM.  Anyone have any thoughts?  My cache drive is a Caviar Black, so it's the most power hungry in the box.  It would be a shame if it's spinning 24/7. 

 

I can confirm that the cache dir prevents the cache disk from spinning down. To solve this I tried to set the article cache limit to 512M, but the cache dir still gets written to. I noticed that a lot of files get created in the cache folder while downloading, but they're relatively small (<50kb).

 

It seems like a nice solution to have the admin (.sab) files on the flash drive, and the article cache files on a different location, so I did a feature request on the SAB forums.

Link to comment

After a little more experimentation, I believe the problem to my cache drive not spinning down is actually SickBeard.  I have set the log directory to /var/log, but SB still seems to write to its cache on a somewhat regular basis.  I'm now thinking my best bet is to get a lower-power cache drive and just live with it.  Though it would be nice if SickBeard had more options for its search other than every 'n' hours (like only search every 'n' hours during this span of time).  Perhaps I'll try a feature request :)

Link to comment

After a little more experimentation, I believe the problem to my cache drive not spinning down is actually SickBeard.  I have set the log directory to /var/log, but SB still seems to write to its cache on a somewhat regular basis.  I'm now thinking my best bet is to get a lower-power cache drive and just live with it.  Though it would be nice if SickBeard had more options for its search other than every 'n' hours (like only search every 'n' hours during this span of time).  Perhaps I'll try a feature request :)

 

You can change the location of the cache directory. Stop SickBeard. Open the config.ini file. Change the "cache dir" location. Starting without a cache directory caused me no ill effects. When I found the cache dir on the flash, I deleted it and then set this parameter. The dir was created in the new location just fine. I actually did this a few times before I figured out the problem and didn't have any issues. So, set it to the unRAID filesystem if you want to try that. It will be re-created each time you boot.

 

It should cost you < $10 in power to leave the drive spinning for a year unless you are using a very old (in computer years) drive.

 

Peter

 

Link to comment

Maybe use 'su' instead of 'sudo' ?

 

I tried running the app with "Su nobody" or "su - nobody" but it didn't do anything. I did a "ps -ef" and it wasn't running.

 

I then tried "Su nobody" or "su - nobody"  in isolation but when I put them in the terminal if doesn't echo anything back. 

 

Your script seems good but I'm not 100% sure what I'm doing and couldn't find a ported start-stop-daemon.

 

I think I'll just run the new perms script against the download folders every now and then.  Thanks for the help.

Link to comment

xportz, I'm glad to have helped simplify the installation as much as possible.

 

lionelhutz pm'd me tonight about the updated par2 binary with the fix for the occasional failed repairs. The dependency package has been updated to 2.1 with it, and the Sabnzbd+ inclusive package has been updated with version 0.5.6. I also updated the 1.3 package to 1.4 in case that the older version provides better compatibility for someone out there.

 

Here's the link to the original download post. http://lime-technology.com/forum/index.php?topic=2903.msg30274#msg30274

 

Thanks again lionelhutz for finding the fix and alerting me.

 

Link to comment

hi guys

 

how do i update sabnzbd+ on my unraid server?

 

i have it all working and currently using SABnzbd Version: 0.5.4 and i believe 0.5.6 is out

 

i used to know how to do this but ive forgotten lol

 

running Sickbard Alpha Master and unRAID Server Plus version: 4.5.6 with cache drive.

 

Thanks in advance!

Link to comment

I asked that question back on page 30.  What I was told and what I did was:

Stop SABnzbd. save the sabnzbd.ini file and update the whole sabnzbd directory. Then copy back the sabnzbd.ini file back.  Restart SABnzbd.

 

great mate! will try it

 

edit: thanks, worked a treat i just copied over the new files

 

Thanks again

Link to comment

I asked that question back on page 30.  What I was told and what I did was:

Stop SABnzbd. save the sabnzbd.ini file and update the whole sabnzbd directory. Then copy back the sabnzbd.ini file back.  Restart SABnzbd.

 

great mate! will try it

 

edit: thanks, worked a treat i just copied over the new files

 

Thanks again

 

I'll add to this that if you want to keep your queue, history and RSS data, you've got to copy the admin folder as well.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.