Features and Differences of RAID 0 1 5 10


foreword

There are many ways to integrate RAID, the main ones are: RAID 0 1 5 10, do different RAIDs have different functions, and what is the difference?


1. What is RAID? ?

RAID(Redundant Array of Independent Disks,独立冗余磁盘阵列)
简称为「磁盘阵列」,其实就是用多个独立的磁盘组成在一起形成一个大的磁盘系统,从而实现比单块磁盘更好的存储性能和更高的可靠性。
集中管理思想:资源整合,用统一标准进行管理
RAID 技术通过把多个硬盘设备组合成一个容量更大、安全性更好的磁盘阵列,并把数据切割成多个区段后分别存放在各个不同的物理硬盘设备上,然后利用分散读写技术来提升磁盘阵列整体的性能,同时把多个重要数据的副本同步到不同的物理硬盘设备上,从而起到了非常好的数据冗余备份效果。
任何事物都有它的两面性。
RAID 技术确实具有非常好的数据冗余备份功能,但是它也相应地提高了成本支出。
就像原本我们只有一个电话本,但是为了避免遗失,我们把联系人号码信息写成了两份,自然要为此多买一个电话本,这也就相应地提升了成本支出。RAID 技术的设计初衷是减少因为采购硬盘设备带来的费用支出,但是与数据本身的价值相比较,现代企业更看重的则是 RAID 技术所具备的冗余备份机制以及带来的硬盘吞吐量的提升。
也就是说,RAID 不仅降低了硬盘设备损坏后丢失数据的几率,还提升了硬盘设备的读写速度,所以它在绝大多数运营商或大中型企业中得到了广泛部署和应用。
1.1基本作用
基本作用:网站数据量很大的时候,单块盘装不下了,购买多块盘,又不想单个存放数据,就需要把所有硬盘整合成一个大磁盘,再在这个大磁盘上在分区(虚拟磁盘)放数据。另外一个功能,多块磁盘放在一起可以有冗余(备份)。
1.2特点(和硬盘做对比)

相同之处:组成的磁盘组就像是一个硬盘,用户可以对它进行分区,格式化等等。总之,对磁盘阵列的操作与单个硬盘一模一样。

The difference: the storage speed of the disk array is much higher than that of a single hard disk, and it can provide automatic data backup. The function of data backup is that once the user data is damaged, the damaged data can be recovered by using the backup information, thereby ensuring the security of the user data.

2. What are RAIDs?

Common RAID schemes can be divided into:

  • RAID0
  • Raid1
  • RAID5
  • RAID10

1.1 RAID 0
RAID 0 technology connects multiple physical hard disk devices ( at least two ) in series through hardware or software to form a large volume group, and writes data to each physical hard disk in turn. In this way, in the most ideal state, the read and write performance of the hard disk device will be improved several times, but if any hard disk fails, the data in the entire system will be destroyed.
RAID 0 technology can effectively improve the throughput speed of hard disk data, but it does not have data backup and error repair capabilities.
insert image description here
1.2 RAID 1
As can be seen from the technical diagram of RAID 1, it binds more than two hard disk devices, and
when writing data, it writes data to multiple hard disk devices at the same time (it can be regarded as data mirror or backup). When one of the hard disks fails, the normal use of data will be restored immediately and automatically by means of hot swapping.
insert image description here
Although RAID 1 technology pays great attention to data security, because the same data is written in multiple hard disk devices, the utilization rate of hard disk devices can be reduced . Theoretically, the real availability rate of the hard disk space shown in Figure 7-2 is only 50%. The
availability rate of a RAID 1 disk array composed of 3 hard disk devices is only about 33%; and so on. Moreover, since data needs to be written to more than two hard disk devices at the same time, this undoubtedly increases the load of the system's computing function to a certain extent.

1.3 RAID 5
RAID 5 technology takes into account the three (reading and writing speed, data security, cost) in theory,
but in fact it is more like a "mutual compromise" of the three.
RAID5 technology is to save the data parity information of the hard disk device to other hard disk devices.
insert image description here

The parity information of the data in the RAID 5 disk array is not stored in a certain hard disk device alone, but stored in every other hard disk device except itself. The advantage of this is that fatal defects will not occur after any one of the devices is damaged. The Parity part in the figure stores the parity information of the data.
In other words, the RAID 5 technology does not actually back up the real data information in the hard disk, but tries to rebuild the damaged data through the parity information when the hard disk device fails.
Technical features such as RAID "compromise" to take into account the read and write speed of hard disk devices, data security and storage costs.

RAID 5 consists of at least 3 hard disks and uses Disk Striping technology. Compared to RAID 1
Level, the advantage is that the parity information is saved instead of the exact same file content, so when a
file is repeatedly written, the RAID 5 level disk array group only needs to correspond to one parity information, which is more efficient , the storage cost
will be reduced accordingly

1.4 RAID 10
mainly uses RAID 10 technology in the production environment.
RAID 10 technology is a "combination" of RAID 1+RAID 0 technology.
As shown, RAID 10 technology requiresAt least 4 hard drives to build, among which two RAID 1 disk arrays are first made to ensure data security; and then RAID 0 technology is implemented on the two RAID 1 disk arrays to further improve the read and write speed of the hard disk device.
In this way, in theory, as long as not all hard disks in the same array are damaged, at most 50% of the hard disk devices can be damaged without losing data.
Because RAID 10 technology inherits the high read/write speed of RAID 0 and the data security of RAID 1, and the performance of RAID 10 exceeds that of RAID 5 regardless of the cost, it is currently a widely used storage technology.
insert image description here
RAID 10 divides the information first, and then creates mirror images in groups of two.
That is, first use RAID 1 as the lowest level combination, and then use RAID 0 technology to combine RAID 1 disk arrays together, and treat them as "a whole" hard disk. On the contrary, RAID 01 divides hard drives into two groups first, then uses RAID 0 as the lowest level combination, and then combines these two groups of RAID 0 hard drives through RAID 1 technology.
The difference between RAID 10 technology and RAID 01 technology is very clear.
In RAID 10, the damage of any one hard disk will not affect the data security, and the rest of the hard disks will work normally.But in RAID 01, as long as any hard disk is damaged, the lowest level RAID 0 disk array will stop working immediately, which may cause serious hidden dangers. So RAID 10 is far more common than RAID 01, and many motherboards don't even support RAID 01.

3. Difference

Disk Array Concept

Combine multiple disks together to form a whole.

raid 0: Combine two blocks into one, increase the size, read and write speed, and write data in stripes.

raid 1: At least two hard disks, only one is used, and the other is for backup data.

raid 5: at least 3 hard disks, (preferably 4 disks, plus a spare disk,)

​ Polling stripe: Data is stored on three disks in a polling manner, distributed storage (same size)
​ Verification stripe (verification data): used for one of the data disks. The verification is not all stored on one hard disk, but also performs mutual storage verification with the other three data disks.
It is suitable for scenarios with more reads and writes and less. This solution with the best performance and redundancy
has the same effect as raid 0 for reading, but needs to generate a check digit and write it to the third disk for writing, which consumes more performance (but it is faster than raid 1). faster)

raid 1 0: first set up raid 1, then set up raid 0.


Summarize

提示:这里对文章进行总结:

For example: the above is what we will talk about today. This article only briefly introduces the use of pandas, and pandas provides a large number of functions and methods that allow us to process data quickly and easily.

Guess you like

Origin blog.csdn.net/LShuo666/article/details/129162818