Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Detailed explanation of RAID0, 1,5,10

2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

I. raid definition

RAID (Redundant Array of Independent Disk Independent redundant disk Array) technology was put forward by the University of California, Berkeley in 1987. At first, it developed a certain level of data protection technology in order to combine small cheap disks to replace large expensive disks, and hope that disk failure will not damage the access to data. RAID is a redundant array composed of multiple cheap disks, which appears as an independent large storage device under the operating system. RAID can give full play to the advantages of multiple hard drives, improve hard disk speed, increase capacity, provide fault-tolerant work, ensure data security, easy to manage, continue to work in the case of any hard disk problems, and will not be affected by damage to the hard disk.

2. Several working modes of RAID (only four kinds of RAID0,RAID1,RAID5,RAID10 are discussed, these four are typical)

1. RAID0 (also known as Stripe or Striping-- striping)

That is, Data Stripping data striping technology. RAID 0 can connect multiple hard drives into a larger hard disk cluster, which can improve the performance and throughput of the disk. RAID 0 has no redundancy or bug repair capabilities, has a low cost, requires at least two disks, and is generally used only in cases where logarithmic security is not required.

Features:

Fault tolerance: no redundancy type: no hot spare option: no read performance: high random write performance: high continuous write performance: high number of disks needed: only 2 or 2cm N (here it should be more than two hard drives) available capacity: total disk capacity typical applications: fault-free fast read and write, requires low security, such as graphics workstations, etc.

How RAID 0 works:

Figure 1

As shown in figure 1: the system's RADI O data request to a three-disk logical hard disk (the disk group 0) is translated into three operations, each of which corresponds to a physical hard disk. We can clearly see from the figure that by establishing RAID 0, the original sequence of data requests are distributed to all three hard drives and executed simultaneously.

In theory, the parallel operation of three hard drives increases the disk read and write speed by three times at the same time. However, due to the influence of many factors such as bus bandwidth, the actual lifting rate will certainly be lower than the theoretical value. however, there is no doubt that the speed-up effect is obvious compared with the serial transmission of a large number of data.

The disadvantage of RAID 0 is that it does not provide data redundancy, so once the user data is corrupted, the corrupted data cannot be recovered.

The characteristics of RAID 0 make it especially suitable for areas that require high performance but do not care much about data security, such as graphics workstations. For individual users, RAID 0 is also an excellent choice to improve hard disk storage performance.

Computer technology is developing rapidly, but the transmission rate of hard disk has also become the bottleneck of performance. What shall I do? The maturity of IDE RAID technology makes it easy for us to build our own ultra-high-speed hard drives. In practical applications, RAID 0 hard disk array can be much faster than ordinary IDE 7200 to ATA 133. today, in most high-end or player motherboards, we can find a PROMISE or HighPoint RAID chip and find several extra IDE interfaces they provide. Yes, RAID is just around the corner. Are you willing to give up the performance improvement that RAID brings to us? Of course the answer is no!

Practical IDE RAID

RAID can be implemented by software or hardware. For example, Windows 2000 can provide the RAID function of software, but it consumes a lot of CPU resources and reduces the performance of the whole machine. While the hardware implementation is generally implemented by raid cards, high-end SCSI raid cards have their own dedicated cache and HDD O processor, but for home users, this kind of overhead is obviously unbearable. After all, it is not easy to buy two or more raid cards in order to achieve raid. We also have a compromise-IDE RAID. Perhaps this is the easiest way for ordinary people to accept. Although IDE RAID has a compromise in terms of function and performance, the average user doesn't seem to care about it relative to the low price.

Why use RAID 0?

RAID 0 needs at least two hard drives to achieve. Its capacity is the sum of the hard drives that make up the system, and the capacity of these hard drives should be the same. In the household IDE RAID, it is common to cascade two hard drives, and be sure to use hard drives of the same model and the same capacity. RAID 0 mode divides the data into two hard disks when writing data to the hard disk, and vice versa when reading the data. In this way, each hard disk only has to bear half of the data transmission task, and the result is an increase in speed.

Implement the formula:

(1), RAID 0 is the simplest way (I don't think this is what it intended to advocate)

It is to connect x blocks of the same hard disk in the form of hardware through an intelligent disk controller or with a disk driver in the operating system in a software way to form an independent logical drive with a capacity x times that of a separate hard drive. when computer data is written to each disk in turn, when one disk runs out of space, the data will be automatically written to the next disk. Its advantage is that it can increase the capacity of the disk.

The speed is the same as that of any of these disks, and if any of them fails, the whole system will be destroyed and reliable.

Sex is the use of a single hard drive.

(2) another way of RAID 0 (commonly referred to as RAID 0 refers to this)

It is to use n hard disks to choose a reasonable band size to create a band set, and it is best to equip each hard disk with a special disk controller to read and write data to n disks at the same time, so as to increase the speed by n times. Improve the performance of the system.

2. RAID 1 (also known as Mirror or Mirroring-- image)

RAID 1 is called disk mirroring: mirroring the data of one disk to another disk has high data redundancy without affecting performance to maximize the reliability and repairability of the system, but the disk utilization rate is 50%, so the cost is the highest, and it is often used to save critical and important data. RAID 1 operates by automatically copying 100% of the data that the user writes to the hard disk to another hard disk.

RAID 1 has the following characteristics:

(1) each disk of RAID 1 has a corresponding mirror disk, the data is mirrored synchronously at any time, and the system can read data from any disk in a group of mirror disks.

(2) the space that the disk can use is only half of the total disk capacity, and the system cost is high.

(3) as long as there is at least one disk in any pair of mirror disks in the system, the system can run normally even when half of the hard drives have problems.

(4) the RAID system with hard disk failure is no longer reliable, so the damaged hard disk should be replaced in time, otherwise the remaining mirror disk will also have problems, then the whole system will crash.

(5) after replacing the new disk, the original data will take a long time to synchronize the mirror, and the external access to the data will not be affected, but the performance of the whole system will be degraded.

(6) the load of RAID 1 disk controller is quite heavy, so using multiple disk controllers can improve the security and availability of data.

How RAID 1 works:

Figure 2

As shown in figure 2: when reading data, the system first reads data from the source disk of RAID1. If the data is read successfully, the system does not care about the data on the backup disk; if it fails to read the data from the source disk, the system automatically reads the data on the backup disk without interrupting the user's task. Of course, we should replace the damaged hard disk in time and use the backup data to re-establish Mirror, so as to avoid irreparable data loss when the backup disk is damaged.

Advantages and disadvantages of raid 1

Due to 100% backup of stored data, RAID 1 provides the highest data security of all RAID levels. Similarly, because 100% of the data is backed up, the backup data accounts for half of the total storage space, so the disk space utilization of Mirror (Mirror) is low and the storage cost is high. Although Mirror can not improve storage performance, because of its high data security, it is especially suitable for storing important data, such as server and database storage.

3. RAID 5 (which can be understood as a compromise between RAID 0 and RAID1, but does not fully use the concept of RAID1 mirroring, but uses "parity information" as a way of data recovery, unlike the following RAID10. )

Fault tolerance: there is redundancy type: parity hot spare options: read performance: high random write performance: low continuous write performance: low number of disks needed: three or more available capacity: (nmur1) / n total disk capacity (n is the number of disks) typical applications: random data transfer requires high security, such as finance, database, storage, etc.

Figure 3

RAID 5 is a storage solution that combines storage performance, data security, and storage costs. Take RAID 5, which consists of four hard drives, as an example, its data is stored as shown in figure 4: in the figure, Ap is the parity information of A1, A2 and A3, and so on. As can be seen from the figure, RAID5 does not back up the stored data, but stores the data and the corresponding parity information on each disk that makes up the RAID5, and the parity information and the corresponding data are stored on different disks respectively. When a disk data of RAID5 is damaged, the remaining data and corresponding parity information are used to recover the damaged data.

RAID 5 can be understood as a compromise between RAID 0 and RAID 1. RAID 5 can provide data security for the system, but the degree of protection is lower than that of Mirror and the utilization of disk space is higher than Mirror. RAID 5 has a data read speed similar to that of RAID 0, but with one more parity information, and writing data is slightly slower than writing to a single disk. At the same time, because multiple data correspond to a parity information, the disk space utilization of RAID 5 is higher than that of RAID 1, and the storage cost is relatively low.

4.Raid 10 is a combination of Raid0 and Raid1, which uses parity to mirror stripe sets, so it inherits the speed of Raid0 and the security of Raid1. We know that RAID 1 is a redundant backup array here, while RAID 0 is responsible for the read and write array of data. In fact, figure 4 is only a way of RAID 10. More often, two channels are separated from the main channel to do Striping operation, that is, to split the data, and each way is divided into two ways, doing Mirroring operation, that is, mirroring each other.

Figure 4

RAID10 is also known as mirror array stripe. Like RAID0, data is extracted across disks; like RAID1, each disk has a mirror disk, so another term for RAID 10 is RAID0 + 1. RAID10 provides 100% data redundancy and supports larger volume sizes, but the price is also relatively high. For most applications that only require redundancy without considering the price, RAID10 provides the best performance. With RAID10, you can achieve better reliability because data can still be protected even if two physical drives fail (one in each array). RAID10 requires 4 + 2 million N disk drives (N > = 0), and can only use half of them (or less, if the disk sizes are different). For example, four 250g hard drives use RAID10 arrays, and the actual capacity is 500g.

RAID Summary:

Type read and write performance security disk utilization cost application RAID0 is the best (improved due to parallelism) the worst (no security guarantee) the highest (100%) the lowest individual user RAID1 read is no different from a single disk, while the write side is the highest (providing 100% backup of data) the difference (50%) is the highest suitable for storing important data, such as servers and database storage. RAID5 read: RAID5 = RAID 0 (similar data read speed)

Write: RAID 5

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report