[Linux-cluster] unformat gfs2

Mr.Pine pine5514 at gmail.com
Tue Mar 18 17:43:23 UTC 2014


On Tue, Mar 18, 2014 at 9:00 PM, Bob Peterson <rpeterso at redhat.com> wrote:
> ----- Original Message -----
>> It's GFS2 .
>> Without any use of gfs2_grow,
>> All options are equal ..
>> No,
>>
>> There is many many block types (http://linux.die.net/man/8/gfs2_edit),
>> Do we find 4 (Dinode)? instead of for example 3 (Resource Group Bitmap)?
>>
>> How we could fine bitmaps?
>
> Hi,
>
> To use gfs2_edit properly, you should have an understanding of how the
> gfs2 file system is kept on disk. If you are a Red Hat customer, I have
> several videos on the Red Hat customer portal on how to use gfs2_edit.
>
> The dinode blocks are type 4. There are two kinds of bitmaps: bitmaps
> associated with rgrps (type 2) and bitmaps that follow rgrps (type 3).
> The rgrps are indexed by the rindex system file in the master directory,
> and ri_length tells you how many bitmap blocks follow each rgrp block.
>
> In newer versions (RHEL6+) there are little helper functions in gfs2_edit
> that can tell you the bitmap status, and alter it. For example:
>
> gfs2_edit -p <block number> blocktype /dev/your/device
>
> This command will tell you the block type, for example:
> # gfs2_edit -p root blocktype /dev/mpathc/scratch
> 4 (Block 22 is type 4: Dinode)
>
> gfs2_edit -p <block number> blockalloc /dev/your/device
> This command will tell you the current bitmap setting. The bitmap setting
> may be changed to "3" (dinode) with:
> gfs2_edit -p <block number> blockalloc 3 /dev/your/device
>
> So you could write a script to do it, but again, you would have to be
> careful, and work on a copy, never the original.
>
> Regards,
>
> Bob Peterson
> Red Hat File Systems
>

What is your opinion about this scrip?

for ((i = 17; i < 1756377984; ++i)); do gfs2_edit -p $i blockalloc 3
/dev/sdb >/dev/null 2>&1; done

Could we change all of block allocations to "3"?

> --
> Linux-cluster mailing list
> Linux-cluster at redhat.com
> https://www.redhat.com/mailman/listinfo/linux-cluster




More information about the Linux-cluster mailing list