All of lore.kernel.org
 help / color / mirror / Atom feed
* layout of far blocks in raid10
@ 2010-05-11 15:12 Keld Simonsen
  2010-05-11 17:13 ` Aryeh Gregor
  0 siblings, 1 reply; 6+ messages in thread
From: Keld Simonsen @ 2010-05-11 15:12 UTC (permalink / raw)
  To: linux-raid

Hi

There is a quesition on block layout in the raid10 far layout,
that I would like to know more about.
For 4 drives, and with 2 copies (-n 4 -p n2)  I see several
possible layouts, 3 of them are, showing the beginning of each raid0 section:

Disks:
 a  b  c  d

Layout 1:

 1  2  3  4
..............

 4  1  2  3


Layout 2:

 1  2  3  4
..............

 3  4  1  2


Layout 3:

 1  2  3  4
..............

 2  3  4  1


This gives 3! combinations for double faliure, or in all 6 possibilities.

These are the combinations that will contain all blocks with only 2 working 
drives:

Layout 1: a+c, b+d will work, total 2 combinations
Layout 2: a+b, c+d, a+d b+c would work, total 4 combinations
Layout 3: a+c, b+d would work, total 2 combinations

So the best layout would be layout 2, as it provides a
4/6 chance = 67 % that it will survive the 2nd disk failure,
while the 2 others only have 2/6 = 33 % chance of surviving
the 2nd disk failure.

How is the "-n 4 -p f2" layout actually done?

I think one could do similar analyses for other numbers of drives.
Is there any general pattern one (algorithm) one could use?
I think one key is allocating  copies in pairs. Maybe more could be
gained by allocating the blocks in groups of powers of 2.
Or maybe the only gain comes from the grouping in pairs as there are
only 2 copies.

best regards
Keld

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-05-11 22:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-11 15:12 layout of far blocks in raid10 Keld Simonsen
2010-05-11 17:13 ` Aryeh Gregor
2010-05-11 21:56   ` Neil Brown
2010-05-11 22:22     ` Aryeh Gregor
2010-05-11 22:54       ` Neil Brown
2010-05-11 22:35     ` Keld Simonsen

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.