[DRBD-user] primary and synctarget

Lars Ellenberg Lars.Ellenberg at linbit.com
Thu Jun 23 09:53:33 CEST 2005

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


/ 2005-06-23 09:19:02 +0200
\ Martin Bene:
> > I'm testing and tinkering with DRBD to answer all those 'what if'  
> > questions before we go into production.  While doing this I managed  
> > to get a node into the state where it is the Primary and the  
> > SyncTarget at the same time.
> > 
> > This has got to be a bad thing if you try to mount the FS as 
> > the data  
> > under the fs will change as the sync progresses, right?  I see a  
> > great opportunity for data corruption here.
> > 
> > So, is there a reason why this is even allowed by drbd?  I can't see  
> > a situation where it would be needed, does such a situation exist?
> 
> That's a feature, you don't risk data corruption.
> 
> In previous versions sync target/source was coupled with
> primary/secondary state. On boot, this required waiting for all sync
> operations to finsih before starting heartbeat (or whatever cluster
> manager you use) so heartbeat could freely choose which devices to make
> primary.
> 
> With current drbd, this restriction no longer applies, startup can
> continue right after connecting the drbd devices.
> 
> If you make a sync target primary, all reads for out-of-sync data are
> fetched from the sync source, so the data read off the drbd device stays
> consistent. Especially in an active/active cluster with multiple drbd
> devices this greatly reduces risk of long startup delays.

Thank you, Martin :)

Only to state it again explicitly:

You can only reach the state "SyncTarget and Primary",
if it _was_ Secondary, and target of sync already,
and you (or some cluster manager) promote it to Primary.

When a running Primary suddenly shall become SyncTarget,
[which can only happen after split brain or "operator error",]
it will refuse to do so,
and drop the connection to the peer (--> StandAlone)
[to avoid data corruption]

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