Re: ext2 - available+used not equal to total

Oliver Xymoron (oxymoron@waste.org)
Thu, 31 Dec 1998 10:15:30 -0600 (CST)


On Thu, 31 Dec 1998, Hicham Mouline wrote:

> df /
> Filesystem 1024-blocks Used Available Capacity Mounted on
> /dev/hda2 598665 537953 29787 95% /
>
> The thing is that :
>
> 29787+537953 == 567740
>
> So what happened to 598665-567740 == 30925 ?
> Are those for the superblock and the inodes table ?

Superblocks (one copy for each 8MB block group), group descriptors (copy
per each block group, 32 bytes per group), block and inode use bitmaps (2
blocks per group), and inode tables (also local to groups, 128 bytes per
inode). Then there's the 5% reserved space (both blocks and inodes, IIRC).
The reserved space means that root can still write logs, mail, etc., after
users have filled up your drive, and it means there are usually strings of
contiguous blocks around to avoid fragmentation.

--
 "Love the dolphins," she advised him. "Write by W.A.S.T.E.." 

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/