Page 1 of 1

ReadyNAS: no space left on device

Posted: November 17th, 2009, 8:20 am
by Docproc
Hi

I've installed SABnzbd on my Netgear ReadyNAS Do, after using it for a long time on a Mac. The installation went OK, but I'm having problems actually downloading anything. The logs complain that many of the files in the cache directory can't be downloaded; when I start SABnzbd from the command line and try to open a .nzb, I get lots of the following:

Code: Select all

2009-11-17 13:06:02,883::ERROR::[sabnzbd] Saving /etc/SABnzbd/cache/SABnzbd_nzf_dMYn0V failed
Traceback (most recent call last):
  File "/usr/local/lib/python2.5/logging/__init__.py", line 753, in emit
    self.flush()
  File "/usr/local/lib/python2.5/logging/__init__.py", line 731, in flush
    self.stream.flush()
IOError: [Errno 28] No space left on device
There is plenty of space on the device - several hundred Gb in fact!

During startup, there don't seem to be any problems, with the exception of:

Code: Select all

2009-11-17 13:04:50,452::INFO::ionice binary... NOT found!
Could this perhaps be the problem? Also, could the "no space left on device" actually be an indicator of some sort of permissions problem?

I'd be grateful for any pointers you can give. I'm using SABnzbd 0.4.12 and Python 2.5 (built manually on the ReadyNAS).

Regards

Glenn.

Re: ReadyNAS: no space left on device

Posted: November 17th, 2009, 8:29 am
by shypike
First the message about ionice is not relevant.
It just means that your NAS doesn't support a tool that can lower disk priority for par2 and unrar.

The other error messages are about the fact that SABnzbd cannot
write its logging info.
BTW: does SABnzbd have any write access to the /etc/SABnzbd folder?
Where is your sabnzbd.ini file located?
How do you start SABnzbd?

Re: ReadyNAS: no space left on device

Posted: November 17th, 2009, 11:01 am
by Docproc
Thanks for the quick reply shypike.

The problem was indeed to do with the permissions on the /etc/SABnzbd folder - they were too restrictive to allow the user that the daemon was running as to write. I'd checked the permissions on the cache, logs and download folders but forgotten about the parent folder. Doh!

All working fine now :)

Regards

Glenn.

Re: ReadyNAS: no space left on device

Posted: November 18th, 2009, 3:44 am
by Docproc
It seems I spoke too soon, the "no free disk space" errors have returned  :(

To make things a little cleaner, I've set a 2G limit in the configuration. SABnzbd pauses with a "WARNING too little diskspace forcing PAUSE". However there are 700+Gb free.

The warning above seems to be produced by assembler.py. My Python's not good enough to figure out where it's trying to write to that's causing the problem.

The cache, logs, download directories and sabnzbd.ini files are in /etc/SABnzbd. This directory and its subdirectories all have 777 permissions (this was the problem previously). So I'm not sure where to go next.

Any help would be appreciated.

Glenn.

P.S. I'm starting SABnzbd in an init.d script with the following command:

/usr/local/bin/python2.5 /root/src/SABnzbd/SABnzbd.py -d -f /etc/SABnzbd/sabnzbd.ini

Re: ReadyNAS: no space left on device

Posted: November 18th, 2009, 5:14 am
by shypike
You told SABnzbd to stop downloading when less than 2G is free :)
The limit is the amount of diskspace that needs to be kept free.

Re: ReadyNAS: no space left on device

Posted: November 18th, 2009, 5:22 am
by Docproc
There are 800Gb free on the disk in question!

My setting the 2Gb limit was a way to get SABnzbd to pause more gracefully; if I don't have that limit set I get intermittent "ERROR: write error, disk full?

Re: ReadyNAS: no space left on device

Posted: November 19th, 2009, 3:17 am
by Docproc
Does anyone have any suggestions as to why SABnzbd is erroneously reporting a full disk when there are over 800Gb free?

The problem seems to occur at the assembly stage, the individual posts seem to be downloaded OK.

The errors take the form of:

2009-11-19 00:39:31,595 WARNING [assembler] missing
...
and then eventually

2009-11-19 00:39:31,609 ERROR [assembler] Disk full! Forcing Pause

Re: ReadyNAS: no space left on device

Posted: November 19th, 2009, 7:40 am
by shypike
SABnzbd is just responding to what it gets back from system calls.
Error 28 in Python means "disk full". What else can we do?

Code: Select all

    except IOError, (errno, strerror):
        # 28 == disk full => pause downloader
 	if errno == 28:
 	    logging.error('[%s] Disk full! Forcing Pause', __NAME__)
 	    sabnzbd.pause_downloader()
 	else:
 	    logging.error('[%s] Disk error on creating file %s', __NAME__, filepath)
Maybe you can modify it to this code:

Code: Select all

    except IOError, (errno, strerror):
        # 28 == disk full => pause downloader
 	if errno == 28:
 	    logging.error('[%s] Disk full! Forcing Pause [%s]', __NAME__, strerror)
 	    sabnzbd.pause_downloader()
 	else:
 	    logging.error('[%s] Disk error on creating file %s', __NAME__, filepath)
That way you'll also see a text describing the error.
Maybe that will shed some light on the problem.

Re: ReadyNAS: no space left on device

Posted: November 19th, 2009, 7:55 am
by Docproc
Thanks for the suggestion - it seems that SABnzbd is right after all.

It turns out that the ReadyNAS has 2 partitions, the main data one which is as big as the drives you have in the machine (so hundreds of Gb in my case) and a smaller root partition which is only 2Gb, where the system software is installed.

Having followed the instructions at http://www.thibernet.com/442-install-sa ... adynas-duo , my SABnzbd directory - including the potentially large cache/ and downloads/ directories (but not the final destination directory) - was in this small partition, hence the disk full errors.

The reason it was only intermittent was that there just happened to be enough space for SABnzbd to download and extract some of the small-ish files I was using, but when I tried a larger (1.5Gb) one, it hit the 2Gb limit and caused the disk full errors.

I'll email the author of the ReadyNAS SAB install guide to let him know about this issue.

Thanks for your help on this. I've made a donation.

Regards

Glenn.

Re: ReadyNAS: no space left on device

Posted: November 19th, 2009, 8:02 am
by shypike
Glad to see this worked out OK.
There is room for improvement though.
The weak point is that the "cache" folder and the "incomplete" folder can
be on different drives. Only the drive holding "incomplete" is guarded.
The practical consequence is that you'd better have "cache" and "incomplete" on the same drive.
BTW: "complete" is not guarded because it's too hard to predict how much space unpacking needs.
The idea is that "incomplete" should be guarded because you don't want
to loose precious downloads. A failed unpack can at least be retried.