Incorrect free space

Get help with all aspects of 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.
User avatar
.maxx
Release Testers
Release Testers
Posts: 85
Joined: April 10th, 2008, 6:32 am

Re: Incorrect free space

Post by .maxx » June 30th, 2017, 2:41 am

Here are the disk usage results:

Before Download

Code: Select all

posix.statvfs_result(f_bsize=1048576, f_frsize=1024, f_blocks=2332848292, f_bfree=228927912, f_bavail=228927912, f_files=2332848290, f_ffree=228927912, f_favail=228927912, f_flag=2, f_namemax=255)
free: 223562.414062
After Download

Code: Select all

posix.statvfs_result(f_bsize=1048576, f_frsize=1024, f_blocks=2332848292, f_bfree=227568040, f_bavail=227568040, f_files=2332848290, f_ffree=227568040, f_favail=227568040, f_flag=2, f_namemax=255)
free: 222234.414062

User avatar
sander
Release Testers
Release Testers
Posts: 6716
Joined: January 22nd, 2008, 2:22 pm

Re: Incorrect free space

Post by sander » June 30th, 2017, 6:52 am

Diff-ing those number gives:

Code: Select all

free:	223562	
free:	222234	-1328
f_ffree	228927912	
f_ffree	227568040	-1359872
f_favail	228927912	
f_favail	227568040	-1359872
f_bfree	228927912	
f_bfree	227568040	-1359872
f_bavail	228927912	
f_bavail	227568040	-1359872
So all numbers go down in the same way. So there is no special factor involved. It seems like a rollover.

User avatar
sander
Release Testers
Release Testers
Posts: 6716
Joined: January 22nd, 2008, 2:22 pm

Re: Incorrect free space

Post by sander » June 30th, 2017, 7:01 am

.maxx wrote:
June 30th, 2017, 2:34 am
Here the LARGEFILE64 results

Correct

Code: Select all

$ /statvfs_with_LARGEFILE64_SOURCE_for_MacOS64bit /Users/
Available [MB]: 434190
Wrong

Code: Select all

$/statvfs_with_LARGEFILE64_SOURCE_for_MacOS64bit /Volumes/Medien
Available [MB]: 223562
So no change? :-(

User avatar
.maxx
Release Testers
Release Testers
Posts: 85
Joined: April 10th, 2008, 6:32 am

Re: Incorrect free space

Post by .maxx » June 30th, 2017, 7:03 am

yes, no change :(

User avatar
sander
Release Testers
Release Testers
Posts: 6716
Joined: January 22nd, 2008, 2:22 pm

Re: Incorrect free space

Post by sander » June 30th, 2017, 7:46 am

What is the output of

Code: Select all

sw_vers

User avatar
.maxx
Release Testers
Release Testers
Posts: 85
Joined: April 10th, 2008, 6:32 am

Re: Incorrect free space

Post by .maxx » June 30th, 2017, 8:03 am

Code: Select all

ProductName:	Mac OS X
ProductVersion:	10.12.5
BuildVersion:	16F73

User avatar
sander
Release Testers
Release Testers
Posts: 6716
Joined: January 22nd, 2008, 2:22 pm

Re: Incorrect free space

Post by sander » July 2nd, 2017, 1:01 pm

Hi Maxx,

Another Mac user is complaining about too low free space reported. The "nice" thing about this case: not too big disk (250GB), internal in his system. So that rules out 1) very large size (like your 22TB disk with 4+ TB free space) and 2) NAS dependencies.

So I wonder: if you set both your SABnzbd's Temp and Compelete to your local disk, are free disk space correct? Can you check?

Could you also also download & run the Python script I link to in https://forums.sabnzbd.org/viewtopic.ph ... ad#p112488 (warning: in Dutch).

EDIT:

So that Python script is here: https://raw.githubusercontent.com/sande ... k_space.py
Instruction: Right click on the link, Sava As, then run the script with

Code: Select all

python disk_space.py /
and post the output here. Thank you.

User avatar
.maxx
Release Testers
Release Testers
Posts: 85
Joined: April 10th, 2008, 6:32 am

Re: Incorrect free space

Post by .maxx » July 3rd, 2017, 4:24 am

Hi sander,

yes, if I set the Temp & Complete folder to local, the shown free space is correct.

Side Info:
I replaced one of my NAS 3TB drives with a 6TB. MacOS and my NAS now shows me a correct free space of 6,6xTB.
SAB instead shows me only 2,6TB free space -> 4TB missing.

Local -> Correct

Code: Select all

Mediencenter:~ Mediencenter$ python /disk_space.py /Users/
python version: 2.7.10 (default, Feb  7 2017, 00:08:15) 
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)]
Directory /Users/
statvfs posix.statvfs_result(f_bsize=1048576, f_frsize=4096, f_blocks=121853976, f_bfree=111101708, f_bavail=111037708, f_files=4294967279, f_ffree=4293630797, f_favail=4293630797, f_flag=0, f_namemax=255)
disk_size [GB] 464.836029053
available [GB] 423.575241089
The df took [ms]: 7
/dev/disk0s2    475992 42001    433741     9% 1336482 4293630797    0%   /
Available [MB]: 433741
NAS -> wrong

Code: Select all

Mediencenter:~ Mediencenter$ python /disk_space.py /Volumes/Medien
python version: 2.7.10 (default, Feb  7 2017, 00:08:15) 
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)]
Directory /Volumes/Medien
statvfs posix.statvfs_result(f_bsize=1048576, f_frsize=1024, f_blocks=850916804, f_bfree=2801489844, f_bavail=2801489844, f_files=850916802, f_ffree=2801489844, f_favail=2801489844, f_flag=2, f_namemax=255)
disk_size [GB] 811.497501373
available [GB] 2671.7089119
The df took [ms]: 6
NAS df -h -> Correct

Code: Select all

Mediencenter:~ Mediencenter$ df -h /Volumes/Medien/
Filesystem                              Size   Used  Avail Capacity     iused      ifree %iused  Mounted on
//[email protected]_smb._tcp.local/Medien   29Ti   22Ti  6.6Ti    78% 23819230734 7096457140   77%   /Volumes/Medien

User avatar
sander
Release Testers
Release Testers
Posts: 6716
Joined: January 22nd, 2008, 2:22 pm

Re: Incorrect free space

Post by sander » July 3rd, 2017, 8:12 am

yes, if I set the Temp & Complete folder to local, the shown free space is correct.
Good for you, but pity for this case;

Side Info:
I replaced one of my NAS 3TB drives with a 6TB. MacOS and my NAS now shows me a correct 6,6xTB.
SAB instead shows me only 2,6TB -> 4TB missing.
Yes, we already knew. But that is really a too long shot & too hard to anayze: NAS, very big drive. ... too many factors involved.

Let's focus on the MacBook user reporting problem with his moderate sized internal hard disk.

User avatar
.maxx
Release Testers
Release Testers
Posts: 85
Joined: April 10th, 2008, 6:32 am

Re: Incorrect free space

Post by .maxx » July 3rd, 2017, 8:58 am

guys I've made some more tests and I've found something out.

I was alway connected to the NAS via SMB.
Now I tried AFP and SAB shows me the correct 6,6TB.

Then I switched again to SMB and get the wrong 2,6TB.

User avatar
sander
Release Testers
Release Testers
Posts: 6716
Joined: January 22nd, 2008, 2:22 pm

Re: Incorrect free space

Post by sander » July 3rd, 2017, 9:09 am

.maxx wrote:
July 3rd, 2017, 8:58 am
guys I've made some more tests and I've found something out.

I was alway connected to the NAS via SMB.
Now I tried AFP and SAB shows me the correct 6,6TB.

Then I switched again to SMB and get the wrong 2,6TB.
Good catch!

... and now: should and/or can we do anything about this? Report it anywhere?

Or just remember it as a known problem ...?

User avatar
.maxx
Release Testers
Release Testers
Posts: 85
Joined: April 10th, 2008, 6:32 am

Re: Incorrect free space

Post by .maxx » July 3rd, 2017, 9:21 am

AFP is deprecated and SMB is the standard since macOS Sierra even for the Time Machine.
NZBget also shows it wrong.

User avatar
sander
Release Testers
Release Testers
Posts: 6716
Joined: January 22nd, 2008, 2:22 pm

Re: Incorrect free space

Post by sander » July 4th, 2017, 2:24 pm

Hi Maxx,

NZBget also shows it wrong.
The nzbget code is pure C, see these few lines: https://github.com/nzbget/nzbget/blob/0 ... #L675-L679 so that proves the root cause is at the MacOS-system-level. Not in python, not in SABnzbd.

Furthermore, it seems something specific to you: I've let a Mac friend test it (SMB mounted NAS, 6TB) and there is no problem there:

Code: Select all

thelema:Desktop frank$ python disk_space.py /Volumes/Data/
python version: 2.7.10 (default, Feb  7 2017, 00:08:15) 
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)]
Directory /Volumes/Data/
statvfs posix.statvfs_result(f_bsize=1048576, f_frsize=8192, f_blocks=732482664, f_bfree=620759038, f_bavail=620759038, f_files=732482662, f_ffree=620759038, f_favail=620759038, f_flag=2, f_namemax=255)
disk_size [GB] 5588.39923096
available [GB] 4736.01560974
The df took [ms]: 6
//com.apple.idms.appleid.prd.444a357blabla/Data   5722520 872840   4849679    16% 111723624 620759038   15%   /Volumes/Data
Available [MB]: 4849679
Correct sizes reported. Which means we can't reproduce it.

The other Mac user with SABnzbd did not have a problem after all. A false alarm.

So ... IMHO there is not something we should & could in SABnzbd.

User avatar
safihre
Administrator
Administrator
Posts: 3292
Joined: April 30th, 2015, 7:35 am
Location: Switzerland
Contact:

Re: Incorrect free space

Post by safihre » July 4th, 2017, 2:33 pm

Agreed. We will keep it in mind in case more reports come in!

prizrak
Newbie
Newbie
Posts: 1
Joined: September 28th, 2013, 9:44 pm

Re: Incorrect free space

Post by prizrak » September 30th, 2017, 9:46 pm

Same issue here, also Mac user, in my case using an NFS mount.

Post Reply