All of lore.kernel.org
 help / color / mirror / Atom feed
From: "peng.hse" <peng.hse@xtaotech.com>
To: Sage Weil <sweil@redhat.com>,
	jdurgin@redhat.com, ceph-devel@vger.kernel.org
Subject: problems to protect rbd from mutiple simultaneous mapping
Date: Mon, 6 Mar 2017 22:08:51 +0800	[thread overview]
Message-ID: <58BD6D73.6040200@xtaotech.com> (raw)

Hi Sage,

the recommended way to protect rbd from multiple simultaneous mapping is 
just as the follows:

- identify old rbd lock holder
- blacklist old owner
- break the old rbd lock through "rbd lock remove"
- map rbd image on new host

However, i am wondering how do we handle the situation as the below 
timeline sequences:

  1. node1 locks the rbd image, doing the IO request, the IO is 
outstanding in the osds and
      not commit and reply to client yet

  2. node2 takes over the corresponding IO service due to some network 
partition issue,
      add node1 into the blacklist to all osds successfully and resume 
the IO.

3. assuming the step-1 outstanding IO and step-2 IO targeted the same 
area of the fs metadata
     on the rbd devices. step-2 successfully persist the data and reply 
to client.
     then, the following laggy IO from step-1 might override and corrupt 
what we have written in step-2.

so, how do we prevent this kind of corruption happening?


             reply	other threads:[~2017-03-06 14:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-06 14:08 peng.hse [this message]
2017-03-06 23:47 ` problems to protect rbd from mutiple simultaneous mapping Jason Dillaman
2017-03-07  2:16   ` peng.hse
2017-03-07  2:26     ` Jason Dillaman

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=58BD6D73.6040200@xtaotech.com \
    --to=peng.hse@xtaotech.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=jdurgin@redhat.com \
    --cc=sweil@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.