[cgl_discussion] [cgl_valid] Simulating a system failure to force a
sglass at us.ibm.com
Wed Aug 7 11:23:58 PDT 2002
I talked to the guys in my dept who test jfs and they didn't think a reboot
() would allow the file system to be corrupted. It would wait till the
command ended before doing a write. What they did was use a tool they
wrote which is part of LTP called LFTEST which does very large writes and
then manually they hit the power button. They think you could simulate the
power button by running a program that causes the system to do an OOPS.
They said there were several programs out there which do that.
Please let me know if you need any additional information on any of the
programs involved with what they are saying.
Linux Technology Center
IBM, 11400 Burnet Road, Austin, TX 78758
Phone: (512) 838-9284 T/L: 678-9284 Fax: (512) 838-3882
E-Mail: sglass at us.ibm.com
<andyp at osdl.org> To: "Fleischer, Julie N" <julie.n.fleischer at intel.com>
Sent by: cc: "'cgl_discussion at osdl.org'" <cgl_discussion at osdl.org>
cgl_discussion-adm Subject: Re: [cgl_discussion] [cgl_valid] Simulating a system failure to
in at osdl.org force a filesystem rec overy
On Wed, 2002-08-07 at 09:55, Fleischer, Julie N wrote:
> Validation -
> As part of testing a resilient file system, I want a test case where I am
> sure that I have simulated a system failure so that on startup fsck (I
> believe) must be performed. In addition, it would be even better if that
> fsck could have to repair something (i.e., the system failure happened in
> the middle of a logical write).
> Does anyone know how I can do this reliably?
As far as triggering an fsck, for non-journaled filesystems that are
listed in /etc/fstab and automatically mounted on reboot, all you need
to do is use reboot(2) with LINUX_REBOOT_CMD_RESTART without a previous
You could probably arrange to reliably cause enough dirty state to be
stuck in the bufffer cache that some form of repair would always be
You might try this: create a new directory, and in that new directory,
randomly create, write, re-write, re-name, and unlink a few 100 files
and directories. Make sure it runs for a few seconds (like 3), and then
Saftey tip: don't do this on an ext2-based filesystem that you expect to
be sane when the system reboots. ;^)
cgl_discussion mailing list
cgl_discussion at lists.osdl.org
More information about the cgl_discussion