[DRBD-user] drbdsetup primary with timeout [was: To stonith or not to stonith?]

Dave Dykstra dwdha at drdykstra.us
Mon Sep 12 18:16:33 CEST 2005

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


On Fri, Sep 09, 2005 at 12:06:31AM +0200, Lars Ellenberg wrote:
> / 2005-09-08 11:39:28 -0500
> \ Dave Dykstra:
> > [ Even though Alan Cc'ed his message to drbd-user I haven't seen it
> >   show up there yet. ]
> 
> well, I have.
> 
> > > Regarding DRBD not taking over when it hasn't declared the other node 
> > > dead, I would think that a good solution might be to have DRBD wait up 
> > > to "drbd deadtime" seconds before giving up.
> > > 
> > > Since Heartbeat happily has no clue about DRBD (or its internal 
> > > deadtime), it would seem to be best dealt with by DRBD.
> > > 
> > > -- 
> > >     Alan Robertson <alanr at unix.sh>
> > 
> > That sounds like a reasonable solution to me.
> > 
> > In fact, I already see code to try a 'drbdadm primary' command 6
> > times with a one second sleep between each try in the 'start' case of
> > /etc/heartbeat/resource.d/drbddisk, and a comment saying that it is "in
> > case heartbeat deadtime was smaller than drbd ping time".   This is a
> > different situation than the comment, in that heartbeat forcibly knocked
> > down the remote side and immediately took over, so the timeout probably
> > starts ticking when the first 'drbdadm primary' command is executed.
> > I'm using the default drbd "timeout" time of six seconds, so presumably
> > on the 7th or 8th try it would work.
> > 
> > I think that doing multiple tries in the drbddisk command is a hack,
> > though, especially since it doesn't take into account any change in
> > the "timeout" parameter that there may be in drbd.conf. I think the
> > 'drbdsetup primary' command (possibly with a new option that drbddisk
> > invokes) should try to contact the remote side and wait until there is
> > either a positive response or a timeout before it exits with an error.
> 
> what is there is a "hack".
> 
> it is a misconfiguration, when heartbeat deadtime was
> smaller than drbd ping time, though.
> 
> still it could be desirable to have an option like that outlined above,
>  "drbdsetup /dev/drbd0 primary --I-think-peer-is-dead", and this option
> would typically be used by the heartbeat resource script/agent.

I think rather it should be something like --I-think-peer-may-be-dead
because the heartbeat resource script would do the same thing no matter
how it is coming up.

> this will probably be implemented in 0.8 ...

Thank you.   What kind of time frame is expected for that release?

- Dave



More information about the drbd-user mailing list