From: Andrei Borzenkov <arvidjaar@gmail.com>
To: kreijack@inwind.it, George Shammas <btrfs@shamm.as>,
linux-btrfs@vger.kernel.org
Subject: Re: What exactly is BTRFS Raid 10?
Date: Sat, 20 Aug 2022 21:11:45 +0300 [thread overview]
Message-ID: <c0080bf6-c433-30f1-83aa-de8ecba60bee@gmail.com> (raw)
In-Reply-To: <aa81ac50-0f2f-73c0-5174-1709ec24b52c@libero.it>
On 20.08.2022 14:28, Goffredo Baroncelli wrote:
>
> RAID1:
> A new chunk is allocated to the two disks with more space available. Each new chunk has a size of 1GB x 2 = 2GB, but only 1GB is available for the data because the other one contains a copy of the data.
> A raid1 layout may have more than two disks. However the data is copied only two times, this means that you can tolerate only the lost of one device.
> For example the first chunk is allocated on the first two disks; the 2nd chunk is allocated on the first and the 3rd disk; the 3rd chunk is allocated on the 2nd and 3rd disk....
>
...
>
> RAID10:
> Is a mix of RAID0 and RAID1: the data is copied two times (so you can tolerate the lost of one device), but it is spread over near all the disks.
> If you have 7 disks, a new chunk is allocated over 6 disks (the greatest even number <= to the disk count) with more space available.
> If you write data to a disk, the first 64K are written on the 1st disk and and the 2nd disk (as 2nd copy). When you write the 2nd 64 k of data, these are written in the 3rd disk and 4th disk (as 2nd copy). And so on until you fill the chunk.
> When the chunk is filled, a new allocation occurred. Likely the 7th disk is used and one of the first 6 isn't for the new chunk.
>
Is large IO processed in parallel? If I have 8 disks raid10 and issue
256K request - will btrfs submit 4 concurrent 64K requests to each disk?
And for raid1 - will there be single 256K physical disk request or 4 x
64K requests?
What about read requests - will all disks in raid1/raid10 be used
concurrently or btrfs always reads from the "primary" copy (and how it
is determined then)?
next prev parent reply other threads:[~2022-08-20 18:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-19 16:49 What exactly is BTRFS Raid 10? George Shammas
2022-08-19 18: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 [this message]
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=c0080bf6-c433-30f1-83aa-de8ecba60bee@gmail.com \
--to=arvidjaar@gmail.com \
--cc=btrfs@shamm.as \
--cc=kreijack@inwind.it \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox