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

Varun Menghani varun.menghani at airtightnetworks.net
Mon Mar 27 13:11:39 CEST 2006

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


Hi, thanks for the insight on the 'do--' command.
I still had a couple of questions.
On Fri, 2006-03-24 at 16:28, Lars Ellenberg wrote:
> / 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.
Actually, its one script which runs on the two nodes, so the script on
one node has no way of knowing how the other node has been configured.
Thus, the probability of the user configuring both the nodes as primary.
> 
> > 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.

Again, what happens if after running a 'do-what--' command on one node
say node A, if the second node (node B) starts the sync process, and a
'do-what--' command is executed on node B while the sync is on? Does the
direction of the sync now reverse or does the sync stop since both nodes
think they are consistent?
> 
> 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.
> 
> hth,
Thanks for the patience!
Regards,
-- 
Varun Menghani <varun.menghani at airtightnetworks.net>

----

“THE INFORMATION IN THIS EMAIL AND ANY ATTACHMENTS IS CONFIDENTIAL AND
INTENDED SOLELY FOR THE USE OF THE PERSON NAMED ABOVE.  IF YOU ARE NOT
THE INTENDED RECIPIENT, OR HAVE OTHERWISE RECEIVED THIS EMAIL IN ERROR,
DO NOT READ, DISTRIBUTE, COPY OR OTHERWISE USE IT.  IF YOU HAVE RECEIVED
THIS COMMUNICATION IN ERROR, PLEASE IMMEDIATELY NOTIFY THE SENDER BY
TELEPHONE OR EMAIL, AND DESTROY THIS MESSAGE AND ANY ATTACHMENTS.  THANK
YOU.” 




More information about the drbd-user mailing list