[Linux-cluster] unformat gfs2

Bob Peterson rpeterso at redhat.com
Tue Mar 18 18:22:19 UTC 2014


----- Original Message -----
> Hi,
> 
> Do you mean program likes this?
> 
> for ((i = 17; i < 1756377984; ++i)); do
>         ss=$(gfs2_edit -p $i blocktype /dev/sdc | cut -d " " -f 1);
>         if [[ $ss -eq 4 ]]; then
>                 gfs2_edit -p $i blockalloc 3 /dev/sdb >/dev/null 2>&1;
>         fi
> done
> 
> I'm a C/C++ programmer, if you trust program logic, i would try
> to implement with C/C++. and would public in reply.
> 
> Regards.
> Pine.

Hi,

Yes, you can do something like that, but again, do not include the
journal's blocks. You can do gfs2_edit -p master /dev/sdc to
determine the block of the quota file, which should be past the
journals. Then use that value for the starting point of i.
For example:
# gfs2_edit -p master /dev/mpathc/scratch | grep quota
   8/8 [6c1c0fed] 12/33132 (0xc/0x816c): File    quota
for ((i = 33133; ...

Regards,

Bob Peterson
Red Hat File Systems




More information about the Linux-cluster mailing list