All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc MERLIN <marc@merlins.org>
To: john terragon <jterragon@gmail.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: btrfs on software RAID0
Date: Mon, 5 May 2014 14:25:13 -0700	[thread overview]
Message-ID: <20140505212513.GS10159@merlins.org> (raw)
In-Reply-To: <CANg_oxxFKHioyWO0ct7vcT=aTbX11KbCKtGwvZo_59jirLDGow@mail.gmail.com>

On Mon, May 05, 2014 at 10:51:46PM +0200, john terragon wrote:
> Hi.
> I'm about to try btrfs on an RAID0 md device (to be precise there will
> be dm-crypt in between the md device and btrfs). If I used ext4 I
> would set the stride and stripe_width extended options. Is there
> anything similar I should be doing with mkfs.btrfs? Or maybe some
> mount options beneficial to this kind of setting.

This is not directly an answer to your question, so far I haven't used a
special option like this with btrfs on my arrays although my
undertstanding is that it's not as important as with ext4.

That said, please read
http://marc.merlins.org/perso/btrfs/post_2014-04-27_Btrfs-Multi-Device-Dmcrypt.html

1) use align-payload=1024 on cryptsetup instead of something bigger like
8192. This will reduce write amplification (if you're not on an SSD).

2) you don't need md0 in the middle, crypt each device and then use
btrfs built in raid0 which will be faster (and is stable, at least as
far as we know :) ).

Then use /etc/crypttab or a script like this
http://marc.merlins.org/linux/scripts/start-btrfs-dmcrypt
to decrypt all your devices in one swoop and mount btrfs.

Marc
-- 
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems ....
                                      .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/                         | PGP 1024R/763BE901

  reply	other threads:[~2014-05-05 21:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-05 20:51 btrfs on software RAID0 john terragon
2014-05-05 21:25 ` Marc MERLIN [this message]
2014-05-05 21:42   ` ronnie sahlberg
2014-05-05 22:06     ` Marc MERLIN
2014-05-05 22:21   ` john terragon
2014-05-06  7:02   ` john terragon
2014-05-07  9:01     ` Marc MERLIN

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=20140505212513.GS10159@merlins.org \
    --to=marc@merlins.org \
    --cc=jterragon@gmail.com \
    --cc=linux-btrfs@vger.kernel.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 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.