Yesterday evening, I ran something that produced way more output data that I expected, filling the root ext4 partition as a result. I killed the offending process and started deleting unrelated data I no longer needed, and then saw this:
$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 3.4G 0 3.4G 0% /dev
tmpfs 690M 11M 680M 2% /run
/dev/sda4 810G 806G 0 100% /
tmpfs 3.4G 0 3.4G 0% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 3.4G 0 3.4G 0% /sys/fs/cgroup
/dev/sda1 476M 26M 450M 6% /boot/efi
tmpfs 690M 0 690M 0% /run/user/1000
As you can see, there is no space available even though "used" is four gigabytes smaller than "size". Working under the assumption that these are deleted files that some process has open, I used lsof to find that the biggest one was a 64MB /memfd:pulseaudio.
Baffled, I rebooted the system, being almost sure it would solve the issue. However, the output of df didn't change.
How is this possible and how can I fix it?
$ uname -a
Linux ... 4.16.0-1-amd64 #1 SMP Debian 4.16.5-1 (2018-04-29) x86_64 GNU/Linux
$ cat /etc/issue
Debian GNU/Linux buster/sid \n \l