Package: tech-ctte Severity: normal X-Debbugs-Cc: 761...@bugs.debian.org
As reported in #761424, the "sizes" output by df(1) are not actual sizes, due to the "units" used. The "units" used are merely unit prefixes. Moreover, df uses the same pseudo-units with different meanings. The output can therefore be misleading if one attempts to interpret it. 2 different calls seem to give different measurements for the same filesystems:
chealer@debian:~$ LANG=C df -h Filesystem Size Used Avail Use% Mounted on rootfs 1.8T 317G 1.4T 19% / udev 10M 0 10M 0% /dev tmpfs 252M 5.4M 247M 3% /run /dev/disk/by-uuid/a00f8767-e954-4b81-8035-c6bb414671cb 1.8T 317G 1.4T 19% / tmpfs 5.0M 4.0K 5.0M 1% /run/lock tmpfs 961M 0 961M 0% /run/shm /dev/sdb2 2.2G 122M 2.0G 6% /tmp chealer@debian:~$ LANG=C df -H Filesystem Size Used Avail Use% Mounted on rootfs 2.0T 340G 1.6T 19% / udev 11M 0 11M 0% /dev tmpfs 264M 5.7M 259M 3% /run /dev/disk/by-uuid/a00f8767-e954-4b81-8035-c6bb414671cb 2.0T 340G 1.6T 19% / tmpfs 5.3M 4.1k 5.3M 1% /run/lock tmpfs 1.1G 0 1.1G 0% /run/shm /dev/sdb2 2.4G 128M 2.2G 6% /tmp chealer@debian:~$
In the first example call, JEDEC prefixes are used, while SI prefixes are used in the second. Michael Stone denies, excusing the behavior with space scarcity, documentation, and what he considers as little impact:
I'm not going to deviate from upstream. [...] The space is more important (in my opinion) than the need for a constant reminder of the unit. The documentation is there for people to read the first time, after that it's just not that important. (Even for the numbers above the difference isn't really significant--the relative sizes are the consistent, and what are the odds that you need exactly 12 gigasomethings? If you did need exactly that much space, you're probably better off looking at kbytes or bytes anyway.)
The space scarcity and impact arguments do not hold, and unfortunately, even the documentation does not define the pseudo-sizes currently output. -- Filipus Klutiero http://www.philippecloutier.com