Disk usage confusion: 10G missing on Linux home partition on SSD

If the filesystem is ext4, there are reserved blocks, mostly to help handling and help avoid fragmentation and available only to the root user. For this setting, it can be changed live using tune2fs (not all settings can be handled like this when the filesystem is mounted):

-m reserved-blocks-percentage

Set the percentage of the filesystem which may only be allocated by privileged processes. Reserving some number of filesystem blocks for use by privileged processes is done to avoid filesystem fragmentation, and to allow system daemons, such as syslogd(8), to continue to function correctly after non-privileged processes are prevented from writing to the filesystem. Normally, the default percentage of reserved blocks is 5%.

So if you want to lower the reservation to 1% (~ 2GB) thus getting access to ~ 8GB of no more reserved space, you can do this:

sudo tune2fs -m 1 /dev/nvme0n1p8

Note: the -m option actually accepts a decimal number as parameter. You can use -m 0.1 to reserve only about ~200MB (and access most of those previously unavailable 10GB). You can also use the -r option instead to reserve directly by blocks. It's probably not advised to have 0 reserved blocks.


Deleted files can also contribute to "missing space"

lsof | grep deleted | grep /home

returns this output for me

chrome    11181           criggie   15u      REG              254,0   
4194304  50651663 /home/criggie/.config/google-chrome/BrowserMetrics/BrowserMetrics-5D0236AF-2BAD.pma (deleted)

Which shows that Chrome running as PID 11181 opened that BrowserMetrics file then deleted it, and still has the filehandle open. This means the file is invisible in a directory listing, but is still taking up disk space.

Why do programmes do this? When the running binary terminates, the OS will release the open file handle and the file on disk will be gone, without risk of leaving a stale temp-file around.

What I can't see is how big that file's disk usage is.