Closed czert closed 7 months ago
The ext4 filesystem reserves 5 % of disk size. os.statvfs(path).f_bfree reports this reserve as free disk space, while f_bavail considers it "full".
os.statvfs(path).f_bfree
f_bavail
I believe f_bavail gives more useful information, as the reserved space cannot be used. Also, it's in line with what df reports.
df
Sounds sensible, many thanks!
The ext4 filesystem reserves 5 % of disk size.
os.statvfs(path).f_bfree
reports this reserve as free disk space, whilef_bavail
considers it "full".I believe
f_bavail
gives more useful information, as the reserved space cannot be used. Also, it's in line with whatdf
reports.