[Linux-cluster] unformat gfs2

Mr.Pine pine5514 at gmail.com
Tue Mar 18 18:31:24 UTC 2014


On Tue, Mar 18, 2014 at 9:52 PM, Bob Peterson <rpeterso at redhat.com> wrote:
> ----- 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
>
> --
> Linux-cluster mailing list
> Linux-cluster at redhat.com
> https://www.redhat.com/mailman/listinfo/linux-cluster

Hi,

Output of this command on my system:

gfs2_edit -p master /dev/sdb | grep quota
     8. (8). 264950 (0x40af6): File    quota

Do you mean "i" would start from 264950?
All blocks before 264950 are journal blocks?

Regards
Pine.




More information about the Linux-cluster mailing list