SABnzbd fails to regist correct disk space

Report & discuss bugs found in SABnzbd

SABnzbd fails to regist correct disk space

Postby Matreiro » July 15th, 2011, 9:27 am

Hi everyone!!!

My problems started last night when SABnzbd started giving me errors about "it couldn't create the folders for the incomplete nzbs and the folder for the complete nzb", which is very strange because it had been downloding for that folders for several weeks. I couldn't find any work around that error and I uninstall SABnszb im my Synology 411j and install the package again, but know it doesn't get the right free space on my RAID 5 array. I have 4,5TB of disk space free and it only detects 7GB.

Is there some way to solve this problem? I've already uninstall and reinstalled the package 3 times with the same result.

I'm running SABnzbd 0.6.5 on Synology 411j with a package made by zebulon available here http://synoblog.superzebulon.org/
I'm using a 4x2 TB Hard Drive SHR array, similar to RAID 5 on my NAS Synology 411j.
SABnzbd was working ok until last night, no problem whatsoever happened of abnormal to justify any fail, it simply decided to trough errors as I said.

Can you please Help me?
Matreiro
Newbie
Newbie
 
Posts: 13
Joined: July 15th, 2011, 9:10 am

Re: SABnzbd fails to regist correct disk space

Postby shypike » July 15th, 2011, 9:41 am

It's very likely that the Python interpreter on the Synlogy reports diskspace incorrectly.
We cannot fix that.
You can disable the free disk check in Config->Folders.
If SABnzbd cannot create folders and files it's 99% sure that it's an operating system issue.
SABnzbd knows nothing about disks, it just tells the OS to create/open a file.
User avatar
shypike
Administrator
Administrator
 
Posts: 19829
Joined: January 18th, 2008, 1:49 pm

Re: SABnzbd fails to regist correct disk space

Postby Matreiro » July 15th, 2011, 11:55 am

Thanks shypike

I'll try to reinstall the python package also to see if the bug solves it self and I'll try to disable free disk check if nothing else works.
Matreiro
Newbie
Newbie
 
Posts: 13
Joined: July 15th, 2011, 9:10 am

Re: SABnzbd fails to regist correct disk space

Postby Matreiro » July 15th, 2011, 9:02 pm

Done everything I could, even reinstall the Synology OS (DSM) 3 times and still SABnzbd fails to check the real free disk space and still has problems on creating folders.
Everything was working fine until yesterday, so why this?

SABnzbd is still saying that I have 1,75GB free when I have 3,82TB off free space.

What have I done so far: Uninstalled python package, sabnzbd package, reinstalled them and nothing. Reset may Synology NAS OS for clean install three times, installed the needed packages as I've always installed and still the same problems.

Does anyone has any idea?

Image
Image

Thanks guys.
Matreiro
Newbie
Newbie
 
Posts: 13
Joined: July 15th, 2011, 9:10 am

Re: SABnzbd fails to regist correct disk space

Postby Spark » July 15th, 2011, 9:55 pm

I've the same problem ! How can we fix it ? In ssh, df commands works, can someone help me to try to find where sabnzbd search the free space ?

Thx
Spark
Newbie
Newbie
 
Posts: 14
Joined: July 15th, 2011, 9:52 pm

Re: SABnzbd fails to regist correct disk space

Postby shypike » July 16th, 2011, 4:42 am

Matreiro wrote:and still SABnzbd fails to check the real free disk space and still has problems on creating folders.


What kind of trouble does SABnzbd report about not being able to create folders or files?
Check its log file.
Also check whether all paths are correct. Config->Folders shows what they are.

You can check the free disk code by starting the Python interpreter from an ssh session:
Then type in this mini-program:

Code: Select all
import os
import statvfs
s = os.statvfs("/PATH_OF_YOUR_DISK")
print (s[statvfs.F_BAVAIL] * s[statvfs.F_FRSIZE]) / float(2 ** 30)

That should print out the number of free GBytes (like 11.34433827).
If not, then your Python interpreter has a bug (or is not fully compatible with Synology).
User avatar
shypike
Administrator
Administrator
 
Posts: 19829
Joined: January 18th, 2008, 1:49 pm

Re: SABnzbd fails to regist correct disk space

Postby Matreiro » July 16th, 2011, 7:18 am

Here you can find SABnzbd the log file:

http://www.mediafire.com/?pput9a67m01px01

As far the other little program you said me to run, I can't run it, I'm completely noob in this programming things. But still as Python is run like a package installed via the Package Management, same like SABnzbd, and not as something installed on the system it self I don't know if this little program should work, because when I try to run it on my ssh session it only gives erros of commands not found.

My head is almost exploding with this...bahhhhhhhhhhhhhhh ???
Matreiro
Newbie
Newbie
 
Posts: 13
Joined: July 15th, 2011, 9:10 am

Re: SABnzbd fails to regist correct disk space

Postby shypike » July 16th, 2011, 7:32 am

Does /volume1/downloads actually exist? Or even /volume1?
Does SABnzbd even ave access rights to those.
Open an ssh session and type:
cd /volume1
mkdir /volume1/downloads
mkdir /volume1/downloads/incomplete

If you get any error messages, the issue is outside SABnzbd but lies in
the OS or its configuration.

You have to understand that we cannot really support aything beyond
Windows, OSX and mainstream Linux.
The packages for other platforms are created by other people
and should be supported by them.
All we can do is give some general troubleshooting tips.
User avatar
shypike
Administrator
Administrator
 
Posts: 19829
Joined: January 18th, 2008, 1:49 pm

Re: SABnzbd fails to regist correct disk space

Postby Matreiro » July 16th, 2011, 7:55 am

Yes /volume1 exists, SABnzbd has full access to read and write the entire volume.

Made what you've asked and here is the result:

Synology> mkdir /volume1/downloads
Synology> mkdir /volume1/downloads/incomplete
Synology> mkdir /volume1/downloads
mkdir: can't create directory '/volume1/downloads': File exists
Synology> mkdir /volume1/downloads/incomplete
mkdir: can't create directory '/volume1/downloads/incomplete': File exists
Synology>

So I successfully created the directories with the commands you gave me with no error reported.

And about the free disc problem? Nothing you can do? I know I'm really asking much of you, but can't you ssh to NAS and snif around?
Matreiro
Newbie
Newbie
 
Posts: 13
Joined: July 15th, 2011, 9:10 am

Re: SABnzbd fails to regist correct disk space

Postby shypike » July 16th, 2011, 8:13 am

Does SABnzbd still give the same errors when you start it up?
The disk free issue I cannot solve if Python does it wrong.
Since I have no NAS, there's nothing to sniff around.
User avatar
shypike
Administrator
Administrator
 
Posts: 19829
Joined: January 18th, 2008, 1:49 pm

Re: SABnzbd fails to regist correct disk space

Postby Matreiro » July 16th, 2011, 8:45 am

Yes still gives the same error:

Incorrect parameter
Cannot create download_dir folder /volume1/downloads/incomplete

Problem is partially solved if I use absolute address \volume1\downloads\incomplete

But still it wasn't supposed to work like this, and with no disk space I can´t download anything.

Thanks for all.
Matreiro
Newbie
Newbie
 
Posts: 13
Joined: July 15th, 2011, 9:10 am

Re: SABnzbd fails to regist correct disk space

Postby Spark » July 16th, 2011, 5:53 pm

[ root@Synology: ~ ] $ df -kP /volume1/downloads/
Filesystem 1024-blocks Used Available Capacity Mounted on
/dev/vg1/volume_1 12455575744 980716 12454492628 0% /volume1

[ root@Synology: ~ ] $ cat test.py
import os
import statvfs
s = os.statvfs("/volume1/downloads")
print (s[statvfs.F_BAVAIL] * s[statvfs.F_FRSIZE]) / float(2 ** 30)

[ root@Synology: ~ ] $ /usr/local/python26/bin/python test.py
-4506.47025681

It is what I get in the UI for left space. Why is there a negative value ? Is it a bug with my python version ?
I used package Python 2.6.6 1 spk from http://synoblog.superzebulon.org/2011/0 ... 6-5-1-spk/
Spark
Newbie
Newbie
 
Posts: 14
Joined: July 15th, 2011, 9:52 pm

Re: SABnzbd fails to regist correct disk space

Postby shypike » July 16th, 2011, 7:06 pm

Spark wrote:It is what I get in the UI for left space. Why is there a negative value ? Is it a bug with my python version ?


Possibly the disk is so large that the Python function cannot handle it within short integers.
Try this one to shed some more light:

Code: Select all
import os
import statvfs
s = os.statvfs("/volume1/downloads")
print s[statvfs.F_BAVAIL],  s[statvfs.F_FRSIZE]


If one of the numbers is negative, then it's a problem in Python (its library actually).
If not, I probably can create a work-around.
User avatar
shypike
Administrator
Administrator
 
Posts: 19829
Joined: January 18th, 2008, 1:49 pm

Re: SABnzbd fails to regist correct disk space

Postby Spark » July 17th, 2011, 8:44 am

[ root@Synology: ~ ] $ cat test.py
import os
import statvfs
s = os.statvfs("/volume1/downloads")
print s[statvfs.F_BAVAIL], s[statvfs.F_FRSIZE]


[ root@Synology: ~ ] $ /usr/local/python26/bin/python test.py
-1181344137 4096

[ root@Synology: ~ ] $ df -kP /volume1/downloads/
Filesystem 1024-blocks Used Available Capacity Mounted on
/dev/vg1/volume_1 12455575744 980708 12454492636 0% /volume1

-1181344137 doesn't equals to 12454492636

Actually, my /volume1 is about 12 To (and it's not finished :D, that's why it is empty yet)

I Think there is a 8To limit with the actual library. 8To look lites an integer history.
Spark
Newbie
Newbie
 
Posts: 14
Joined: July 15th, 2011, 9:52 pm

Re: SABnzbd fails to regist correct disk space

Postby Spark » July 17th, 2011, 8:53 am

I made another test:

[ root@Synology: ~ ] $ cat test3.py
import os

disk = os.statvfs("/volume1/downloads");

capacity = disk.f_bsize * disk.f_blocks
available = disk.f_bsize * disk.f_bavail
used = disk.f_bsize * (disk.f_blocks - disk.f_bavail)

print capacity
print available
print used


[ root@Synology: ~ ] $ /usr/local/python26/bin/python test3.py
-4837676482560
-4838785585152
1109102592
Spark
Newbie
Newbie
 
Posts: 14
Joined: July 15th, 2011, 9:52 pm

Next

Return to Bug Reports