naimab wrote:
> Hello,
>
> I was alarmed to discover that df reports 99% full on my biggest
> partition, but on closer inspection found that the numbers did not add
> up:
>
> Filesystem 1K-blocks Used Available Use% Mounted on
> /dev/sda7 445062208 416628196 5826144 99% /home
>
> the difference between the total reported space and the reported used
> space is over 28Gb, but the available space is reported as just under
> 6Gb.
>
> Is there any way I can discover what is wrong here, or should I enroll
> back in primary school and re-learn how to add?
No, your math is OK. When an ext3 partition is created using the
defaults, a certain percentage is reserved for use by root, which is
your 28 GB. Such reservation is to allow Linux to boot even if all the
user space is allocated, and is a safety measure.
Adding to the excelent expllanation of lwfinger, the default reserved space in ext2/3 is 5%. Now on todays very big file systems this can lead to a large amount (in your case more then 20GB). You can change this (live) using
tune2fs -m ...
see the man page of tune2fs. My opinion is not to put it to 0%, but some people might argue that that is not a problem on data only file systems (like containing a database) because boot does not use something there.
Many thanks for both the explanation and the advice. It was a surprise to learn from you that even on a non-bootable partition so much space is reserved for root, but the good news is that apparently I can add numbers up
It is reasonable to assume that root will not need so much space, so I think I will reduce it to less than 1% - this is a data only partition after all.