1

This question already has an answer here:

Recently I was running du -h / on my partition as I was downloading a large file, and noticed that the available space decreased while the used space did not increase (in the last two lines of this output.) None of the new files that are being downloaded are owned by anyone else other than myself.

What would cause this? I have a feeling it is a rounding error, but would that mean that the Used space is being rounded up while the Avail space is rounded down? It seems like the free and total bytes are being subtracted but I'm not sure.

alex@server:~/cc-pipermail$ df -h /
Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1        20G  8.6G   10G  47% /
alex@server:~/cc-pipermail$ df -h /
Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1        20G  8.7G   10G  47% /
alex@server:~/cc-pipermail$ df -h /
Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1        20G  8.7G  9.9G  47% /

For clarification, the used space is 8.7GB, but then the available changes from 10G to 9.9G with the used space not changing.

This question is different from Why is df missing 500MB of available space? because that question is discussing a discrepancy with a volume which has extra inodes allocated, while this question showed that df did report free space just moments before the file continued to download.

marked as duplicate by Stephen Rauch, Rui F Ribeiro, G-Man, peterh, DarkHeart Dec 18 '17 at 2:54

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    @jimmij It's not obvious to me why this is a dupe. Can you elaborate? – Faheem Mitha Dec 17 '17 at 22:36
  • You don't know that the difference is 0.1 GiB; all you know is that there is a difference: it may be only 1 byte. (10 683 731 148 bytes rounds to 9.9 GiB, 10 683 731 149 bytes rounds to 10 GiB.) Please repeat the experiment with df -m. There is a lot of rounding going on when you ask for df -h; it may be that some process allocated a tiny 1 byte file and this pushed the rounding of free space from 10.0 GiB to 9.9 GiB... – AlexP Dec 17 '17 at 23:04

Browse other questions tagged or ask your own question.