免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3997 | 回复: 1
打印 上一主题 下一主题

[存储备份] [转载]raid 0+1和1+0的区别 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-12-10 12:05 |只看该作者 |倒序浏览
RAID 0+1 - using 4 drives, two pairs are striped, and the results mirror each other. In this configuration, when one of the drives fails, it actually breaks the stipe that it belongs to, which in turn breaks the mirror... at this point, all you have is 1 stipe. At this point, if one drive fails, you are in trouble. To recover, the offending drive is removed, and the entire stipe needs to be resync'd.
RAID 1+0 - using 4 drives, two pairs are mirrored, and the results are used to create a single stripe. In this configuration, when one of the drives fails, it only breaks one mirror, without affecting the stripe... at this point, only 1/2 of the stipe is mirrored... but if a 2nd drive failure were to occur, it has a 2-in-3 chance of occuring on the last mirror... if it does, you are still OK. To recover, the offending drive is removed, and only the mirror of 1/2 the stripe needs to be resync'd.

LinuxAid.com.cn
-----------------------------------------------------------------------------------
RAID 10和RAID0+1是完全不同的两个实现和设置方法  
现在我举两个例子,分别是单个盘阵2块disk和 3块disk的情况  
(一)单个盘阵2块disk  
RAID 10 (先作0,然后作1)  
A  
----]- RAID0(array 1)  
B  
---------------------]- RAID 1(array final)  
C  
----]- RAID0(array 2)  
D  
RAID 0+1(先作1,然后作0)  
A  
---]- RAID1(array 1)  
B  
--------------------]- RAID 0(array final)  
C  
---]- RAID1(array 2)  
D  
看上去是不是差不多?呵呵,先不要马上下结论,看三块盘以上会有啥变化  
(二) 单个盘阵3块disk  
RAID10  
A  
B-------]- RAID0  
C  
------------------]- RAID 1  
E  
F-------]- RAID0  
G  
RAID0+1因为是先做1,然后作0,因为RAID 1是镜像,需且只需两块硬盘,所以,在单个盘阵是2块以上的情况下,是实现不了 RAID0+1的  
===============================================  
上面说了 具体的配置区别  
在实际的应用中,RAID10是追求在确保高速度访问情况下数据基本可靠的一种手段.  
比如,在学校的FTP服务器上,一些文件被频繁的访问,但是要求这些文件本身具备一定的安全和可靠,所以,RAID10是比较理想的选择.  
又比如,在财务部门等小型关键部门,需要存放一些比较重要的资料,以提供企业的其他部门,在一定的时间段(比如下班之前一个小时的结算时间,比如每个星期五上午的结算时间,而不是指在所有的时间段内)比较多的访问,所以在确保数据可靠性的情况下,采取RAID0+1的方式来稍微提高一下访问性能。  
由此看出,这两种方式是完全不同的,应用的对象和场合也是完全不一样的。  
在这里再次强调,如果真的想好好的设计和实施企业应用,就应该像称职的大夫一样,通过仔细甄别业务的不同特点,制定针对这种业务的解决方法,而不能随随便便的拿出RAID5一概而论,这是对用户的不负责任的工作态度。  
根据我得到的反馈,对于采用精细调整的IT系统的企业,在将来漫长的运作过程中,出现问题的概率要远小于粗枝大叶胡乱部署的企业,特别是一些基本系统,比如mail,web,database等。  
Linux由于其稳定和高度开放的特点,特别适合企业应用,不过前提是经过了精细的设计和调整,否则,其被应用到企业中,效果未见得比微软平台要好,甚至有可能完全抹煞了其稳定和高度开放的特性,成为企业构架IT系统中的败笔.  
----------------------------------------------------------------------------------

raid 1+0
A1=B1
A2=B2
A3=B3
A=A1+A2+A3
B=B1+B2+B3
当A1坏时,B1再坏整个RAID完蛋,几率为1/5
raid 0+1
A=A1+A2+A3
B=B1+B2+B3
A=B
当A1坏时,A即坏但是同时B坏任何一块整个RAID都完蛋,几率为3/5
所以1+0好于O+1
----------------------------------------------------------------------------------
通过此网页了解RAID     
http://acnc.com/04_01_10.html
----------------------------------------------------------------------------------
Difference between RAID 0+1 vs RAID 1+0

We have covered RAID levels before in our posts. You can read about the different RAID levels
here
and the I/O characteristics
here
.  While building up a DR (Disaster Recovery) environment for one of our clients, one of the questions asked by the client was: “How is RAID 1+0 different than RAID 0+1?”.  Both RAID 0+1 and RAID 1+0 are multiple RAID levels which means that they are created by taking a number of disks and then dividing them up into sets. And within each of these sets, a single RAID level is applied to it in order to form the arrays.  Then, the second RAID level is applied at the top of it to form the nested array.  RAID 1+0 is also called as a stripe of mirrors and RAID 0+1 is also called as a mirror of stripes based on the nomenclature used for RAID 1 (mirroring) and RAID 0 (striping).  Let’s follow this up with an example:
Suppose that we have 20 disks to form the RAID 1+0 or RAID 0+1 array of 20 disks.
a) If we chose to do RAID 1+0 (RAID 1 first and then RAID 0), then we would divide those 20 disks into 10 sets of two.  Then we would turn each set into a RAID 1 array and then stripe it across the 10 mirrored sets.
b) If on the other hand, we choose to do RAID 0+1 (i.e. RAID 0 first and then RAID 1), we would divide the 20 disks into 2 sets of 10 each.  Then, we would turn each set into a RAID 0 array containing 10 disks each and then we would mirror those two arrays.
So, is there a difference at all?  The storage is the same, the drive requirements are the same and based on the testing also, there is not much difference in performance either.  The difference is actually in the fault tolerance.  Let’s look at the two steps that we mentioned above in more detail:
RAID 1+0:
Drives 1+2     = RAID 1 (Mirror Set A)
Drives 3+4     = RAID 1 (Mirror Set B)
Drives 5+6     = RAID 1 (Mirror Set C)
Drives 7+8     = RAID 1 (Mirror Set D)
Drives 9+10     = RAID 1 (Mirror Set E)
Drives 11+12     = RAID 1 (Mirror Set F)
Drives 13+14     = RAID 1 (Mirror Set G)
Drives 15+16     = RAID 1 (Mirror Set H)
Drives 17+18     = RAID 1 (Mirror Set I)
Drives 19+20     = RAID 1 (Mirror Set J)
Now, we do a RAID 0 stripe across sets A through J.  If drive 5 fails, then only the mirror set C is affected.  It still has drive 6 so it will continue to function and the entire RAID 1+0 array will keep functioning.  Now, suppose that while the drive 5 was being replaced, drive 17 fails, then also the array is fine because drive 17 is in a different mirror set.  So, bottom line is that in the above configuration atmost 10 drives can fail without effecting the array as long as they are all in different mirror sets.
Now, let’s look at what happens in RAID 0+1:
RAID 0+1:
Drives 1+2+3+4+5+6+7+8+9+10        = RAID 0 (Stripe Set A)
Drives 11+12+13+14+15+16+17+18+19+20    = RAID 0 (Stripe Set B)
Now, these two stripe sets are mirrored.  If one of the drives, say drive 5 fails, the entire set A fails.  The RAID 0+1 is still fine since we have the stripe set B.  If say drive 17 also goes down, you are down.  One can argue that that is not always the case and it depends upon the type of controller that you have.  Say that you had a smart controller that would continue to stripe to the other 9 drives in the stripe set A when the drive 5 fails and if later on, drive 17 fails, it can use drive 7 since it would have the same data.  If that can be done by the controller, then theoretically speaking, RAID 0+1 would be as fault tolerant as RAID 1+0.  Most of the controllers do not do that though.
http://decipherinfosys.wordpress.com/2008/01/15/difference-between-raid-01-vs-raid-10/
-----------------------------------------------------------------------------------
http://forums11.itrc.hp.com/service/forums/questionanswer.do?admit=109447626+1260419239666+28353475&threadId=117814

http://aput.net/~jheiss/raid10/

Why is RAID 1+0 better than RAID 0+1?
Of late I've heard much talk about RAID 1+0 being better than RAID 0+1, but never got a good answer why. Leah and I started talking about this over dinner one night and did a little math (literally on the back of a napkin) to calculate how much better. Here's what we figured out.


RAID 0+1 configuration where multiple disks are striped together into sets (sets A & B in the diagram, each set being as large as the resulting final volume), and then two or more sets are mirrored together.


RAID 1+0 configuration where two or more drives are mirrored together (mirrors 1-4 in the diagram), and then the mirrors (as many as are needed to result in the desired amount of space) are striped together.
In either case (0+1 or 1+0), the loss of a single drive does not result in failure of the RAID system. The difference comes in the chance that the loss of a second drive from the system will result in the failure of the whole system. In RAID 0+1, you have to lose one drive from each disk set to result in the failure of the whole system. In my diagram that would be one drive from set A and one drive from set B. In RAID 1+0, you have to lose all drives in a mirror. This would be both drives in any numbered pair in the diagram.
Mathematically, the difference is that the chance of system failure with two drive failures in a RAID 0+1 system with two sets of drives is (n/2)/(n - 1) where n is the total number of drives in the system. The chance of system failure in a RAID 1+0 system with two drives per mirror is 1/(n - 1). So, using the 8 drive systems shown in the diagrams, the chance that losing a second drive would bring down the RAID system is 4/7 with a RAID 0+1 system and 1/7 with a RAID 1+0 system.
The math gets more complicated when you have more than two elements to a mirror. Since that's a rare configuration, I haven't bothered to figure out the equations. If someone else would like to, I'll be glad to post them here.
Another difference between the two RAID configurations is performance when the system is in a degraded state, i.e. after it has lost one or more drives but has not lost the right combination of drives to completely fail. In a RAID 0+1 configuration, the loss of any drive in a set causes the failure of that entire set and the set is removed from the RAID system. Generally (in the two set case) this means you are left with a RAID 0 system made up of the remaining set of disks. This probably slightly improves write performance and slightly degrades read performance (but that's just a WAG, I haven't done any testing). In a RAID 1+0 system, you would see the same effect on each mirror that loses a drive, but not the whole system. In other words, a RAID 1+0 configuration will tend to show similar, but less dramatic, changes in performance when in a degraded mode than RAID 0+1. However, the changes will likely be slight in any case.
One more difference that was recently pointed out to me is the speed at which the RAID system recovers once the failed disk is replaced. RAID 1+0 only has to re-mirror one drive, whereas RAID 0+1 has to re-mirror the entire failed set. So RAID 1+0 will recover significantly faster.
RAID systems that support RAID 1+0
There used to be a list here of products that did or didn't support RAID 1+0. The list got too long for me to maintain. Ask the vendor or something. Usually you can find this in the documentation for the product, but it is frequently in the fine print.


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/28303/showart_2116289.html

论坛徽章:
0
2 [报告]
发表于 2010-04-16 13:38 |只看该作者
受教了,楼主细心人,学习中
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP