Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
On Mon, 5 Nov 2007 17:15:05 +0100
Philipp Reisner <philipp.reisner at linbit.com> wrote:
> On Monday 05 November 2007 13:32:20 Igor Neves wrote:
> > Hi,
> >
> > There is some kind of notification (email, execute some script or
> > something) implemented in drbd?
> >
> > I need DRBD to be reactive to some situations:
> > * Split-Brain (IMPORTANT)
> > * State Change (primary->secondary) (LESS IMPORTANT)
> > * Sync's (MUCH LESS IMPORTANT)
> > * ...
> >
> > I can do some cron job script, to parse the output of '/proc/drbd'
> > every minute of so, but i want something more professional. It's
> > there anything something like this in DRBD?
> >
>
> You can attach "handler" scripts to some of these events.
>
> handlers {
> split-brain "echo split-brain. drbdadm -- --discard-my-data connect
> $DRBD_RESOURCE ? | mail -s 'DRBD Alert' root"; }
>
> Look out for "handers" in man drbd.conf
>
> -Phil
From the man page:
handlers
In this section can define handlers (executables) that are executed
by the DRBD system in response to certain events. Optional parameters:
pri-on-incon-degr, pri-lost-after-sb, pri-lost, outdate-peer,
local-io-error.
I cant setup split-brain handler, maybe it was on 0.7?
Thanks
---------
Igor Neves <igor.neves at 3gnt.net>
3GNTW - Tecnologias de Informação, Lda
sip igor at 3gnt.net jid igor at jabber.3gnt.org
icq 249075444 tlm 00351914503611