mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* How can I simulate disk failure on 2.4?
@ 2003-04-09  3:57 Chuck Ebbert
  2003-04-09  5:11 ` Andrew Morton
  0 siblings, 1 reply; 2+ messages in thread
From: Chuck Ebbert @ 2003-04-09  3:57 UTC (permalink / raw)
  To: linux-kernel

  I need some kind of way to fail a single disk partition (hdg8) while the
system is running, then reenable it.  It doesn't have to be general-purpose
and
I don't mind doing ugly hacks to the disk code to make it happen.

  I was thinking of putting a flag in /proc somewhere, along with some code
in generic_make_request like this:

  if (proc_fail_the_disk && bh->b_rdev == the_disk)
    do_something_to_the_request;

 What field could I change in the request that would make it fail without
causing too many side effects?  (I suppose I'd learn a lot by
just picking a likely field and whacking it, but I'm not sure I want to
try and debug the mess.)

 Is this even the right approach at all?


--
 Chuck

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: How can I simulate disk failure on 2.4?
  2003-04-09  3:57 How can I simulate disk failure on 2.4? Chuck Ebbert
@ 2003-04-09  5:11 ` Andrew Morton
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2003-04-09  5:11 UTC (permalink / raw)
  To: Chuck Ebbert; +Cc: linux-kernel

Chuck Ebbert <76306.1226@compuserve.com> wrote:
>
>   I need some kind of way to fail a single disk partition (hdg8) while the
> system is running, then reenable it.  It doesn't have to be general-purpose
> and
> I don't mind doing ugly hacks to the disk code to make it happen.

Stephen Tweedie has a gizmo which does that.

http://people.redhat.com/sct/patches/testdrive/testdrive-1.1-for-2.4.19pre10.patch

The documentation is at google("tweedie testdrive") ;)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-04-09  4:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-09  3:57 How can I simulate disk failure on 2.4? Chuck Ebbert
2003-04-09  5:11 ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®