df -h, du -ahx and flash size not match

Artem Bityutskiy dedekind1 at gmail.com
Wed Mar 7 12:30:02 EST 2012


On Tue, 2012-02-21 at 08:56 +0000, Esteban Lopez wrote:
> I read the UBIFS FAQ and UBIFS documentation but all the explanation
> is about free space. I don't understand why df -h reports 236M of
> total space if I have 469762048 bytes in this partition.

I think it is also around the same set of issues. Because we do not in
advance what kind of data the FS will be holding and how it is written,
we do not really know how much data can fit to the FS. So UBIFS makes
pessimistic calculations and reports its size as the absolutely minimum
amount of space which it can fit in the worst case scenario. So in your
case UBIFS decides that in the worst case it can fit a 236M file of
uncompressible data (e.g., a movie).

This is kind of a compromise. Imagine UBIFS reported 500MiB free space,
then you write a 300MiB AVI movie, and it does not fit. So we prefer to
report the absolute minimum.

-- 
Best Regards,
Artem Bityutskiy




More information about the linux-mtd mailing list