public inbox for linux-bcache@vger.kernel.org
 help / color / mirror / Atom feed
From: Kent Overstreet <koverstreet-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
To: Giovanni Lenzi <giovanni.lenzi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: linux-bcache-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: bcache on top of drbd or the contrary?
Date: Mon, 3 Jun 2013 12:14:57 -0700	[thread overview]
Message-ID: <20130603191457.GJ2291@google.com> (raw)
In-Reply-To: <CAAxY4JkxnNqe_AUjERze30t8GQSD_3ZXXgM84Q+O_bnP6TCs4g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Sat, Jun 01, 2013 at 05:45:09PM +0200, Giovanni Lenzi wrote:
> Hi,
> I'm planning to user bcache for speed, and drbd for HA between two nodes.
> 
> I'm facing with this question:
> Is it better to have drbd on top of a bcached volume(caching + backing device)
> or to use bcache to put a caching device on top of a drbd backing device?
> 
> I think that with the second option and writeback enabled, write
> requests should be faster than with the first option... Do you agree?
> 
> But.. what about the data integrity and consistency of the data on the
> drbd slave volume? What if the power goes down on the master node?
> Could the drbd volume on the slave node, get corrupted If the caching
> device is not detached correctly on the master node?
> 
> On the contrary with the first option(drbd on top of bcache), I think
> drbd should always preserve data integrity on the two nodes, isn't it?
> Can bcache with writeback mode, cause corrupted data on both nodes in
> case of a ssd, or power unit failure?
> 
> And where is it better to put drbd metadata? External or internal?
> External to ssd is the obvious answer, but if I want to store them
> internally, what will be the advantages and disadvantages of the two
> solutions?
> 
> With the first option, storing metadata internally on the bcached
> device should not be so slow, given that bcache should always cache
> most used data. Isn't it?
> 
> What do you think about this subject?

If you're using bcache in writethrough mode, running bcache on top of
drbd is fine and may be faster (but benchmark it if you care).

Reason being in writethrough mode the SSD failing won't hurt anything.

If you're using bcache in writeback mode, _definitely_ run drbd on top
of bcache.

In writeback mode, if the SSD fails the backing device is now useless.
If you were using bcache under drbd, no big deal - you have a replica of
the backing device. If you're using bcache on top of drbd... well,
that's /dev/drbd0 that's now toast, and you're screwed.

      parent reply	other threads:[~2013-06-03 19:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-01 15:45 bcache on top of drbd or the contrary? Giovanni Lenzi
     [not found] ` <CAAxY4JkxnNqe_AUjERze30t8GQSD_3ZXXgM84Q+O_bnP6TCs4g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-06-03 19:14   ` Kent Overstreet [this message]

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=20130603191457.GJ2291@google.com \
    --to=koverstreet-hpiqsd4aklfqt0dzr+alfa@public.gmane.org \
    --cc=giovanni.lenzi-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-bcache-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /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