All of lore.kernel.org
 help / color / mirror / Atom feed
From: "George Shammas" <btrfs@shamm.as>
To: linux-btrfs@vger.kernel.org
Subject: What exactly is BTRFS Raid 10?
Date: Fri, 19 Aug 2022 12:49:50 -0400	[thread overview]
Message-ID: <a3fc9d94-4539-429a-b10f-105aa1fd3cf3@www.fastmail.com> (raw)

Hello,

 I've been searching and reading docs for a few days now, and btrfs raid 10 is a mystery to me. 

This is mostly a documentation question, as many places reference it but nothing actually describes it and the real question is how does it differ from btrfs raid1.

Both BTRFS Raid1 and Raid10 
 - Allows arbitrary number of drives (>=2), including odd numbers. 
 - Will write duplicate blocks across disks.

Raid 10 is referenced in many places, including being the example on using btrfs on multiple devices

https://btrfs.wiki.kernel.org/index.php/Using_Btrfs_with_Multiple_Devices

And while raid0,1,5,6 are described in several places, raid 10 is missing. Including in the layout examples here:

https://btrfs.readthedocs.io/en/latest/mkfs.btrfs.html?highlight=raid10#profile-layout

The Raid 1 example there also likely needs a bit of explanation or validation, as all the blocks are written to one device. In that raid one example three devices could be lost as long as it is not one of them is the first device. It also cannot be accurate once the amount stored is above 1 full drive. 

Since raid10 allows for two devices, is there ever a scenario in which choose raid10 would be bad when you want raid1?

BTRFS defaults to raid1 for Data and Metadata, is there a reason that doesn't default to raid10?

Since BTRFS raid modes aren't like traditional block level raids, it would be very useful to explain this somewhere and the pros and cons of each. Maybe even merging the two modes if they cover the same use cases. 

--George

PS:

There is a lot of misinformation out there about btrfs raid as well. For example:

https://www.reddit.com/r/btrfs/comments/f5unv5/raid_1_vs_raid_10/

None of the comments seem accurate, as they are describing traditional raid setups. The second comment says btrfs raid10 is actively harmful, but I has no references to collaborate that. 

             reply	other threads:[~2022-08-19 17:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-19 16:49 George Shammas [this message]
2022-08-19 18:10 ` What exactly is BTRFS Raid 10? Phillip Susi
2022-08-19 22:01   ` George Shammas
2022-08-19 22:18     ` Chris Murphy
2022-08-19 22:37       ` George Shammas
2022-08-19 22:29     ` waxhead
2022-08-22 19:51     ` Phillip Susi
2022-08-20 11:28 ` Goffredo Baroncelli
2022-08-20 18:11   ` Andrei Borzenkov
2022-08-21  0:23     ` Qu Wenruo

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=a3fc9d94-4539-429a-b10f-105aa1fd3cf3@www.fastmail.com \
    --to=btrfs@shamm.as \
    --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.