[Cluster-devel] [gfs2-utils PATCH 00/11] Misc patches regarding corrupt rindex handling

Bob Peterson rpeterso at redhat.com
Mon Mar 21 14:53:26 UTC 2016


Hi Andy,

----- Original Message -----
> Hi Bob,
> 
(snip)
> Consider these ACKed. I've taken a look through them and they look fine,
> though I'm not hugely familiar with that part of the fsck code. Coverity
> is happy with them too.

Does that mean I can/should push them? I thought you said you had some
suggestions for them.
 
> Outside of the scope of this set, I noticed in patch 11 that parts of
> the existing fsck.gfs2 code assume that the first rgrp lies in the first
> block after the superblock. That's likely to get confused when the file
> system is RAID stripe aligned so that's something that may need
> addressing at some point (mkfs.gfs2 -b 4096 -o swidth=16k,sunit=8k
> should mock it up for a test).

Good to know. This could be a problem for even today's rindex repair code.
We may need to do some testing to figure out what's broken and what's not.
 
> In general it would be good to have more fsck.gfs2 tests in the
> testsuite so if there's a simple way to test these patches without
> mounting (scribbling over some rindex entries?) then I'll get that added.
> Cheers,
> Andy

This is an excellent idea. A very long time ago, I used to have a different
fsck "nightmare" test that used a little "nukerg2.c" program (source attached)
to nuke an rgrp or an rindex entry. Then I'd force fsck to fix it.
I may have originally written it for gfs1 rather than gfs2, and I know
I was especially targeting post-gfs2_grow rindexes.

I can no longer find the original script, but the original sequence went
something like:

mkfs.gfs2 <lv>
./nukerg2 -rg X <lv>
fsck.gfs2 <lv>
# make sure $? is 1
fsck.gfs2 <lv>
# make sure $? is 0
mount <lv> <mntpt>
lvextend <lv>
gfs2_grow <mntpt>
./nukerg2 -rg X <lv>
fsck.gfs2 <lv>
# make sure $? is 1
fsck.gfs2 <lv>
# make sure $? is 0

For X, I'd systematically do:
1. First rgrp
2. Second rgrp
3. Third rgrp
4. Half-way point
5. Last rgrp
6. I'd also nuke two and three rgrps in a row IIRC.

There's also an "-rgindex" parameter to kill the rindex entries themselves,
so I'd repeat each of the above steps, but killing the rindex entry rather
than the rgrp itself.

This test really ought to be resurrected and added to the test suite.

Regards,

Bob Peterson
Red Hat File Systems
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nukerg2.c
Type: text/x-c++src
Size: 6058 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/cluster-devel/attachments/20160321/04df123c/attachment.bin>


More information about the Cluster-devel mailing list