[DRBD-user] How to simulate disk failure

Lars Ellenberg Lars.Ellenberg at linbit.com
Thu Sep 23 12:35:30 CEST 2004

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.

/ 2004-09-23 14:52:00 +0800
\ Seki Lau:
> Dear All,
> As I asked in a couple of hours ago, I have simulated network failure,
> power failure for my HA file server. My last and major concern is, how
> to simulate the disk failure. The system has 5 disks (not raided, 4
> completely share and 1 partially share). I want to confirm that, if
> any one of them fail, the failover will occur and the secondary will
> become the primary.
> I have 2 idea on mind on testing this:1) I plug out the ide cable to
> simulate hte failure; 2) I remove the dm_mod .
> First solution may not good because I can't estimate the consequence
> to the hardware.
> For the second solution, I get this idea from the CTH and it said it
> use iptable to simluation network failure and use DM to simulate disk
> failure. I don't really get the exact meaning of "DM". I guess it is
> that dm_mod. I check that dm_mode is something related to LVM2 disk
> mapper. I am not sure what is it about.
> So, if any one of you can give me some light on the simulation of disk failure?

it is "device mapper", and it is used by lvm2, among other things. it
knows about several "targets", one of them "linear" (so it is just a
linear remapping of block numbers from the virtual to the real device),
one of them is "error", which does what you'd expect.
man dmsetup ...

interesting drbd config options are "on-io-error" ...
I'd recommend to have "on-io-error detach;", and some monitor
script reading syslog, and doing a gracefull failover
(hbstandby/heartbeat stop) in case related messages show up.

	Lars Ellenberg

please use the "List-Reply" function of your email client.

More information about the drbd-user mailing list