[SABnzbd-0.4.7] Incorrect free disk space reported

Report & discuss bugs found in SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
cleaudevink
Newbie
Newbie
Posts: 3
Joined: March 12th, 2009, 9:18 am

[SABnzbd-0.4.7] Incorrect free disk space reported

Post 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?
User avatar
switch
Moderator
Moderator
Posts: 1380
Joined: January 17th, 2008, 3:55 pm
Location: UK

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

Post 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.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

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

Post 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
cleaudevink
Newbie
Newbie
Posts: 3
Joined: March 12th, 2009, 9:18 am

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

Post 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.
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

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

Post 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
cleaudevink
Newbie
Newbie
Posts: 3
Joined: March 12th, 2009, 9:18 am

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

Post 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.
Post Reply