磁盘阵列

分享于 

分钟阅读

 
点击句子查看译文 显示原文      显示译文      双语对照    源址


Question :

I'm testing some RAID setups built with mdadm.this is about parallel reads on a 2-disks array.

RAID1 seems to balance the reads by process, some sort of coarse-grained balancing, so reading the whole raid array with a simpledd if=/dev/md0 of=/dev/null bs=1M, according to nmon, basically directs all the read to /dev/sda.when multiple dd commands run in parallel, some read from sda some from sdb.

Curiously, i tested with RAID5, same two disks, same redundancy and 50% disk utilization.one single low-level read with dd is spread across sda and sdb evenly, so every read operation seems to be better parallelized.

Effects on the CPU load seem to be negligible.i also haven't checked write operations.

Does using RAID5 for a 2-disks array make any sense?

By the way, going back and forth between 1 and 5 is as easy asmdadm --grow/dev/md0 --level 1or 5, no data is moved, only the parallel read pattern changes.


Answer 1 :

One single low-level read with dd is spread across sda and sdb evenly, so every read operation seems to be better parallelized.

You're misreading what's going on in RAID-5.to read any data from a RAID-5 array, all disks have to be read from, and the actual data extracted from the"data + parity"that's stored on all the disks in the array.

In reality, you have to read twice as much data in the RAID-5 configuration to get your data, but with the added benefit of detecting data corruption.(To the extent RAID-5 protects against data corruption.it's not complete. )

In a RAID-1 mirror, you'll only detect data corruption in a full scrub of the array.

Does using RAID5 for a 2-disks array make any sense?

If you want data corruption detection, yes.but remember that comes at the cost of needing twice the read bandwidth and twice the number of read IO operations.


Answer 2 :

Does using RAID5 for a 2-disks array make any sense?

No, it needs 3 + disks.you should specify RAID1 when you want a mirror.do not rely on the implementation details like mdadm doing a sane thing and being effectively RAID1 for 2 disk array.

Also, don't use RAID5, a second failure on rebuild is likely.two disks in RAID 1, or 4 + in RAID6 or RAID10.



ARR  磁盘  array  disks