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.
df -m
. There is a lot of rounding going on when you ask fordf -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