From: Stan Hoeppner <stan@hardwarefreak.com>
To: xfs@oss.sgi.com
Subject: Re: swidth in RAID
Date: Sun, 30 Jun 2013 16:42:06 -0500 [thread overview]
Message-ID: <51D0A62E.2020309@hardwarefreak.com> (raw)
In-Reply-To: <557F888F-34EA-4669-B861-C0B684DAD13D@gmail.com>
On 6/30/2013 1:43 PM, aurfalien wrote:
> I understand swidth should = #data disks.
No. "swidth" is a byte value specifying the number of 512 byte blocks
in the data stripe.
"sw" is #data disks.
> And the docs say for RAID 6 of 8 disks, that means 6.
>
> But parity is distributed and you actually have 8 disks/spindles working for you and a bit of parity on each.
>
> So shouldn't swidth equal disks in raid when its concerning distributed parity raid?
No. Lets try visual aids.
Set 8 coffee cups (disk drives) on a table. Grab a bag of m&m's.
Separate 24 blues (data) and 8 reds (parity).
Drop a blue m&m in cups 1-6 and a red into 7-8. You just wrote one RAID
stripe. Now drop a blue into cups 3-8 and a red in 1-2. Your second
write, this time rotating two cups (drives) to the right. Now drop
blues into 5-2 and reds into 3-4. You've written your third stripe,
rotating by two cups (disks) again.
This is pretty much how RAID6 works. Each time we wrote we dropped 8
m&m's into 8 cups, 6 blue (data chunks) and 2 red (parity chunks).
Every RAID stripe you write will be constructed of 6 blues and 2 reds.
XFS, or EXT4, or any filesystem, can only drop blues into the first 6
cups of a stripe. The RAID adds the two reds to every stripe.
Maybe now you understand why sw=6 for an 8 drive RAID6. And now maybe
you understand what "distributed parity" actually means--every stripe is
shifted, not just the parity chunks.
--
Stan
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2013-06-30 21:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-30 18:43 swidth in RAID aurfalien
2013-06-30 19:08 ` Peter Grandi
2013-06-30 21:42 ` Stan Hoeppner [this message]
2013-06-30 22:36 ` aurfalien
2013-07-01 1:38 ` Dave Chinner
2013-07-01 1:54 ` aurfalien
2013-07-01 2:09 ` Dave Chinner
2013-07-01 2:47 ` Stan Hoeppner
2013-07-01 2:54 ` aurfalien
2013-07-02 21:48 ` Peter Grandi
2013-07-03 0:15 ` Stan Hoeppner
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=51D0A62E.2020309@hardwarefreak.com \
--to=stan@hardwarefreak.com \
--cc=xfs@oss.sgi.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 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.