Thanks, I understand now. -Shravan
On Thu, Apr 21, 2011 at 8:06 AM, Lars Ellenberg <lars.ellenb...@linbit.com> wrote: > On Wed, Apr 20, 2011 at 09:49:13PM -0400, Shravan Mishra wrote: >> Wherever there is estates/estate it should be dstates/dstate. >> >> Thanks >> Shravan >> >> On Wed, Apr 20, 2011 at 9:46 PM, Shravan Mishra >> <shravan.mis...@gmail.com> wrote: >> > Hi, >> > >> > I'm using following config for io errors: >> > >> > >> > >> > resource resource { >> > disk { >> > on-io-error detach; >> > ... >> > } >> > ... >> > } >> > >> > >> > The above leads to following state in case of disk errors: >> > >> > Diskless/UpToDate >> > >> > Under drbd documentation there is a following line: >> > >> > STMT -- "If the disk failure has occured on your primary node, you may >> > combine this step with a switch-over operation." >> > >> > When I look at drbd resource agent's monitor: >> > >> > drbd_monitor() { >> > local status >> > >> > drbd_status >> > status=$? >> > >> > drbd_update_master_score >> > >> > return $status >> > } >> > >> > >> > Now in the above function the error is reported only based on role not >> > on estate. drbd_update_master_score is only updating score based on >> > dstates. > > drbd_update_master_score absolutely takes the role into account as well. > It triggers on role, local disk state and remote disk state. > > A Diskless Primary connected to an UpToDate peer > will receive a master score of 10, > whereas the UpToDate peer will have a master score of 10000. > > Depending on other constraints and settings, that may or may not be > enough to trigger a switchover right there. > >> > My question is can I return error in drbd_monitor if my primary goes >> > Diskless and then cause the switchover based on the STMT? >> > >> > Or should I be doing something else? >> > >> > >> > Sincerely >> > Shravan >> > > > -- > : Lars Ellenberg > : LINBIT | Your Way to High Availability > : DRBD/HA support and consulting http://www.linbit.com > > DRBD® and LINBIT® are registered trademarks of LINBIT, Austria. > > _______________________________________________ > Pacemaker mailing list: Pacemaker@oss.clusterlabs.org > http://oss.clusterlabs.org/mailman/listinfo/pacemaker > > Project Home: http://www.clusterlabs.org > Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf > Bugs: > http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker > _______________________________________________ Pacemaker mailing list: Pacemaker@oss.clusterlabs.org http://oss.clusterlabs.org/mailman/listinfo/pacemaker Project Home: http://www.clusterlabs.org Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf Bugs: http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker