[Breezy] Incorrect Report by df -h
Ed Fletcher
ed at fletcher.ca
Sun Jan 1 01:52:22 UTC 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Mike Bird wrote:
| On Sat, 2005-12-31 at 13:10, Ed Fletcher wrote:
|
|>root:/mnt # df -h (other partitions not shown)
|>Filesystem Size Used Avail Use% Mounted on
|>/dev/sdb7 9.2G 33M 8.7G 1% /temp
|>/dev/sda2 55G 33M 52G 1% /mnt
|>root:/mnt #
|>
|>The numbers don't add up.
|>
|>I know that they are empty.
|
|
| In addition to your lost+found blocks, there are blocks used
| for superblocks, bitmaps, group descriptors, inodes, journal,
| indirect blocks, and probably others too.
|
| As a test I just created an empty 32MB ext3 filesystem:
|
| # mke2fs -j /dev/VG0/test
|
| It has 14% used:
|
| Filesystem 1K-blocks Used Available Use% Mounted on
| /dev/mapper/VG0-test 31729 4127 25964 14% /test
|
| --Mike Bird
|
|
|
Thanks Mike. And also thanks to Tim Frost, Vram and Jim Richardson.
Your replies got me looking at the effects of a journaled filesystem. I
looked at the man page for fsck, which led me to the man page for
fsck.ext3, which led me to the man page for debugfs.
So I ran debugfs on /dev/sda2 (after unmounting it) and learned that
sda2 was indeed originally made with a journaling filesystem. There are
720816 reserved blocks (5% of the total) and each block is 4096 bytes.
So there is my three gigabyte discrepancy. And the same 5% ratio holds
true for sdb7.
Thanks again to all of you. I learned something new today. I've never
used debugfs before, but it's a powerful tool. (And hopefully, not
needed very often.)
I like having a mystery solved.
Ed
- --
Ed Fletcher
ed at fletcher.ca
What difference does it make to the dead, the orphans and the homeless,
whether the mad destruction is wrought under the name of totalitarianism
or the holy name of liberty or democracy? - Mahatma Gandhi (1869-1948)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFDtzXWlTbGAQhc1A8RAtz5AJ9+waVS0/al+qMem8xV74fxuZt1ygCgusG2
XuCqC9tjsurpVMdewLIfiPo=
=OTMF
-----END PGP SIGNATURE-----
More information about the ubuntu-users
mailing list