Re: unformat gfs2

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

 



----- Original Message -----
> 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"?

Hi,

That would be dangerous. I would hope that the resource groups would be
ignored, but I've never done it. I wouldn't be surprised if you had
gfs2_edit segfault for some of it. At the very least, you would be turning
all your journal blocks to appear like dinodes, as well as all the
extended attributes, directory leaf blocks, etc., which will confuse
fsck.gfs2. The fsck.gfs2 will do a much better job if you only change
the dinode blocks from 0 to 3.

You would be much better off writing a loop that first checked the
block's current type, with -p <block number> blocktype, and only
change its bit to 3 if it is type 4 (dinode).

Also, the script would take a very long time, because it's going to
invoke gfs2_edit a trillion and a half times. Writing a program to
do this once would be quicker.

Regards,

Bob Peterson
Red Hat File Systems

-- 
Linux-cluster mailing list
Linux-cluster@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/linux-cluster




[Index of Archives]     [Corosync Cluster Engine]     [GFS]     [Linux Virtualization]     [Centos Virtualization]     [Centos]     [Linux RAID]     [Fedora Users]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Camping]

  Powered by Linux