Page 1 of 1

[SABnzbd-0.4.7] Incorrect free disk space reported

Posted: March 12th, 2009, 9:20 am
by cleaudevink
Since I upgraded my Windows 2003 NAS from 1TB to 1,5TB, Sabnzbd 0.4.6 reported free disk space as 0.00 GB / 7,55 GB. After I upgraded Sabnzbd to 0.4.7. the problem still exists.

Maybe I need to post some configuration files for debugging?

Re: [SABnzbd-0.4.7] Incorrect free disk space reported

Posted: March 12th, 2009, 10:08 am
by switch
You could post us some hard drives so we have over 1.5TB of storage on one partition ;)

I don't think any log files will help much as that part of the code is not logged. I will try using some different windows api calls, since this problem seems to be windows specific. Look for it to be fixed in version 0.5.

Re: [SABnzbd-0.4.7] Incorrect free disk space reported

Posted: March 12th, 2009, 10:26 am
by shypike
Does Windows report the correct amount of space (assuming you use Windows)?

This piece of code is used to determine free space:

Code: Select all

#!/bin/python
GIGI = float(2 ** 30)

import win32api
available, totalsize, totalfree = win32api.GetDiskFreeSpaceEx('u:\\')

print available / GIGI
This is a direct call to the Windows operating system.
If the value is not correct, it must be Windows (or Python interpreter we use).

You could install the ActiveState Python release on your system,
put the above code in a text file (testme.py), change u: with your drive letter
and see what gives.

URL for Python: http://downloads.activestate.com/Active ... 32-x86.msi

Re: [SABnzbd-0.4.7] Incorrect free disk space reported

Posted: March 12th, 2009, 12:07 pm
by cleaudevink
I'm very sorry! I was posting this from the office, and my mind was somewhere else...

I forgot to mention that I installed sabnzbd on ubuntu server, which has a smb mount to a windows 2003 server. This mount is used as download directory.

The diskspace is reported correctly in Windows.

Re: [SABnzbd-0.4.7] Incorrect free disk space reported

Posted: March 12th, 2009, 12:40 pm
by shypike
In that case could you try this script and report the result?

Code: Select all

#!/usr/bin/python
import os
os.statvfs
import statvfs
GIGI = float(2 ** 30)

s = os.statvfs("YOUR_DISK_PATH_HERE")
free = (s[statvfs.F_BAVAIL] * s[statvfs.F_FRSIZE]) / GIGI
total = (s[statvfs.F_BLOCKS] * s[statvfs.F_FRSIZE]) / GIGI

print "Free %s" % free
print "total %s" % total

Re: [SABnzbd-0.4.7] Incorrect free disk space reported

Posted: March 13th, 2009, 4:16 am
by cleaudevink
When trying to get the script running I figured out the problem...

The smb mount was disconnected when rebooting the NAS. Sabnzbd started downloading in the mount directory (local drive!) Annoyed by the low drive warning I resumed the downloading several times which filled up the local disk till the last bit. Then I rebooted but the mount failed. I didn't noticed this before because the directory structure of the NAS was recreated on the local drive by the SABNZB downloading.

Anyway, after deleting the files in the mount directory and remouting the NAS smb share, everything works perfectly again.