From: Neil Brown <neilb@suse.de>
To: David Greaves <david@dgreaves.com>
Cc: Wakko Warner <wakko@animx.eu.org>,
david@lang.hm, linux-kernel@vger.kernel.org,
linux-raid@vger.kernel.org
Subject: Re: limits on raid
Date: Thu, 21 Jun 2007 13:01:44 +1000 [thread overview]
Message-ID: <18041.59928.812167.453118@notabene.brown> (raw)
In-Reply-To: message from David Greaves on Saturday June 16
On Saturday June 16, david@dgreaves.com wrote:
> Neil Brown wrote:
> > On Friday June 15, wakko@animx.eu.org wrote:
> >
> >> As I understand the way
> >> raid works, when you write a block to the array, it will have to read all
> >> the other blocks in the stripe and recalculate the parity and write it out.
> >
> > Your understanding is incomplete.
>
> Does this help?
> [for future reference so you can paste a url and save the typing for code :) ]
>
> http://linux-raid.osdl.org/index.php/Initial_Array_Creation
>
> David
>
>
>
> Initial Creation
>
> When mdadm asks the kernel to create a raid array the most noticeable activity
> is what's called the "initial resync".
>
> The kernel takes one (or two for raid6) disks and marks them as 'spare'; it then
> creates the array in degraded mode. It then marks spare disks as 'rebuilding'
> and starts to read from the 'good' disks, calculate the parity and determines
> what should be on any spare disks and then writes it. Once all this is done the
> array is clean and all disks are active.
This isn't quite right.
Firstly, it is mdadm which decided to make one drive a 'spare' for
raid5, not the kernel.
Secondly, it only applies to raid5, not raid6 or raid1 or raid10.
For raid6, the initial resync (just like the resync after an unclean
shutdown) reads all the data blocks, and writes all the P and Q
blocks.
raid5 can do that, but it is faster the read all but one disk, and
write to that one disk.
NeilBrown
next prev parent reply other threads:[~2007-06-21 3:01 UTC|newest]
Thread overview: 69+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-15 2:58 limits on raid david
2007-06-15 3:05 ` Neil Brown
2007-06-15 3:43 ` david
2007-06-15 3:58 ` Neil Brown
2007-06-15 9:13 ` David Chinner
2007-06-15 22:21 ` Neil Brown
2007-06-15 11:10 ` Avi Kivity
2007-06-15 16:23 ` Jan Engelhardt
2007-06-15 17:20 ` Avi Kivity
2007-06-15 21:59 ` Neil Brown
2007-06-16 17:23 ` Avi Kivity
2007-06-17 13:00 ` Andi Kleen
2007-06-18 4:57 ` David Chinner
2007-06-21 2:56 ` Neil Brown
2007-06-21 6:39 ` David Chinner
2007-06-21 6:45 ` david
2007-06-21 8:59 ` David Greaves
2007-06-21 17:00 ` Mark Lord
2007-06-21 11:00 ` David Chinner
2007-06-21 12:40 ` Mattias Wadenstein
2007-06-21 14:40 ` Justin Piszcz
2007-06-21 16:48 ` david
2007-06-21 18:30 ` Martin K. Petersen
2007-06-21 20:08 ` Nix
2007-06-16 2:03 ` Wakko Warner
2007-06-16 3:47 ` Neil Brown
2007-06-16 4:40 ` Dan Merillat
2007-06-16 7:48 ` david
2007-06-16 13:38 ` David Greaves
2007-06-16 17:16 ` david
2007-06-17 17:16 ` Bill Davidsen
2007-06-18 17:20 ` Brendan Conoboy
2007-06-18 17:28 ` david
2007-06-18 18:03 ` Lennart Sorensen
2007-06-18 18:12 ` david
2007-06-18 18:33 ` Lennart Sorensen
2007-06-18 18:40 ` david
2007-06-18 19:11 ` Brendan Conoboy
2007-06-18 20:52 ` david
2007-06-18 21:46 ` Wakko Warner
2007-06-18 21:56 ` david
2007-06-18 22:00 ` Brendan Conoboy
2007-06-19 20:11 ` Lennart Sorensen
2007-06-19 20:51 ` david
2007-06-19 15:07 ` Phillip Susi
2007-06-19 19:28 ` david
2007-06-18 18:07 ` Brendan Conoboy
2007-06-18 18:16 ` david
2007-06-16 13:33 ` David Greaves
2007-06-17 1:44 ` dean gaudet
2007-06-21 3:01 ` Neil Brown [this message]
2007-06-21 8:49 ` David Greaves
2007-06-16 14:08 ` Wakko Warner
2007-06-17 1:47 ` dean gaudet
2007-06-17 13:28 ` Wakko Warner
2007-06-17 17:28 ` dean gaudet
2007-06-17 19:30 ` Wakko Warner
2007-06-17 19:54 ` dean gaudet
2007-06-17 20:46 ` david
2007-06-17 20:44 ` david
2007-06-17 17:14 ` Bill Davidsen
2007-06-21 23:03 ` Bill Davidsen
2007-06-22 2:24 ` Neil Brown
2007-06-22 8:10 ` David Greaves
2007-06-22 9:51 ` david
2007-06-22 12:39 ` David Greaves
2007-06-22 16:00 ` Bill Davidsen
2007-06-22 16:55 ` David Greaves
2007-06-22 18:41 ` david
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=18041.59928.812167.453118@notabene.brown \
--to=neilb@suse.de \
--cc=david@dgreaves.com \
--cc=david@lang.hm \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=wakko@animx.eu.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;
as well as URLs for NNTP newsgroup(s).