df innacurate output

Asked by vivaelamor

Ubuntu 8.10 (amd64)
coreutils: 6.10-6ubuntu1

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

> df -B 4096

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

English Edit question
Ubuntu coreutils Edit question
No assignee Edit question
Solved by:
Florian Diesch
Last query:
Last reply:

This question was originally filed as bug #302677.

Revision history for this message
Florian Diesch (diesch) said :

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.

Revision history for this message
Best Florian Diesch (diesch) said :

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.

Revision history for this message
vivaelamor (vivaelamor84) said :

Thanks for explaining.