ext3 real disk occupation of a file
Youness HAFFANE
youness254 at gmail.com
Tue Aug 18 15:51:51 UTC 2009
Hi Eric,
I have understood from the document, that for each file, we have 3 extra
blocks (indirect) that refer to :
- the group descriptor
- the block bitmap
- the inode bitmap
Is that right?
If not, to what the indirect blocks refer to? and are there always only 3
blocks for each file in ext2/3fs?
Best regards
youness
On Tue, Aug 18, 2009 at 4:45 PM, Eric Sandeen <sandeen at redhat.com> wrote:
> Youness HAFFANE wrote:
> >
> > Hi,
> >
> > I'm trying to understand why extra blocks are added when you create a
> > file in the ext3 fs:
> >
> > for example, let's create a file of 1111 blocks (4096 bytes for each
> block)
> >
> > $ dd if=/dev/zero of=foo bs=4096 count=1111
> >
> > the real occupation disk is then:
> >
> > $ du -B 4096 foo
> > 1114
> >
> > instead of 1111
> >
> > So where the 3 extra blocks come from?
>
> from the indirect blocks. This is how ext2/3 keep track of the layout
> of the file.
>
> see http://e2fsprogs.sourceforge.net/ext2intro.html
> and in particular the diagram:
> http://e2fsprogs.sourceforge.net/ext2-inode.gif
> in that paper.
>
> -Eric
>
> > Thanks for help!
> >
> > youness
> >
> > --
>
>
--
Y.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/ext3-users/attachments/20090818/fb3e3de6/attachment.htm>
More information about the Ext3-users
mailing list