[DRBD-user] Online verification and the out-of-sync event

Andrew Miklas public at mikl.as
Thu Jul 16 19:55:18 CEST 2009

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


Hi Maros,

I can't seem to find any reference to the out-of-sync handler on that  
page, or in the drbd.conf man page.  I didn't want to start using that  
option without knowing exactly it would do.

I tried doing this:

common {
   handlers {
     out -of-sync "/sbin/drbdadm disconnect all; /sbin/drbdadm connect  
all"
   }
}

This seemed to cause one of the machines to become network- 
inaccessible after a failed verify.  I'm not sure whether I was  
getting a kernel panic or something less severe, but I was unable to  
ssh into the affected machine without rebooting it.  Unfortunately, I  
don't have physical access to the machines, so I couldn't check the  
console directly to see what was going on.

In the end, I settled for setting "echo 'DRBD verify failed.' | mail - 
s 'DRBD Error' root" as the out-of-sync handler, which works as  
expected.


-- Andrew



On 14-Jul-09, at 4:42 PM, Maros Timko wrote:

> The reason of having out-of-sync handler is exactly tp provide  
> possibility of automation.
> http://www.drbd.org/users-guide/s-use-online-verify.html
>
> Tino
>
> 2009/7/13 Andrew Miklas <public at mikl.as>
> Hi,
>
> I've got a small question about DRBD's online verification process.
>
> As suggested in the docs "Automating on-line verification", I'd like  
> to have a cron job run the verify process every week.  However,  
> instead of just writing an error message into the system log, I'd  
> like the secondary to update any mismatched blocks using the  
> primary.  I've written a little Perl script that kicks off the  
> verification on the primary, polls "drbdadm cstate" waiting for the  
> verify to finish, and then does a disconnect/reconnect on the  
> primary.  However, this seems a bit hacky.
>
> Is there any way to avoid the polling and just have DRBD update any  
> out of sync blocks automatically?  I've noticed this line appears in  
> the log after a failed verification:
> drbd1: helper command: /sbin/drbdadm out-of-sync
>
> Can I configure the out-of-sync event to automatically correct the  
> mismatched blocks without a disconnect/reconnect?
> If not, will doing the disconnect/reconnect on the primary be enough  
> to force an update of the secondary?
>
>
> Thanks for your help,
>
>
> Andrew Miklas
>
> _______________________________________________
> drbd-user mailing list
> drbd-user at lists.linbit.com
> http://lists.linbit.com/mailman/listinfo/drbd-user
>
> _______________________________________________
> drbd-user mailing list
> drbd-user at lists.linbit.com
> http://lists.linbit.com/mailman/listinfo/drbd-user




More information about the drbd-user mailing list