linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hugo Mills <hugo@carfax.org.uk>
To: Anand Jain <anand.jain@oracle.com>
Cc: "Austin S. Hemmelgarn" <ahferroin7@gmail.com>,
	Qu Wenruo <quwenruo@cn.fujitsu.com>,
	btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: About minimal device number for RAID5/6
Date: Mon, 15 Aug 2016 18:30:51 +0000	[thread overview]
Message-ID: <20160815183051.GD20440@carfax.org.uk> (raw)
In-Reply-To: <089d5900-8915-bf74-ffb3-044be11b04ae@oracle.com>

[-- Attachment #1: Type: text/plain, Size: 1556 bytes --]

On Mon, Aug 15, 2016 at 10:32:25PM +0800, Anand Jain wrote:
> 
> 
> On 08/15/2016 10:10 PM, Austin S. Hemmelgarn wrote:
> >On 2016-08-15 10:08, Anand Jain wrote:
> >>
> >>
> >>>>IMHO it's better to warn user about 2 devices RAID5 or 3 devices RAID6.
> >>>>
> >>>>Any comment is welcomed.
> >>>>
> >>>Based on looking at the code, we do in fact support 2/3 devices for
> >>>raid5/6 respectively.
> >>>
> >>>Personally, I agree that we should warn when trying to do this, but I
> >>>absolutely don't think we should stop it from happening.
> >>
> >>
> >> How does 2 disks RAID5 work ?
> >One disk is your data, the other is your parity.
> 
> 
> >In essence, it works
> >like a really computationally expensive version of RAID1 with 2 disks,
> >which is why it's considered a degenerate configuration.
> 
>    How do you generate parity with only one data ?

   For plain parity calculations, parity is the value p which solves
the expression:

x_1 XOR x_2 XOR ... XOR x_n XOR p = 0

for corresponding bits in the n data volumes. With one data volume,
n=1, and hence p = x_1.

   What's the problem? :)

   Hugo.

> -Anand
> 
> 
> > Three disks in
> >RAID6 is similar, but has a slight advantage at the moment in BTRFS
> >because it's the only way to configure three disks so you can lose two
> >and not lose any data as we have no support for higher order replication
> >than 2 copies yet.

-- 
Hugo Mills             | I always felt that as a C programmer, I was becoming
hugo@... carfax.org.uk | typecast.
http://carfax.org.uk/  |
PGP: E2AB1DE4          |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  parent reply	other threads:[~2016-08-15 18:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-15  7:50 About minimal device number for RAID5/6 Qu Wenruo
2016-08-15 11:57 ` Austin S. Hemmelgarn
2016-08-15 14:08   ` Anand Jain
2016-08-15 14:10     ` Austin S. Hemmelgarn
2016-08-15 14:32       ` Anand Jain
2016-08-15 15:01         ` Austin S. Hemmelgarn
2016-08-15 18:30         ` Hugo Mills [this message]
2016-08-15 21:20           ` Henk Slager
2016-08-16  1:32       ` Qu Wenruo
2016-08-16 12:01         ` Austin S. Hemmelgarn
2016-08-15 13:58 ` Anand Jain

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=20160815183051.GD20440@carfax.org.uk \
    --to=hugo@carfax.org.uk \
    --cc=ahferroin7@gmail.com \
    --cc=anand.jain@oracle.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=quwenruo@cn.fujitsu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).