Hi! I noticed that Dolphin and strangely, btop are both incorrectly reporting the used disk space on my arch machines. I’m using 19 - 20GiB on my laptop according to df -h / and du -h /, but Dolphin reports that i’m using 38GiB. This happens on both of my physical arch machines + a VM i use for testing. To confirm this, i asked two friends to compare their readings, one on arch and one on fedora. My friend on arch had the exact same issue as me, and he was able to confirm that df -h reports correctly as he uses ZFS, and ZFS itself can tell you how much is being used. The friend on Fedora didn’t have this issue.
By default, ext2/3/4 filesystems reserve 5% of the space to be useable only by root. This is to avoid a normal user completely filling the disk which would then cause system components to fail whenever they next needed to write to the disk.
5% of 234GB would be ~11GB, which added to the “Used” amount in df would result in about 30GB “space that isn’t free”.
So, it seems like they all generally agree that ~30GB of the space on that disk is not free to have new files written - I might be missing something, but does that make sense from your perspective?
so basically, btop and dolphin count the reserved space for root, but df does not? and what about other cases where root isn’t the owner of a disk? i’ve seen this happen on other mounted drives, the same with my friend.
The reserved space is a filesystem attribute, not based on a particular username on the system owning any paths within that filesystem, or it being mounted by any particular user. If you check through the comments of that Ask Ubuntu page, you can see some further information on what all df is doing and more attributes of ext4 filesystems.
Not sure how ZFS works, but Fedora installs use btrfs by default, which would presumably operate differently.