Recently I got a message about "0 bytes free" on a certain partition.
So I looked and, sure enough:
$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 65190604 10920296 50959160 18% /
udev 966544 4 966540 1% /dev
tmpfs 389532 744 388788 1% /run
none 5120 0 5120 0% /run/lock
none 973828 152 973676 1% /run/shm
/dev/sda5 397327316 391010276 0 100% /media/8b5e40d0-95b3-4e60-831c-e9b9aeadbfa4
there are 0 bytes available on that partition.
So I deleted a bunch of files I didn't need on this machine, and emptied the trash. I expected the "Used" to get smaller and the "Available" to get larger by the same amount.
But what actually happened was
$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 65190604 10921184 50958272 18% /
udev 966544 4 966540 1% /dev
tmpfs 389532 744 388788 1% /run
none 5120 0 5120 0% /run/lock
none 973828 152 973676 1% /run/shm
/dev/sda5 397327316 390986836 0 100% /media/8b5e40d0-95b3-4e60-831c-e9b9aeadbfa4
the "Used" actually did get smaller, but the "Available" is still zero.
I rebooted the machine, and I still see 0 in the "Available" column.
Why is "Available" always zero, even when I delete a bunch of files so "Used" gets smaller?
Why doesn't deleting files increase available space?
I am running Ubuntu 12.04 LTS.
$ df -hi
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/sda1 4.0M 512K 3.5M 13% /
udev 205K 486 204K 1% /dev
tmpfs 208K 390 208K 1% /run
none 208K 3 208K 1% /run/lock
none 208K 7 208K 1% /run/shm
/dev/sda5 25M 975K 24M 4% /media/8b5e40d0-95b3-4e60-831c-e9b9aeadbfa4