Closed Mikaela closed 5 years ago
Short answer - you should be using %avail rather than %free, which is what df is actually reporting.
Long answer - If you take the difference between the used space and the total space, you will get the free space that i3status is reporting. 49GB - 34GB = 15GB and 618GB - 533GB = 85GB. I recently came across this and got similarly bothered, and found in the coreutils FAQ or somewhere like that, that many file systems reserve a few percent of space that is free, but not available to normal users. Only root is permitted to use that space (presumably to recover a system in an emergency), and that the file systems will work sub-optimally long before you get to that limit.
Thank you :)
I talked about this with some people before I finally opened this issue and they found this weird when I said I was using ext4. I didn't know of ext4 having emergency space, but I would have expected this to be it with btrfs.
You're very welcome. :-)
I'm also using ext4 and thought I'd found a bug in df (and since it was in the FAQ I'm guessing that several people before me had come to the same conclusion).
I am using:
and i3status shows this:
However in
df -h
I see:Am I using incorrect syntax or why is there so great difference? 13G vs 15 GiB and 85,4 GiB vs 54 G? I noticed this some days ago when I had gotten my disk full and rsync was errorring me while i3status said I had space left still.
Here is full
df -h
in case it helps, I have snapd installed, so it's messy: