How can I simulate disk failure on 2.4?

From: Chuck Ebbert (76306.1226@compuserve.com)
Date: Tue Apr 08 2003 - 22:57:07 EST


  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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Apr 15 2003 - 22:00:17 EST