Ext2 block structure: size of reserved GDT Blocks
4
votes
1
answer
3649
views
In every publication I found about ext2, the structure of a block group is defined as following:
- Super Block: 1 block
- Group Descriptor: N blocks
- Data Bitmap: 1 block
- Inode Bitmap: 1 block
- Inode Table: N blocks
- Data Blocks: remaining blocks
However in the ext2 kernel doc it is stated that versions >0 may not store copies of the super block and group descriptors in every block group.
When I
fsstat
my ext2 partition, I get following output:
Group: 1:
Inode Range: 1977 - 3952
Block Range: 8193 - 16384
Layout:
Super Block: 8193 - 8193
Group Descriptor Table: 8194 - 8194
Data bitmap: 8451 - 8451
Inode bitmap: 8452 - 8452
Inode Table: 8453 - 8699
Data Blocks: 8700 - 16384
Free Inodes: 1976 (100%)
Free Blocks: 0 (0%)
Total Directories: 0
Group: 2:
Inode Range: 3953 - 5928
Block Range: 16385 - 24576
Layout:
Data bitmap: 16385 - 16385
Inode bitmap: 16386 - 16386
Inode Table: 16387 - 16633
Data Blocks: 16387 - 16386, 16634 - 24576
Free Inodes: 1976 (100%)
Free Blocks: 0 (0%)
There are two things about this output that confuse me:
1. In groups where the SB and group desc. are stored, there is a gap of 256 blocks between the group desc. and data bitmap.
**EDIT: Using dumpe2fs
I just found out that these are reserved GDT blocks, used for online resizing .**
So the new question is, how is the size of these reserved GDT blocks determined?
2. What does Data Blocks: 16387 - 16386
in Group 2 mean?
Asked by goose999
(61 rep)
Apr 2, 2014, 02:32 PM
Last activity: Feb 8, 2021, 11:19 AM
Last activity: Feb 8, 2021, 11:19 AM