[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Linux-cluster] unformat gfs2

----- Original Message -----
> Hi,
> Scripts is very very slow, so i should write program in c/c++.
> I need some confidence about data structures and data location on disk.
> As i reviewed blocks of data:
> All reserved blocks (GFS2 specific blocks) start by : 0x01161970
> Blocktype store location is at Byte # 8,
> Type of start block of each resource group is: 2
> Bitmaps are in block types 2 & 3.
> In block type 2, bitmap info starts from Byte # 129
> In block type 3, bitmap info starts from Byte # 25
> Length of RGs are const, 5 in my volume (out put of gfs2_edit -p rindex
> /dev/..)
> Is this info right?
> Logic of my program seams should be like this:
> (1)
> Loop in device and temporary store block id of dinode blocks, and also
> their bitmap locations
> (2)
> Change bitmap of blocks to 3 (11)
> Bob, could you confirm this?
> Regards
> Pine.

Hi Pine,

This is correct. The length of RGs is properly determined by the values
in the "rindex" system file, but 5 is very common, and is usually constant.
(It may change if you used gfs2_grow or gfs2_convert from gfs1).
The bitmap is 2 bits per block in the resource group, and it's relative
to the start of the particular rgrp. You should probably use the same
algorithm in libgfs2 to change the proper bit in the bitmaps. You can
get this from the public gfs2-utils git tree.


Bob Peterson
Red Hat File Systems

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]