[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190610033927.GA15963@mit.edu>
Date: Sun, 9 Jun 2019 23:39:27 -0400
From: "Theodore Ts'o" <tytso@....edu>
To: Jianchao Wang <jianchao.wan9@...il.com>
Cc: Artem Blagodarenko <artem.blagodarenko@...il.com>,
linux-ext4@...r.kernel.org, adilger.kernel@...ger.ca
Subject: Re: [HELP] What are the allocated blocks on a newly created ext4 fs ?
On Mon, Jun 10, 2019 at 11:25:47AM +0800, Jianchao Wang wrote:
> Hi Artem
>
> Thanks so much for your help.
>
> On 2019/6/6 20:32, Artem Blagodarenko wrote:
> > Hello Jianchao,
> >
> > Not enought input data to give an answer. It depends on mkfs options. For example, if flex_bg option is enabled, then several block groups are tied together as one logical block group; the bitmap spaces and the inode table space in the first block group, so some groups are not totally free just after FS creating.
>
> In my environment, there are 16 bgs per flex_bg.
> The bitmaps and inode table .etc should lay on the first bg of every flex_bg.
> So I can see there are about 8223 blocks allocated in the 1st bg of every flex_bg.
>
> But as you can see in the output of mb_groups, there are some bgs
> which get allocated about 1024 blocks.
>
> I have out figured out what are they for.
The best way to understand what the blocks are used for is to use the
dumpe2fs program, e.g:
% mke2fs -t ext4 -Fq /tmp/foo.img 1T
% dumpe2fs /tmp/foo.img | more
...
Group 0: (Blocks 0-32767) csum 0xe6f6 [ITABLE_ZEROED]
Primary superblock at 0, Group descriptors at 1-128
Reserved GDT blocks at 129-1152
Block bitmap at 1153 (+1153), csum 0xb033995a
Inode bitmap at 1169 (+1169), csum 0x108d3d73
Inode table at 1185-1696 (+1185)
23385 free blocks, 8181 free inodes, 2 directories, 8181 unused inodes
Free blocks: 9383-32767
Free inodes: 12-8192
Group 1: (Blocks 32768-65535) csum 0xe50b [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED]
Backup superblock at 32768, Group descriptors at 32769-32896
Reserved GDT blocks at 32897-33920
Block bitmap at 1154 (bg #0 + 1154), csum 0x00000000
Inode bitmap at 1170 (bg #0 + 1170), csum 0x00000000
Inode table at 1697-2208 (bg #0 + 1697)
31615 free blocks, 8192 free inodes, 0 directories, 8192 unused inodes
Free blocks: 33921-65535
Free inodes: 8193-16384
...
Regards,
- Ted
Powered by blists - more mailing lists