df innacurate output

Asked by vivaelamor on 2008-11-27

Ubuntu 8.10 (amd64)
coreutils: 6.10-6ubuntu1

Using df I am getting innacurate usage output, for example:

> df -B 4096
produces:

Filesystem 4K-blocks Used Available Use% Mounted on
/dev/mapper/data3-part1 180268330 135394455 35716755 80% /media/da3pa1

If I calculate Used + Available I get 171111210 instead of 180268330

Similar happens with different block sizes

File system is ext3, partition is an LVM one. Same problem on a non LVM raid1 parition.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu coreutils Edit question
Assignee:
No assignee Edit question
Solved by:
Florian Diesch
Solved:
2008-11-27
Last query:
2008-11-27
Last reply:
2008-11-27

This question was originally filed as bug #302677.

Florian Diesch (diesch) said : #1

Thank you for taking the time to report this issue and helping to make Ubuntu better.

Examining the information you have given us, this does not appear to be a bug report so I am closing it and converting it to a question in the support tracker to answer it there.

Best Florian Diesch (diesch) said : #2

On each file system some percentage 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%.

This 5% are the difference between the sum of used and available space and the total space.

vivaelamor (vivaelamor84) said : #3

Thanks for explaining.