[DRBD-user] DRBD notification - Error in 8.0.6

Peter P GMX Prometheus001 at gmx.net
Tue Nov 6 15:06:40 CET 2007

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


I get an error while doing this:

sip2:/etc# /etc/init.d/drbd start
/etc/drbd.conf:28: Parse error: 'an option keyword' expected,
        but got 'split-brain'
Starting DRBD resources:    /etc/drbd.conf:28: Parse error: 'an option 
keyword' expected,
        but got 'split-brain'

Here is the parrt of drbd.conf

resource r0 {
  handlers {
    split-brain "echo split-brain. drbdadm -- --discard-my-data connect 
$DRBD_RESOURCE ? | mail -s 'DRBD Alert' root";
  }

  on sip2 {#primary
    device      /dev/drbd0;
    disk        /dev/mapper/data-data1;
    address     192.168.178.97:7791;
    meta-disk   internal;
  }
  on sip4 {#secondary
    device      /dev/drbd0;
    disk        /dev/mapper/data-data1;
    address     192.168.178.98:7791;
    meta-disk   internal;
  }
}


Philipp Reisner schrieb:
> 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
>   



More information about the drbd-user mailing list