[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ext2




On Wed, 10 Jun 1998, Miki Shapiro wrote:

> Someone explain this to me.
> 
> Filesystem         1024-blocks  Used Available Capacity Mounted on
> /dev/sda2            2012598 1355846   552732     71%   /
> /dev/hda1            7963671 3093915  4456906     41%   /mnt/disk2
> 
> 3093915 + 4456906 does not add up to 7963671.
> where the hell did half a Gig go? inodes?
> 
> 
>                 Regards
> 		Miki Shapiro <Aris>
Hi.

As I wrote yesterday, your disk has some more things on it then files.
There are few data structure that lets Linux use the files efficiently (or
use them at all..). Every disk (or other storage media with ext2 on it)
has a superblock with information, and some backups of it. There are block
groups with backups, but those things don't take up so much space. The
things that take the space are the inodes, that keeps information about
the files. I don't think that it should take half a gig. though(every
inode is one block == 1024 bytes). How many files do you have? (Every file
or directory needs one inode, and if you have lots of small ones the
overhead is very big. Another point to think about is that there lots of
reserved inodes so it'd be efficient to add a new file (there are
preserved blocks too, so the kernel wouldn't have to look for free
blocks, but I think that they are counted as free (I'm not sure, and I'm
still at the Uni. so I can't check. If you're very interested you should
read TLK (The Linux Kernel (from the LDP)) and the web sites I sent
yesterday )

Liran.

---
http://www.math.tau.ac.il/~liranz/