Distributed Replicated Block Device (DRBD) development
 help / color / mirror / Atom feed
From: Lars Ellenberg <Lars.Ellenberg@linbit.com>
To: drbd-dev@lists.linbit.com
Subject: Re: [Drbd-dev] DRBD8: Split-brain false positive on Primary/primary potential patch
Date: Fri, 17 Nov 2006 15:04:00 +0100	[thread overview]
Message-ID: <20061117140400.GF16440@barkeeper1.linbit> (raw)
In-Reply-To: <342BAC0A5467384983B586A6B0B37671040347F7@EXNA.corp.stratus.com>

/ 2006-11-16 07:52:14 -0500
\ Graham, Simon:
> Not sure I agree that the current behavior is protecting users from
> themselves -- it only causes the split-brain if you lose the n/w and
> during 'normal' operation and there is nothing that protects against
> mounting a 1-node fs on both nodes of a primary-primary DRBD cluster.
> 
> Running primary-secondary doesn't work if you are in a situation where
> it is not possible to switch primaryness when failing over; a good
> example of that is if you want to run a Xen virtual machine on top of
> a DRBD partition and support live migration of the VM (the problem is
> that Xen doesn't provide the means to execute a script to change
> primaryness at the required point in the migration). Of course you
> could argue that this is a Xen bug _but_ pragmatically, the proposed
> patch to delay updating the UUID until an actual write occurs
> preserves (I believe) correctness in DRBD and works without
> introducing new features into Xen.
> 
> Recovering from split-brain automatically is of course something that
> is incredibly valuable but I think it can be treated orthogonally to
> the proposed fix.

I agree here.
But see below why I still think Philipp is "right", too :)

  But I think the provided patch (doing it only in al_begin_io) is wrong.
  actually it needs to be done as soon as the bitmap is touched,
  so it needs be done in "set_out_of_sync", which may be called in the
  cleanup code after connection loss, too, and will be, typically, on the
  actually active node.

  when there is a journalled file system mounted, even if it had been
  idle, there are periodic updates for the journal/superblock, so it would
  be deferred only a few seconds on the actually active node.

  on the "Primary" but inactive node, it would indeed defer this uuid update,
  thus preventing the "split brain"...

one alternative would be to update the uuids where it is done now,
  but only if we have been opened RW (we have that information anyways
  somewhere), and do it again (unless already done) as soon as we are
  opened rw. that would be correct, I think, and easy.

Why we could leave the code as is, anyways:

  we can leave it like it is right now, because the "after split brain
  recovery" strategy "discard least changes" would do the same thing:
  your assumtion was that the "inactive" node does no changes.
  zero is less than anything else...

-- 
: Lars Ellenberg                                  Tel +43-1-8178292-55 :
: LINBIT Information Technologies GmbH            Fax +43-1-8178292-82 :
: Schoenbrunner Str. 244, A-1120 Vienna/Europe   http://www.linbit.com :

  reply	other threads:[~2006-11-17 14:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-16 12:52 [Drbd-dev] DRBD8: Split-brain false positive on Primary/primary potential patch Graham, Simon
2006-11-17 14:04 ` Lars Ellenberg [this message]
     [not found] ` <5e77099e0611180419s77b9e3f5u172d853634174bd8@mail.gmail.com>
2006-11-18 12:20   ` Sudhakar Mekathotti
2006-11-20 12:39     ` Lars Ellenberg
  -- strict thread matches above, loose matches on Subject: below --
2006-11-20 13:38 Montrose, Ernest
2006-11-20 13:53 ` Philipp Reisner
2006-11-06 23:47 Montrose, Ernest
2006-11-16  9:10 ` Philipp Reisner
2006-11-18 11:00 ` Philipp Reisner

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=20061117140400.GF16440@barkeeper1.linbit \
    --to=lars.ellenberg@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