[DRBD-user] Initial sync without the do-what-I-say command?

Lars Ellenberg Lars.Ellenberg at linbit.com
Fri Mar 24 11:58:34 CET 2006

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

/ 2006-03-24 15:09:41 +0530
\ Varun Menghani:
> Hi,
> I have written a script to configure hearbeat and drbd for a 2 node
> cluster. On the server from which data is to be pushed, the script
> executes the "drbdsetup /dev/drbd0 primary --do-what-I-say" command.
> However, it is possible that a user might configure both the servers to 
> push data on each other,

well, then that is a bug in your script.

> in this case both the servers will try and
> execute the do-what-i-say command, resulting in chaos.
> My question is : Is there a way to do an initial sync without the
> do-what-I-say command? e.g can I configure one node as primary, the
> other as secondary and then data is syncronised from the primary to the
> secondary node?
> Regards,
> Varun.

a drbd that "feels" insonsistent refuses to become primary.
initially any drbd is inconsistent when it just created
a new meta data block.

there are two ways for drbd to clear the "inconsistent flag":
 * successfully complete a resynchonization as sync target.
 * be told by "--do-..." that you are consistent anyways.

you do not force a resync by that.
you just force it to think it is consistent.
if it already thinks it is consistent, this is
basically ignored anyways.
the initial full sync that typically results from this
is because the other side still thinks it is
inconsistent, and therefor starts the resync process.

if you want to force a full resync, you tell the sync
target (the one with the bad data) that it is
inconsistent, using the "invalidate" subcommand.


: 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.

More information about the drbd-user mailing list