Page 3 of 4
Re: Incorrect free space
Posted: June 30th, 2017, 2:41 am
by .maxx
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
Re: Incorrect free space
Posted: June 30th, 2017, 6:52 am
by sander
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.
Re: Incorrect free space
Posted: June 30th, 2017, 7:01 am
by sander
.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? :-(
Re: Incorrect free space
Posted: June 30th, 2017, 7:03 am
by .maxx
yes, no change
Re: Incorrect free space
Posted: June 30th, 2017, 7:46 am
by sander
Re: Incorrect free space
Posted: June 30th, 2017, 8:03 am
by .maxx
Code: Select all
ProductName: Mac OS X
ProductVersion: 10.12.5
BuildVersion: 16F73
Re: Incorrect free space
Posted: July 2nd, 2017, 1:01 pm
by sander
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
and post the output here. Thank you.
Re: Incorrect free space
Posted: July 3rd, 2017, 4:24 am
by .maxx
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
//admin@SERVER._smb._tcp.local/Medien 29Ti 22Ti 6.6Ti 78% 23819230734 7096457140 77% /Volumes/Medien
Re: Incorrect free space
Posted: July 3rd, 2017, 8:12 am
by sander
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.
Re: Incorrect free space
Posted: July 3rd, 2017, 8:58 am
by .maxx
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.
Re: Incorrect free space
Posted: July 3rd, 2017, 9:09 am
by sander
.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 ...?
Re: Incorrect free space
Posted: July 3rd, 2017, 9:21 am
by .maxx
AFP is deprecated and SMB is the standard since macOS Sierra even for the Time Machine.
NZBget also shows it wrong.
Re: Incorrect free space
Posted: July 4th, 2017, 2:24 pm
by sander
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.
Re: Incorrect free space
Posted: July 4th, 2017, 2:33 pm
by safihre
Agreed. We will keep it in mind in case more reports come in!
Re: Incorrect free space
Posted: September 30th, 2017, 9:46 pm
by prizrak
Same issue here, also Mac user, in my case using an NFS mount.