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
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:
Last query:
Last reply:

This question was originally filed as bug #302677.

Revision history for this message
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.

Revision history for this message
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.

Revision history for this message
vivaelamor (vivaelamor84) said :
#3

Thanks for explaining.