Page 1 of 2

Zero (0) space available?

Posted: March 2nd, 2012, 12:54 am
by opentoe
I think the program is telling me there is no space available, but I have GB's of space left on every drive, and a few TB's available on my server. Can someone tell me what that red icon all the way to the right is saying?

Image

Re: Zero (0) space available?

Posted: March 2nd, 2012, 2:18 am
by sander
Is this your first download with SAB? If so, wait for the first download to finish, and SAB will show the correct amount of Free Space.
If not: is your free space enormous, like 2+ TB?

Re: Zero (0) space available?

Posted: March 2nd, 2012, 2:48 pm
by opentoe
No, I've downloaded many many items. My free space is over 4TB right now, yes. Does SAB have a problem with lots of free space? I've left the local temp stuff on the local drive, and just using my server for the final resting place for the finished files. On an older version, the program would actually stop downloading thinking there was no space left. I think I had to keep restarting it or lowering the "low space" value. I can't remember. At least now, it downloads but still persists with that odd error.

Re: Zero (0) space available?

Posted: March 2nd, 2012, 3:36 pm
by sander
See http://forums.sabnzbd.org/viewtopic.php ... disk+space

However, I don't understand the "0"; from the thread mentioned I would expect that SAB would mention a high number (2TB or so), not 0.

If you have python on your system, you could run the python snippets on that thread and see what is reported.

Re: Zero (0) space available?

Posted: March 2nd, 2012, 5:33 pm
by shypike
Which version of SABnzbd are you using?

Re: Zero (0) space available?

Posted: March 2nd, 2012, 9:09 pm
by opentoe
sander wrote:See http://forums.sabnzbd.org/viewtopic.php ... disk+space

However, I don't understand the "0"; from the thread mentioned I would expect that SAB would mention a high number (2TB or so), not 0.

If you have python on your system, you could run the python snippets on that thread and see what is reported.

No python. I'm running Windows 7 / 32 bit version with no other software installed except Sickbeard and Sabnzbd. Also MS Security Essentials. Sorry, I don't know what you mean when you say run the python snippet. Is this easy to do?
I'm running version 0.6.15

Also, the "space" that Sab thinks there isn't any is an unRAID server.

Image

Re: Zero (0) space available?

Posted: March 3rd, 2012, 12:01 am
by sander
I think this is the relevant code from SABnzbd:

Code: Select all

if sabnzbd.WIN32:
    # windows diskfree
    import win32api
    def diskfree(_dir):
        """ Return amount of free diskspace in GBytes
        """
        try:
            available, disk_size, total_free = win32api.GetDiskFreeSpaceEx(_dir)
            return available / GIGI
        except:
            return 0.0
Possibly the "win32api.GetDiskFreeSpaceEx(_dir)" in the 'try' raises an exception (or it just returns 0 to 'available' for your network drive), and thus it returns 0.0, which is then presented in your SAB interface. The underlying reason could be that you're using a (big) network drive.

You can download python for windows from http://www.python.org/getit/windows/ . If you install that, it will be quite easy to verify my assumption above. I have no Windows, let alone a TB-network drive, so I can't verify it myself.

Re: Zero (0) space available?

Posted: March 3rd, 2012, 4:14 am
by shypike
As long as you don't set a minimum disk space limit in SABnzbd,
you can safely ignore the message.
There's probably some limit in the system call that SABnzbd uses to get the disk space.
I'll have a look into it, but like Sander I don't have the "problem" of a 14T disk.

Re: Zero (0) space available?

Posted: March 6th, 2012, 5:33 pm
by 1gr8ftoy
I have 4.5TB free on my unraid server. I am running SABnzbd on Mac OS X. I have exactly the same thing happening. SABnzbd only shows 176GB free. I also have a temp folder as the download folder. Is there a fix for this on OS X? I did the test in the linked topic and my free space result is not a negative number, which was mentioned as the possible problem in that topic.

Re: Zero (0) space available?

Posted: March 6th, 2012, 6:01 pm
by sander
1gr8ftoy wrote:I have 4.5TB free on my unraid server. I am running SABnzbd on Mac OS X. I have exactly the same thing happening. SABnzbd only shows 176GB free. I also have a temp folder as the download folder. Is there a fix for this on OS X? I did the test in the linked topic and my free space result is not a negative number, which was mentioned as the possible problem in that topic.
What is the number that is reported?

The unraid server is a separate server which you access over the network? If so, which protocol do you use: samba/windows-share, NFS, or ... ?

BTW: could you test what happens if you occupy an extra 200 GB on the unraid server: which free space is then reported by SAB? Is it 4.3 GB ... ? EDIT: I meant 4.3 TB.

Re: Zero (0) space available?

Posted: March 6th, 2012, 6:12 pm
by 1gr8ftoy
sander wrote:
1gr8ftoy wrote:I have 4.5TB free on my unraid server. I am running SABnzbd on Mac OS X. I have exactly the same thing happening. SABnzbd only shows 176GB free. I also have a temp folder as the download folder. Is there a fix for this on OS X? I did the test in the linked topic and my free space result is not a negative number, which was mentioned as the possible problem in that topic.
What is the number that is reported?

The unraid server is a separate server which you access over the network? If so, which protocol do you use: samba/windows-share, NFS, or ... ?

BTW: could you test what happens if you occupy an extra 200 GB on the unraid server: which free space is then reported by SAB? Is it 4.3 GB ... ?
The numbers that I get back are "370328784 512"

I access the shares over NFS. I do not currently have 200GB of stuff I can put on it but after it is filled up I can post back and let you know what it does.

EDIT: By the way in Finder it says 4.59TB free, this is the same as what unRAID reports.

Re: Zero (0) space available?

Posted: March 7th, 2012, 12:15 pm
by sander
1gr8ftoy wrote:
The numbers that I get back are "370328784 512"

I access the shares over NFS. I do not currently have 200GB of stuff I can put on it but after it is filled up I can post back and let you know what it does.

EDIT: By the way in Finder it says 4.59TB free, this is the same as what unRAID reports.
You're on a Mac, aren't you? If so, I guess a Mac also understands the "df" (disk free) command. Can you run the commands below and post the output here?

Code: Select all

df -BG
df -BT

Re: Zero (0) space available?

Posted: March 7th, 2012, 5:13 pm
by 1gr8ftoy
sander wrote:
1gr8ftoy wrote:
The numbers that I get back are "370328784 512"

I access the shares over NFS. I do not currently have 200GB of stuff I can put on it but after it is filled up I can post back and let you know what it does.

EDIT: By the way in Finder it says 4.59TB free, this is the same as what unRAID reports.
You're on a Mac, aren't you? If so, I guess a Mac also understands the "df" (disk free) command. Can you run the commands below and post the output here?

Code: Select all

df -BG
df -BT

Code: Select all

df -b -t
Filesystem                            512-blocks       Used  Available Capacity  Mounted on
/dev/disk0s2                          1951583808  523396656 1427675152    27%    /
devfs                                        363        363          0   100%    /dev
/dev/disk1s2                           392578112  138345440  254232672    36%    /Volumes/Ads
map -hosts                                     0          0          0   100%    /net
map auto_home                                  0          0          0   100%    /home
/dev/disk1s3                          1560272888  749820784  810452104    49%    /Volumes/BOOTCAMP
map -static                                    0          0          0   100%    /Volumes/Newsgroup Downloads
map -static                                    0          0          0   100%    /Volumes/DLNA Server
map -static                                    0          0          0   100%    /Volumes/Network Temp Share
map -static                                    0          0          0   100%    /Volumes/Trailers
map -static                                    0          0          0   100%    /Volumes/Torrents
UNRAID:/mnt/user/Network_Temp_Share  11720750656 2781087920 8939662736    24%    /Volumes/Network Temp Share
UNRAID:/mnt/user/Torrents            11720750656 2781087920 8939662736    24%    /Volumes/Torrents
UNRAID:/mnt/user/Trailers            11720750656 2781087920 8939662736    24%    /Volumes/Trailers
UNRAID:/mnt/user/Newsgroup_Downloads 11720750656 2781087920 8939662736    24%    /Volumes/Newsgroup Downloads
UNRAID:/mnt/user/DLNA_Server         11720750656 2781087920 8939662736    24%    /Volumes/DLNA Server

Code: Select all

df -b -g
Filesystem                           1G-blocks Used Available Capacity  Mounted on
/dev/disk0s2                               930  249       680    27%    /
devfs                                        0    0         0   100%    /dev
/dev/disk1s2                               187   65       121    36%    /Volumes/Ads
map -hosts                                   0    0         0   100%    /net
map auto_home                                0    0         0   100%    /home
/dev/disk1s3                               743  357       386    49%    /Volumes/BOOTCAMP
map -static                                  0    0         0   100%    /Volumes/Newsgroup Downloads
map -static                                  0    0         0   100%    /Volumes/DLNA Server
map -static                                  0    0         0   100%    /Volumes/Network Temp Share
map -static                                  0    0         0   100%    /Volumes/Trailers
map -static                                  0    0         0   100%    /Volumes/Torrents
UNRAID:/mnt/user/Network_Temp_Share       5588 1326      4262    24%    /Volumes/Network Temp Share
UNRAID:/mnt/user/Torrents                 5588 1326      4262    24%    /Volumes/Torrents
UNRAID:/mnt/user/Trailers                 5588 1326      4262    24%    /Volumes/Trailers
UNRAID:/mnt/user/Newsgroup_Downloads      5588 1326      4262    24%    /Volumes/Newsgroup Downloads
UNRAID:/mnt/user/DLNA_Server              5588 1326      4262    24%    /Volumes/DLNA Server

Re: Zero (0) space available?

Posted: March 7th, 2012, 11:26 pm
by sander
Question: did you use "-b -t" and "-b -g" instead of capital "-BT and -BG" on purpose? Is that Mac-style?

Anyway:

Code: Select all

UNRAID:/mnt/user/Newsgroup_Downloads      5588 1326      4262    24%    /Volumes/Newsgroup Downloads
That is the correct amount of GBs, so it is possible to see them (in other words: the network protocol itself is not doing something wrong). Conclusion: the python call statvfs is not reporting the correct amount and I would say that's a bug in python (not SABnzbd). As said: I have no 4TB harddisk to test this, so I can't report a bug at python. Maybe you can?

How important and urgent is this for you? If it is, you can change the system call in sabnzbd/misc.py to a call with the "df -BG". (As you might have read, Shypike doesn't want to do a system() call each few seconds, so this won't get in the SABnzbd code).

EDIT:

Code: Select all

>>> import commands
>>> commands.getoutput('df .')
'Filesystem           1K-blocks      Used Available Use% Mounted on\n/dev/sda8            155935652 140317388   7697164  95% /home'
>>> 
>>> commands.getoutput('df .').split('\n')
['Filesystem           1K-blocks      Used Available Use% Mounted on', '/dev/sda8            155935652 140317380   7697172  95% /home']
>>> commands.getoutput('df .').split('\n')[1]
'/dev/sda8            155935652 140317380   7697172  95% /home'
>>> commands.getoutput('df .').split('\n')[1].split()
['/dev/sda8', '155935652', '140317384', '7697168', '95%', '/home']
>>> commands.getoutput('df .').split('\n')[1].split()[3]
'7697168'
>>>

So that last command would work in this case.

For reference: this is the output on my Ubuntu system:

Code: Select all

sander@R540:~$ df .
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda8            155935652 140317556   7696996  95% /home
sander@R540:~$
So, both on Mac and Ubuntu the available space is in the column 4. But my df shows in "1K-blocks", and I believe your df shows in other sizes. Brrr. So that brings me back to my question: doesn't "bf -BG" work on your system?

Re: Zero (0) space available?

Posted: March 8th, 2012, 12:39 am
by 1gr8ftoy
df -BG
df: illegal option -- B
usage: df [-b | -H | -h | -k | -m | -g | -P] [-ailn] [-T type] [-t] [filesystem ...]


df -k shows in 1k blocks on a Mac.

I cannot find misc.py to save my life. I am looking inside the SABnzbd+ package and there is everything under the sun except that file. I searched my whole computer and can't find a misc.py in a sab folder. Where do I look for it on a Mac system?