Re: ext2 filesystem superblock



T.M. Sommers wrote:
Sevag Krikorian wrote:

Hi all,

I'm working on understanding filesystems and thought I'd start with the ext2 filesystem (since I have an image of that lying around).
I wrote a little test program to scan the superblock of a 10mb linux hd image.


...

All of the information seems to make sence except for the blocks/group
I get 8192 blocks per group but only 10240 total blocks. The documentation doesn't state it, is it normal for the last group on the partition to have a partial share of the blocks? Or does this mean that
there is only one group and the last 2048 blocks of the disk are not used? Or maybe something altoghter different...


This link has some information:

http://uranus.it.swin.edu.au/~jn/explore2fs/es2fs.htm

You will probably get more knowledgeable answers to such questions in a Linux newsgroup.


Thanks for the link. This answered my question:

"s_blocks_per_group
The filesystem is divided up into block groups. Note that the last block group may be incomplete"


A little bit of info that was missing from the documents I was using.

--
[kain]
http://www.geocities.com/kahlinor
.



Relevant Pages

  • Re: 2.6.26-rc7: BUG at kernel/power/snapshot.c:493
    ... I am attaching the full dmesg. ... ext2 filesystem found at block 0 ... I thought initrd is read-only RAM disk -- it ...
    (Linux-Kernel)
  • Re: Recover partition info from memory
    ... This is the output I get from gpart: ... Possible partition(SGI XFS filesystem), size, offset ... Partition(Linux ext2 filesystem): primary ...
    (comp.os.linux.setup)
  • Re: Recover partition info from memory
    ... This is the output I get from gpart: ... Possible partition(SGI XFS filesystem), size, offset ... Partition(Linux ext2 filesystem): primary ...
    (comp.os.linux.hardware)
  • Re: 2.6.0-test3 _still_ cannot mount root fs
    ... > filesystem, without an initrd, with the following message ... mounted root (ext2 filesystem) readonly ... > Herbert's debug patch produced the same messages with ext3 compiled in. ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: Problems with SanDisk USB stick
    ... recognizes it fine, and after formatting it with ext2, I can mount it fine ... as an ext2 filesystem. ... and see if problems occur during the original mount. ...
    (comp.os.linux.misc)