Welcome to the Linux Foundation Forum!

Explanation for these numbers

I am reading the explanation that is below in the 20.9.c. Block Groups III section. I read it several times and cannot understand this. Can someone explain this.

"The number of block groups is constrained by the fact that the block bitmap, which identifies used and free blocks within the group, has to fit in a single block. Thus, if a block is 4096 bytes in size, a block group can contain no more than 32 K blocks, or 128 MB. If we take the largest possible block group size, a 10 GB partition would thus have to have at least 80 block groups."

Comments

  • coop
    coop Posts: 916

    I don't understand the confusion I'm afraid

    4096 * (32*1024) = 128MB

    and

    10 GB / 80 = 128 MB

  • luisviveropena
    luisviveropena Posts: 1,249

    Hi surikoya,

    It's as Coop explained. Here with some few more details:

    One block ==> 4096 bytes.
    A block group ==> 32 K blocks
    32 x 1024 blocks
    ==> 32768 blocks

    Converting this to bytes:
    32768 x 4096 = 134217728 bytes

    Then you can use a calculator to translate to MB, as https://whatsabyte.com/P1/byteconverter.htm . And the result will be 128 MB.

    Regards,
    Luis.

  • surikoya
    surikoya Posts: 5

    Thank you coop and uisviveropena. That was helpful.

  • luisviveropena
    luisviveropena Posts: 1,249

    It's a pleasure!

Categories

Upcoming Training