How to simulate journal corruption

Olaf Weber olaf at sgi.com
Mon Jul 13 06:28:45 CDT 2009


crow al writes:

> Hi, there

> I'm a QA engineer from Cisco. I'm working on a test case concerning
> XFS journal playback failure, which needs to manually inject error
> to XFS.

> I did some google work but get no luck. Then I think maybe XFA-QA
> could give me some advice. That why I come to here.

> Is there anyone could tell me how to inject error into XFS or is
> there any tool could be used?

For clobbering a filesystem image in general you can use fsfuzz.
  http://people.redhat.com/sgrubb/files/fsfuzzer-0.7.tar.gz

If log replay is of particular interest, you might want to modify that
code to target the XFS log in particular.

The XFS QA tests do not, IIRC, contain tests that deliberately trash
the XFS log, but there are some tests that exercise log replay, and
you may want to take a look at those to see ways to get an XFS
filesystem image with a non-empty log to replay.

Note that kernel-side, if log replay fails the expected/desired result
is that kernel won't mount the filesystem.

-- 
Olaf Weber                 SGI               Phone:  +31(0)30-6696752
                           Veldzigt 2b       Fax:    +31(0)30-6696799
Technical Lead             3454 PW de Meern  Vnet:   955-7151
Storage Software           The Netherlands   Email:  olaf at sgi.com




More information about the xfs mailing list