On 01/02/2011 14:50, Jon Nelson wrote:
On Tue, Feb 1, 2011 at 4:01 AM, David Brown<david@xxxxxxxxxxxxxxx> wrote:
On 31/01/2011 23:52, Keld JÃrn Simonsen wrote:
raid1+0 and Linux MD raid10 are similar, but significantly different
in a number of ways. Linux MD raid10 can run on only 2 drives.
Linux raid10,f2 has almost RAID0 striping performance in sequential read.
You can have an odd number of drives in raid10.
And you can have as many copies as you like in raid10,
You can make raid10,f2 functionality from raid1+0 by using partitions. For
example, to get a raid10,f2 equivalent on two drives, partition them into
equal halves. Then make md0 a raid1 mirror of sda1 and sdb2, and md1 a
raid1 mirror of sdb1 and sda2. Finally, make md2 a raid0 stripe set of md0
and md1.
If you have three disks, you can do that too:
md0 = raid1(sda1, sdb2)
md1 = raid1(sdb1, sdc2)
md2 = raid1(sdc1, sda2)
md3 = raid0(md0, md1, md2)
As far as I can figure out, the performance should be pretty much the same
(although wrapping everything in a single raid10,f2 is more convenient).
The performance will not be the same because. Whenever possible, md
reads from the outermost portion of the disk -- theoretically the
fastest portion of the disk (by 2 or 3 times as much as the inner
tracks) -- and in this way raid10,f2 can actually be faster than
raid0.
This would presumably apply to all raid1 arrangements, not just raid10 -
when md has a choice to read from more than one place it will prefer the
outermost place. In the arrangement I described above, the raid pairs
such as md0 each have one have on an inner partition, and one half on an
outer partition. /If/ md is smart enough, then it will do the same here
and read from the outer partition by preference.
The question is, does md determine the "outermost" copy by track number
relative to the partition, or by absolute track number on the disk? If
it is the former, then I see your point - with my raid 1 + 0 arrangement
the innermost and outermost partitions will be viewed the same. If it
is the later, then my arrangement will work equally well.
On a related note, if you mix an SSD and a HD (partition) in a mirror,
will md prefer to read from the SSD first? I know it is possible to use
the "write-mostly" flag to force all reads to come from the SSD
(assuming it hasn't failed), but it would be nice to get parallel reads
from the HD as well whenever the read is large enough or when there are
multiple reads in parallel.
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html