Incorrect free space
Forum rules
Help us help you:
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.
Incorrect free space
I have sabnzbd version 2.1.0 running on a raspberry pi. Downloads automatically pause when the size is greater than the free space, which is fair enough, but a problem arises when the calculated free space doesn't match the actual free space. sabnzbd is saying that I have 700MB free space whereas the actual figure is about 60GB. So the question becomes how does it calculate its free space value?
Thanks in advance...
Thanks in advance...
Re: Incorrect free space
It does a basic request to the system service statvfs.
What is the output when you run that command on the command line?
What is the output when you run that command on the command line?
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
Re: Incorrect free space
Does this help?
Code: Select all
#!/usr/bin/python
import os
print os.statvfs("/media/pi/SANDISK128");
posix.statvfs_result(f_bsize=4096, f_frsize=4096, f_blocks=1278529L, f_bfree=247545L, f_bavail=176838L, f_files=333248L, f_ffree=203806L, f_favail=203806L, f_flag=1024, f_namemax=55)
Re: Incorrect free space
We use f_bavail*f_bsize, where f_bavail=available blocks to the user and f_bsize=block size.
If I do that calculation on the data you provided it comes to 687MB. So maybe it's a permission issue?
If I do that calculation on the data you provided it comes to 687MB. So maybe it's a permission issue?
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
Re: Incorrect free space
Unfortunately, nothing we can do. This is what the OS is reporting to us. Maybe it's some permissions issue or some other network related problem that it's getting wrong information.
We just don't have another way to read it than using the system functions..
We just don't have another way to read it than using the system functions..
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
Re: Incorrect free space
Maybe you can also run on the command line the same commands in python as above, and post what it outputs? (but with the path to your NAS of course)
Maybe we can diagnose!
Maybe we can diagnose!
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
Re: Incorrect free space
Sorry but I don't know how to use the statvfs command on macOS.
Re: Incorrect free space
Do you know how to open a terminal / command prompt, and run python?
If so, run this, and post the output here
Code: Select all
python -c "import os; print os.statvfs('/home/me/');"
Code: Select all
$ python -c "import os; print os.statvfs('/home/sander/');"
posix.statvfs_result(f_bsize=4096, f_frsize=4096, f_blocks=3916268L, f_bfree=509852L, f_bavail=305155L, f_files=1003680L, f_ffree=564690L, f_favail=564690L, f_flag=4096, f_namemax=255)
Re: Incorrect free space
Thanks got it:Do you know how to open a terminal / command prompt, and run python?
If so, run this, and post the output here
Code: Select all
python -c "import os; print os.statvfs('/home/me/');"
Code: Select all
posix.statvfs_result(f_bsize=1048576, f_frsize=1024, f_blocks=2332848292, f_bfree=153868548, f_bavail=153868548, f_files=2332848290, f_ffree=153868548, f_favail=153868548, f_flag=2, f_namemax=255)
Re: Incorrect free space
Code: Select all
posix.statvfs_result(
f_bsize=1048576,
f_frsize=1024,
f_blocks=2332848292,
f_bfree=153868548,
f_bavail=153868548,
f_files=2332848290,
f_ffree=153868548,
f_favail=153868548,
f_flag=2,
f_namemax=255)
Can you also post the disk path you used in your command?
This is how sabnzbd calcutates:
Code: Select all
s = os.statvfs(_dir)
if s.f_blocks < 0:
disk_size = float(sys.maxint) * float(s.f_frsize)
else:
disk_size = float(s.f_blocks) * float(s.f_frsize)
if s.f_bavail < 0:
available = float(sys.maxint) * float(s.f_frsize)
else:
available = float(s.f_bavail) * float(s.f_frsize)
return disk_size / GIGI, available / GIGI
disk_size = float(s.f_blocks) * float(s.f_frsize) = 2332848292 * 1024 = 2224 GigiB
available = float(s.f_bavail) * float(s.f_frsize) = 153868548 * 1024 = 146 GigiB
Hmmm ... does that match what you reported what SAB was telling? Was the python run against the NAS path?
Re: Incorrect free space
Hi sander,
I used that command:
The macOS Finder (10.12.5) tells me that my Synology NAS got:
I used that command:
Code: Select all
python -c "import os; print os.statvfs('/Volumes/Medien/');"
- 28,78TB of capacity
- 4,65TB of free space
- I mount it correctly via SMB and it shows up in /Volumes
- I restarted the NAS and my Mac several times
- I did a fresh SAB install
- SAB still tells me that I now only got 235,5GB (deleted some today)
Re: Incorrect free space
Strange.
What is the output of:
What is the output of:
Code: Select all
df -h
Code: Select all
dh -h /Volumes/Medien/
Code: Select all
df -h /Users
Re: Incorrect free space
df -h
df -h /Volumes/Medien/
df -h /Users
Code: Select all
Filesystem Size Used Avail Capacity iused ifree %iused Mounted on
/dev/disk0s2 465Gi 40Gi 425Gi 9% 1289380 4293677899 0% /
devfs 180Ki 180Ki 0Bi 100% 626 0 100% /dev
map -hosts 0Bi 0Bi 0Bi 100% 0 0 100% /net
map auto_home 0Bi 0Bi 0Bi 100% 0 0 100% /home
//[email protected]/Medien 26Ti 22Ti 4.2Ti 84% 23560704746 4541947320 84% /Volumes/Medien
//[email protected]/Dokumente 26Ti 22Ti 4.2Ti 84% 23560704746 4541947320 84% /Volumes/Dokumente
Code: Select all
Filesystem Size Used Avail Capacity iused ifree %iused Mounted on
//[email protected]/Medien 26Ti 22Ti 4.2Ti 84% 23560704746 4541947320 84% /Volumes/Medien
Code: Select all
Filesystem Size Used Avail Capacity iused ifree %iused Mounted on
/dev/disk0s2 465Gi 40Gi 425Gi 9% 1289383 4293677896 0% /
Re: Incorrect free space
Aha. We don't understand what is going on ... is statvfs() wrong (it is depcreceated, after all)? Are we calculating wrong? Is your disk size too big for statvfs()? Do you have quota enabled?
So we have to think about this. The problem is we can't reproduce it.
So we have to think about this. The problem is we can't reproduce it.