[DRBD-user] Device monitor script for drbd-0.7.x

Lars Ellenberg Lars.Ellenberg at linbit.com
Mon Sep 20 00:41:12 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-15 10:39:55 +0900
\ Shallyee Shang:
> Hello, 
> 
> I am trying write a script under drbd-0.7.x, which can probe if a drbd 
> device can transfer to primary state when it receive a "drbdadm primary ..."
> command. Device monitor will call this script to determine if a device
> is avaliable.
> 
> "drbdadm state" command tells device's status, which may help me 
> make the decision. I can get a state list by greping drbd source code,
> I guess these are all that "state" command can tell, but I don't understand
> which state can transfer to primary state.
> 
> Can anyone teach me about this, or advise me a good way to write a
> monitor script?

now, consider this: 
 between you monitor saying it could,
 and your cluster manager actually promoting it,
 "something" happens, which make the previous "probe" answer obsolete.

that means whenever you tell some resource "please do this",
you must be able to handle the answer "nope".
(ok, "nope, sorry, because this and that reason" would be nicer, but
still it is the same)

monitoring the health of a started and running resource is important.

probing whether certain administrative requests could succeed does not
make much sense to me though.

because it is additional code: you need all the probing code done right,
possible you need to even change the resource somehow to cooperate with
your probing nicely, and then you still have to have the failure
handling code in place for all administrative requests.

so you may as well just ask it directly and handle possible failures
properly without probing first.


	Lars Ellenberg

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



More information about the drbd-user mailing list