Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
/ 2005-07-26 14:51:38 +0200
\ Leroy van Logchem:
> Mark Yarborough wrote:
>
> >Hello all,
> >Can someone clarify the warnings you might get when running protocol
> >C and a write to the primary cannot be replicated to the secondary?
> >Like so:
> >1. Primary and Secondary both cs:Connected
> >2. Disconnect DRBD line (only)
> >3. Primary and Secondary both cs:WFConnection
> >4. Write to DRDB partition on primary
> >5. ???????
> >6. Reconnect DRBD line
you forgot the resync
(cs:WFBitmapS, PausedSyncS, SyncSource etc.)
fortunately in the described scenario, the resync typically is that fast
that you should not see these states for too long in /proc/drbd.
do grep -i "drbd.*sync" /var/log/kern.log
or similar...
> >7. Primary and Secondary both cs:Connected
> >At step 5 the primary and secondary partitions were out of sync, because the DRBD line was down.
> >From the primary, at step 5, is there any way to tell
> >that the partitions are out of sync? Any message logged?
what kind of message do you want to be logged?
> IMO: The drbd state machine always marks the device out-of-sync if
> disconnected from the primary ( even if it's only for a short while ).
> Your primary mounted filesystem will always change a bit if it where
> only the timestamps. From WFConnection to Connected the state is
> exchanged and typically the next state is resync. So just monitoring
> for anything other then "Connected" when issued a "drbdadm cstate all"
> should be enough to report a event using Nagios/NetSaint.
there is /proc/drbd, too.
additionally, on cstate changes there is printk (kernel log) output like
kernel: drbd0: drbd0_worker [18590]: cstate SyncSource --> Connected
drbd<minor> <cmd> [<pid>]: cstate <FromState> --> <ToState>
so a simple filter and sync(0) definition in syslog-ng and a proper
logcheck rule should do.
that is much better than polling with drbdadm cstate, I think.
--
: Lars Ellenberg Tel +43-1-8178292-0 :
: LINBIT Information Technologies GmbH Fax +43-1-8178292-82 :
: Schoenbrunner Str. 244, A-1120 Vienna/Europe http://www.linbit.com :
__
please use the "List-Reply" function of your email client.