Shadow copies of the EXT2 superblock

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
eryjus
Member
Member
Posts: 286
Joined: Fri Oct 21, 2011 9:47 pm
Libera.chat IRC: eryjus
Location: Tustin, CA USA

Shadow copies of the EXT2 superblock

Post by eryjus »

I apologize for the silly question. I have been studying the following document: http://www.nongnu.org/ext2-doc/ext2.pdf
With the introduction of revision 1 and the sparse superblock feature in Ext2, only specific block groups contain copies of the superblock and block group descriptor table. All block groups still contain the block bitmap, inode bitmap, inode table, and data blocks. The shadow copies of the superblock can be located in block groups 0, 1 and powers of 3, 5 and 7.
For whatever reason, I am not confident in my own brain today.... "... power of 3 ..." is stating "N cubed, where N == 1, 2, 3, 4, 5, ...", NOT "N * 3".

Also, my calculations tell me that there is a theoretical maximum of 262,144 block groups (2,147,483,647 / 8,192 for 1K blocks [rounded up]).

My brain tells me that my thinking above is correct, but something is nagging at me I cannot put a finger on.... Can someone please check my thinking above?


Thanks!!

EDIT: .... OR .... should I be thinking "3 to the power of N, where N == 1, 2, 3, 4, 5, etc..."
Adam

The name is fitting: Century Hobby OS -- At this rate, it's gonna take me that long!
Read about my mistakes and missteps with this iteration: Journal

"Sometimes things just don't make sense until you figure them out." -- Phil Stahlheber
gerryg400
Member
Member
Posts: 1801
Joined: Thu Mar 25, 2010 11:26 pm
Location: Melbourne, Australia

Re: Shadow copies of the EXT2 superblock

Post by gerryg400 »

Power of 3 means 3, 9, 27, 81, 243, 729 .... etc.
Power of 5 means 5, 25, 125, 625 .... etc.
Power of 7 means 7, 49, 343 ... etc.

Which gives 0, 1, 3, 5, 7, 9, 25, 27, 49, 81, 125, 243, 343, 625, 729 ... etc.
If a trainstation is where trains stop, what is a workstation ?
User avatar
eryjus
Member
Member
Posts: 286
Joined: Fri Oct 21, 2011 9:47 pm
Libera.chat IRC: eryjus
Location: Tustin, CA USA

Re: Shadow copies of the EXT2 superblock

Post by eryjus »

gerryg400 wrote:Which gives 0, 1, 3, 5, 7, 9, 25, 27, 49, 81, 125, 243, 343, 625, 729 ... etc.
Thank you so much!!!
Adam

The name is fitting: Century Hobby OS -- At this rate, it's gonna take me that long!
Read about my mistakes and missteps with this iteration: Journal

"Sometimes things just don't make sense until you figure them out." -- Phil Stahlheber
Post Reply