[CentOS] Raid 10 questions...2 drive

tomh0665 tomh0665 at gmail.com
Sat Sep 25 04:28:10 UTC 2010


On Fri, Sep 24, 2010 at 10:50 PM, Digimer <linux at alteeve.com> wrote:
> On 10-09-24 10:27 PM, Tom Bishop wrote:
>> I have been reading lots of stuff but trying to find out if a raid10
>> 2drive setup is any better/worse than a normal raid 1 setup....I have to
>> 1Tb drives for my data and a seperate system drive, I am only interested
>> in doing raid on my data...
>>
>> So i setup my initial test like this....
>>
>> mdadm -v --create /dev/md0 --chunk 1024 --level=raid10 --raid-devices=2
>> /dev/sdb1 /dev/sdc1
>>
>> I have also read about near and far but was going to play with this and
>> was wondering if anyone had any insights for 2 drives setup...Thanks...
>
> Raid 10 requires 4 drives. First you would make two RAID 0 arrays, then
> create a third array that is RAID 1 using the two RAID 0 arrays for it's
> devices.
>
> With only two drives, your option is RAID 1 (mirroring - proper
> redundancy) or RAID 0 (striping only - lose one drive and you lose *all*
> data).

mdraid does offer a 2-disk raid10 option but it is basically raid1
with some extra mirroring options:
http://en.wikipedia.org/wiki/Non-standard_RAID_levels#Linux_MD_RAID_10

You can specify the layout options with "--layout". From the man page:

<begin>
The layout options for RAID10 are one of 'n', 'o' or 'p' followed by a
small number. The default is 'n2'.

n signals 'near' copies. Multiple copies of one data block are at
similar offsets in different devices.

o signals 'offset' copies. Rather than the chunks being duplicated
within a stripe, whole stripes are duplicated but are rotated by one
device so duplicate blocks are on different devices. Thus subsequent
copies of a block are in the next drive, and are one chunk further
down.

f signals 'far' copies (multiple copies have very different offsets).
See md(4) for more detail about 'near' and 'far'.

The number is the number of copies of each datablock. 2 is normal, 3
can be useful. This number can be at most equal to the number of
devices in the array. It does not need to divide evenly into that
number (e.g. it is perfectly legal to have an 'n2' layout for an array
with an odd number of devices).
</end>



More information about the CentOS mailing list