Distributed Replicated Block Device (DRBD) development
 help / color / mirror / Atom feed
From: Philipp Reisner <philipp.reisner@linbit.com>
To: drbd-dev@lists.linbit.com
Subject: Re: [Drbd-dev] Re: drbd Frage zu secondary vs primary; drbddisk status problem
Date: Wed, 25 Aug 2004 11:42:18 +0200	[thread overview]
Message-ID: <200408251142.18807.philipp.reisner@linbit.com> (raw)
In-Reply-To: </+7SE+vRTb9mi3m45Lh2qDY=lge@web.de>

[...]

> and one more scenario, which I described above and consider to be the most
> likely one... and you seem to have missed the point...
>
>   N1    N2
>   P --- S   Everything ok.
>   P - - S   N1 is failing, but for the moment being just can no
>             longer answer the network; but it is still able to update
>             drbds generation counts
>   ?   - S   Now N1 may be dead, or maybe not
>   X   - S   A sane Cluster-mgr makes N2 primary, but stonith N1 first ...
>   X   - P   N1 now is really dead.
>   S --- P   N1 comes back
>   S - : P   oops, N1 has "better" generation counts than N2
>             N2 shall become sync target, but since it is
>             currently Primary, it will refuse this.
>             It goes standalone.
>
> Now, I think in that case, N1 needs special handling of the situation,
> too, which it currently has not.

So, the current policy is: 
 * The primary node refuses to connect to a peer with higher generation
   counts. This keeps the data intact. This is very related to the other
   after-split-brain-policy I want to make expclicit.

* Remeber the options so far: (for primary-after-split-brain)

 - The node that was primary before split brain (current behaviour)
 - The node that became primary during split brain 
 - The node that modified more of it's data during the split-brain
   situation  [ Do not think about implementation yet, just about
                the policy ]
 - None, wait for operator's decission.  [suggested by LMB]
 - Node that is currently primary [see example above by LGE]

* We should probabely have a second configurable policy
       (loosers-data-after-split-brain)

 - Keep
 - Overwrite

Currently we have no clear line in regard in regard to the
loosers-data-after-split-brain.

> Currently this situation is not readily resolvable. One would need to
> first make N2 secondary, too, then either make it primary again using
> the --humman flag (N2 will become SyncSource), or just reconnect now
> (N2 will become SyncTarget).

Hmmm. 

> I think we should allow the drbdadm invalidate in
> StandAlone(WFConnection) Secondary/Unknown, too.
> It would then just clear the MDF_Consistent.

For 0.7 thats is a good idea I think.

> Yet an other deficiency:
> we still do not handle the gencounts correctly in this situation:
>
>   S --- S
>   P --- S  drbdsetup primary --human
>    now, N1 increments its human cnt, N2 only its connection count after
>    failure of N1, N2 will take over, maybe be primary for a whole week.
>    then N1 comes back, has the higher human count, and will
>    either [see above] (if N2 still is Primary)
>    or wipe out a week worth of changes (if N2 was demoted to Secondary
>    meanwhile).

The real bug here is that we allow the counters to become different,
while the two nodes are connected. [I have to blame myself for, allowing
patches in, I blame Lars for writing them :)]

Here is an excerpt from the
http://www.drbd.org/fileadmin/drbd/publications/drbd_lk9.pdf
Paper. [middle of Page 7]

With the exception of the consistency  flag, connection indicator and the 
primary indicator, all parts of the meta-data are synchronized while 
communication is working. After system start the secondary node inherits the 
counter values from the newly selected primary node.

PS: I really like it to have documents describing the ideas the algorithms
    first, and writing the code to conform to these documents.

PS2: Sorry for the late answers lately...

-Philipp
-- 
: Dipl-Ing Philipp Reisner                      Tel +43-1-8178292-50 :
: LINBIT Information Technologies GmbH          Fax +43-1-8178292-82 :
: Schönbrunnerstr 244, 1120 Vienna, Austria    http://www.linbit.com :

  parent reply	other threads:[~2004-08-25  9:42 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20040819110202.GO9601@marowsky-bree.de>
     [not found] ` <20040819113205.GP9601@marowsky-bree.de>
     [not found]   ` <R+ahoCHARbsLOMKIahWH0/Q=lge@web.de>
2004-08-20 12:52     ` [Drbd-dev] Re: drbd Frage zu secondary vs primary; drbddisk status problem Philipp Reisner
2004-08-20 13:32       ` Lars Ellenberg
2004-08-23 14:28         ` [Drbd-dev] gen_counts and primary --human Lars Ellenberg
2004-08-23 21:57           ` Lars Marowsky-Bree
2004-08-25  9:42           ` Philipp Reisner
2004-08-23 21:56         ` [Drbd-dev] Re: drbd Frage zu secondary vs primary; drbddisk status problem Lars Marowsky-Bree
2004-08-25  9:42         ` Philipp Reisner [this message]
2004-08-25 10:28           ` Lars Marowsky-Bree
2004-08-25 11:30             ` Philipp Reisner
2004-08-25 13:38           ` Lars Ellenberg
2004-09-04  9:48         ` [Drbd-dev] Another drbd race Lars Marowsky-Bree
2004-09-04 10:00           ` Lars Ellenberg
2004-09-04 10:18             ` Lars Marowsky-Bree
2004-09-04 10:43               ` Lars Ellenberg
2004-09-04 10:51                 ` Lars Marowsky-Bree
2004-09-07  9:39             ` Philipp Reisner
2004-09-07 10:13               ` Lars Ellenberg
2004-09-07 11:32                 ` Philipp Reisner
2004-09-07 12:05                   ` Lars Ellenberg
2004-09-07 12:12                     ` Lars Marowsky-Bree
2004-09-07 12:06                   ` Lars Marowsky-Bree
2004-09-07 12:19                 ` Philipp Reisner
2004-09-07 12:28                   ` Lars Marowsky-Bree
2004-09-07 12:47                     ` Philipp Reisner
2004-09-08 11:20                       ` Lars Marowsky-Bree
2004-09-08 11:31                         ` Lars Ellenberg
2004-09-08 15:11                           ` Lars Marowsky-Bree
2004-09-08 15:22                             ` Lars Ellenberg
2004-09-08 11:33                         ` Philipp Reisner
2004-09-07 15:55                   ` Lars Ellenberg
2004-08-20 14:10       ` [Drbd-dev] Re: drbd Frage zu secondary vs primary; drbddisk status problem Helmut Wollmersdorfer
2004-08-23 22:01       ` Lars Marowsky-Bree

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200408251142.18807.philipp.reisner@linbit.com \
    --to=philipp.reisner@linbit.com \
    --cc=drbd-dev@lists.linbit.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox