RAID0 + 1 Hard Disk Array Construction diagram and the difference between RAID0 + 1 and 1 + 0

Source: Internet
Author: User

RAID0 + 1 Hard Disk Array Construction diagram and the difference between RAID0 + 1 and 1 + 0

Some people often use RAID, but they do not know it. Today I will take Internet cafes as an example.

As Internet cafes expand, the number of computers in Internet cafes also increases, and the number of Internet users increases. The speed of server hard disk data access will become a new bottleneck, many customers have begun to complain about problems such as the comparison of on-demand movies on servers and slow game upgrades. If we do not take relevant measures, it is difficult to expand the business.

So how can we solve the bottleneck of hard disk access speed? Creating a RAID array with multiple hard disks is a better solution. However, due to the lack of practical experience, many network administrators only have vague concepts about RAID technology, we will share with you the basic RAID knowledge and the most common RAID 0 + 1 instance creation.
RAID is a Redundant Array of low-cost Disks. It uses multiple physical hard disks to form a logical hard disk with functions such as acceleration, automatic backup, and data damage recovery.

To meet the needs of different working environments, RAID technology is divided into eight types for RAID 0-7. Each array has its own advantages and disadvantages. For example, the RAID 1 array emphasizes the security of disk data, the RAID 0 array improves access speed, and the RAID 5 array ensures both speed and security. Next, let's take a look at the specific characteristics of commonly used arrays.

Common RAID array types
Unknown RAID 0

A raid 0 array is a Data Stripping array. Its primary feature is that the accessed Data is split into strips and stored on each physical disk. The advantage of this processing is that it can be accessed in parallel to achieve double or multiple times of access speed. The simplest RAID 0 array provides double transmission speed with two hard disks. If the array card can support multiple hard disks to form RAID 0, then we can get N times the transmission speed (N is the number of hard disks attached to the array.
The disadvantage of this array is that data security is weak. As long as a hard disk in the array fails, all data will be lost. Therefore, in order to strike a better balance between data vulnerability and speed, RAID 0 usually only uses two hard disks in actual use, achieving double transmission speed and reducing stability by half, it is used to store VOD files, temporary files, and other data with low security requirements.
RAID 1
RAID 1 array (Data Mirror) is a Data Mirror array, which provides excellent Data security. The entire array requires at least two hard disks. When writing data, the data is backed up to another hard disk. Therefore, even if one hard disk fails and data is damaged, the file will not be lost. However, the cost is that half of the hard disks in the array are used for instant image backup. The capacity is half of the total capacity of the hard disks in the array, and the speed is not improved.
✓ RAID 0 + 1
In order to combine the fast access feature of RAID 0 with the advantages of RAID 1 data security, RAID 0 + 1 arrays were designed. This array requires at least four hard disks to be created. Two hard disks are used to access data, and the two are used to mirror data. The two hard disks used to store data are divided into parallel access bars to achieve double data access speeds, while the other two hard disks instantly create images for disks with parallel access bars, to ensure that any disk is faulty and data will not be lost.
This array is widely used in Internet cafes and small-sized enterprises because it ensures access speed and data security.
RAID 3 and RAID 5
RAID 3 and RAID 5 both adopt the data storage method of verification. The difference is that RAID 3 uses a physical hard disk to store the verification data, while the hard disk that stores data has several hard disks working in parallel at the same time. Whether the data on each hard disk is modified, the verified data hard disk will be modified at the same time, this results in a heavy workload on the verification hard disk, affecting data storage efficiency, while RAID 5 is the opposite, it divides the verification data into blocks and stores them on each hard disk to solve the bottleneck of data storage.
The RAID 5 array card is expensive, so this array is currently only used in large enterprises, and rarely used by Internet cafes.
RAID 0 + 1 practice
After learning about various RAID arrays, let's take the RAID 0 + 1 settings commonly used in Internet cafes as an example. The whole setting process is illustrated.
First, prepare four hard disks, a computer with a blank PCI card or a PCI-E slot (depending on the interface of the RAID card), a RAID card (if the motherboard has integrated the RAID card, then do not need ).
Install the RAID card to the motherboard and connect the four hard disks to the data interface of the RAID card. Turn on the computer and follow the instructions to enter the RAID settings screen. In this example, the TRAK100 array card is used and the "Tab" button is used as the setting hot key. Therefore, press the "Tab" key to go to the RAID setting screen.
After entering the RAID setting environment, press 3 and select the "Define Array" option to enter the RAID definition window.
Press Enter in the RAID definition window to Enter the RAID editing window. You can set RAID mode in the editing window. Note that, many RAID cards use the storage mode, where the "Stripe" bar storage mode is RAID 0; "Mirror" indicates RAID 1; "Mirror/Stripe" indicates the RAID0 + 1 mode. You can use the space key to switch the RAID mode. Here, select "Mirror/Stripe" mode and set the four hard disks in the channel to "Y. After setting, press Ctrl + Y to save the setting result.
Note that the RAID 0 + 1 mode cannot be set for less than four hard disks, and the "Mirror/Stripe" mode is not displayed.
After setting, you can see that the entire disk capacity has reached 80 GB, which is based on the features of RAID 0 + 1. Its capacity is twice the minimum hard disk base. Because the minimum hard disk used by the author is 40 GB, after the configuration is complete, the capacity is 40 Gb * 2, if four 80 GB hard disks are used, set the "Mirror/Stripe" mode to 2*80 GB.
Press the "Esc" button to exit the settings window. In the displayed dialog box, enter "Y" to confirm the settings and restart the system.
After the system is restarted, the RAID settings are displayed, including the working mode, total array capacity, and status. Now, you can partition, install the system, software, and perform other operations on the array. For the operating system, the entire array is equivalent to a hard disk.
If a hard disk fails, you only need to find the damaged hard disk, select 2 in the RAID definition window, and Rebuild the RAID to reconstruct the array.

When we mention RAID disk arrays, let's take a look at what RAID is? RAID is short for Redundant Arrays of Independent Disks ......

  1. What is RAID? What common tool modes does it have?

When we mention RAID disk arrays, let's take a look at what RAID is? The so-called RAID is Redundant Arrays of Indepen.

The short name of dent Disks is a cheap redundant disk array in Chinese. Proposed by the University of California, Berkeley in 1987, the original intention was to combine inexpensive small disks to replace expensive large-capacity disks, it is hoped that the damage to a single disk will not affect the continued use of other disks, making data more secure. As a low-cost Redundant Array of disks, RAID provides an independent solution for large storage devices. While increasing the disk capacity, it can also increase the speed of the hard disk to make the data more secure and easier to manage the disk.

After learning about the basic definition of RAID, let's take a look at several common RAID working modes.

  1. RAID 0

RAID 0 is the first RAID mode, that is, Data Stripping Data sharding technology. RAID 0 is the simplest form of creating a disk array. It only requires two or more hard disks. It is low in cost and can improve the performance and throughput of the entire disk. RAID 0 does not provide redundancy or error repair capabilities, which is the lowest cost.

The simplest way to implement RAID 0 is to use N hard disks in the form of hardware through a smart disk controller or

The disk driver in the operating system concatenates software to create a large volume set. In use, computer data is written to each Hard Disk in sequence. Its biggest advantage is that it can increase the capacity of the hard disk by multiple times. If three 80 GB hard disk groups are used to build the RAID 0 mode, the disk capacity will be 240 GB. The speed of each hard disk is the same. The biggest drawback is that the entire system will be damaged when any hard disk fails. The reliability is only 1/N of a single hard disk.

To solve this problem, another RAID 0 mode is created. That is, you can select a reasonable band on N hard disks to create a band set. The principle is to distribute the previously written data to all four hard disks for simultaneous read and write. Parallel operations on four hard disks increase the disk read/write speed by 4 times in the same time.

When creating a band assembly, it is very important to reasonably select the band size. If the belt area is too large, it is possible that the belt space on a disk can satisfy most of the I/O operations, so that the data read and write is still limited to only one or two hard disks, we cannot give full play to the advantages of parallel operations. On the other hand, if the bandwidth is too small, any I/O command may lead to a large number of read/write operations, occupying excessive controller bus bandwidth. Therefore, when creating a band Assembly, we should carefully select the band size based on actual application needs.

Although a zone set can evenly distribute data to all disks for read and write. However, if we connect all the hard disks to a controller, it may bring potential harm. This is because when we perform frequent read/write operations, it is easy to overload the Controller or bus load. To avoid the above problems, we recommend that you use multiple disk controllers. The best solution is to assign a dedicated disk controller to each hard disk.

Although RAID 0 can provide more space and better performance, the entire system is very unreliable and cannot be remedied if a fault occurs. Therefore, RAID 0 is generally used only when the data security requirements are not high.

  2. RAID 1

RAID 1 is called a disk image. The principle is to mirror data from one disk to another. That is to say, when data is written to one disk, an image file is generated on another idle disk, maximum limit without affecting performance

To ensure system reliability and maintainability, as long as there is at least one disk in any one of the image disks in the system, even if half of the hard disks are faulty, the system can run normally. When a hard disk fails, the system ignores the hard disk and uses the remaining image disk to read and write data, good Disk redundancy. Although this is absolutely safe for data, the cost will also increase significantly, and the disk utilization is 50%. In terms of four 80 GB hard disks, the available disk space is only 160 GB. In addition, RAID systems with hard disk faults are no longer reliable and damaged hard disks should be replaced in a timely manner. Otherwise, the entire system will crash if there are problems with the remaining image disks. After the new disk is changed, the original data will require a long time synchronization image, and the external access to the data will not be affected, but the performance of the entire system will decrease. Therefore, RAID 1 is used to store critical data.

RAID 1 mainly implements Disk Mirroring through secondary read/write, so the disk controller has a large load, especially in environments where data needs to be frequently written. To avoid performance bottlenecks, it is necessary to use multiple disk controllers.

 3. RAID0 + 1

We can see from the RAID 0 + 1 name that it is a combination of RAID 0 and RAID 1. When we use RAID 1 separately, we also encounter issues similar to RAID 0 alone. That is, we can only write data to a disk at the same time and cannot make full use of all resources. To solve this problem, we can create a zone set in the disk image. This configuration method combines the advantages of a zone set and an image, so it is called RAID 0 + 1. Combined with RAID0 and RAID1 technologies, each disk has its physical image disk, which provides full redundancy and allows one or more disks to fail, it does not affect data availability and has the ability to read/write quickly. For RAID 0 + 1, you must create at least four hard disks with a zone set in the disk image.

Since we only introduced how to set up RAID Disk Arrays for home desktops, the mainstream motherboard currently only provides these three forms, so other advanced RAID modes such as services, we will not introduce it too much here.

II. Introduction to the RAID control chip of the Motherboard chipset

Intel Southbridge chips ICH5R and ICH6R are integrated with SATA-RAID controllers, but only SATA-RAID is supported, and PATA-RAID is not supported. Intel uses bridging technology to bridge the SATA-RAID controller to the IDE controller, so you can detect SATA hard disks through BIOS and set SATA-RAID through BIOS. When connected to the SATA hard disk without RAID, is the SATA hard disk as a PATA hard disk processing, the installation of OS does not need to drive a floppy disk, In the OS Device Manager can not see the SATA-RAID controller, what we can see is the ide atapi controller, and there are two more IDE channels (which are bridging by two SATA channels ). The SATA-RAID controller is used only when two SATA hard drives are connected and used as a SATA-RAID, and a drive floppy disk is required when installing the OS, which can be seen in the Device Manager of the OS. After installing the raid opc driver of ICH5R and ICH6R, you can view the performance parameters of the RAID disk through the OPC program.

The SATA-RAID Design of VIA Southbridge chip VT8237 and VT8237R is different from that of Intel. It is to integrate a SATA-RAID controller into the 8237 Southbridge and has nothing to do with the IDE controller in the Southbridge. Of course, this SATA-RAID controller is not necessarily the native SATA mode, because the transmission speed does not reach the ideal SATA performance indicators. The BIOS is not responsible for detecting SATA hard disks, so the SATA hard disks cannot be seen in the BIOS. SATA hard drive detection and RAID settings need to pass through the SATA-RAID controller own BootROM (also known as SATA-RAID controller BIOS ). Therefore, after the BIOS self-check, a BootROM detection SATA hard drive will be started. After detecting the SATA hard drive, the hard drive information will be displayed. Press the shortcut key Tab to enter BootROM to set SATA-RAID. Use a SATA hard disk on the motherboard of the South Bridge of VT8237 VIA, regardless of whether or not a RAID installation OS requires a drive floppy disk, you can see the SATA-RAID controller in the OS Device Manager. The VIA chip is just integrated with the SATA-RAID controller.

NVIDIA's nForce2/nforc4/ nForce4 chipset's SATA/IDE/RAID Processing Methods combine Intel and. The first is to bridge the SATA/IDE/RAID Controller together. If no RAID is performed, XP/2000 installation does not require any driver. The second is that the SATA hard disk in BIOS does not need to be set as Intel does. You can detect the SATA hard disk BIOS. Third, not only SATA hard disks can form RAID, but also PATA hard disks can form RAID. PATA hard disks and SATA hard disks can also form RAID. This greatly facilitates RAID users. Intel's ICH5R, ICH6R, and VIA VT8237 do not support the pata ide raid.

  Iii. Brief Introduction to NVIDIA chipset BIOS settings and RAID settings

The configuration options for SATA and RAID in the BIOS of the nForce series chipset are both in the Integrated Perip

In the herals menu.

SATA settings: Serial-ATA. The values include [Enabled] and [Disabled]. This is used to enable or disable the onboard Serial-ATA controller. To use a SATA hard drive, you must set this option to [Enabled]. If you do not use a SATA hard disk, you can set this option to [Disabled] to reduce the amount of resources that are interrupted.

The RAID configuration item is in the Integrated Peripherals/Onboard Device menu, move the cursor to the Onboard Device, and press to enter the sub menu, for example, RAID Config is the RAID configuration option, and move the cursor to the RAID Config, click to go to the RAID configuration menu:

The first ide raid is to determine whether to set RAID. The value is [Enabled] and [Disabled]. If RAID is not performed, keep the default value [Disabled]. The following options are unavailable.

If you select [Enabled] For RAID, the following options are yellow. There are four IDE (PATA) channels under ide raid, and the SATA Channel below. The nForce2 chipset has two SATA channels, and the nfore3/4 chipset has four SATA channels. You can set the channel to [Enabled] based on your intention to use the hard disk of the channel to perform RAID.

After the settings are complete, you can exit and save the BIOS settings and restart. It should be noted that after you set RAID, the channel will be managed by the RAID Controller, and the RAID hard disk cannot be seen in the BIOS StandardCMOS Features.

After the BIOS is set, only the hard disks of those channels are specified for RAID, and the RAID is not completed. As mentioned above, the RAID disk is managed by the RAID Controller, therefore, the raid bios of the RAID controller must detect the hard disk and set the RAID mode. After the BIOS starts self-check, the raid bios starts to detect the RAID hard disk. The detection process is displayed on the monitor. After detecting the hard disk, it is left for several seconds, this allows you to press F 1 0 to enter raid bios Setup.

The nForce chipset provides four RAID (redundant disk array) modes:

RAID 0: hard disk serial column solution, improving the speed of hard disk read/write.

RAID 1: image data technology.

RAID 0 + 1: A technology composed of RAID 0 and RAID 1 arrays.

Common RAID methods include the following:

RAID 1

Are you worried that your hard disk will be damaged, causing you to forget that all the data backed up will be lost? RAID 1 helps you solve the problem. RAID 1 requires at least two hard disks of the same capacity. These two hard disks are mirrored to each other. If any of the hard disks is damaged, you have another full backup-two hard disks are more likely to be damaged at the same time than one hard disk. Of course, RAID 1 cannot protect normal data on your hard disk from virus infection or other threats. RAID 1 can only prolong the average Failure interval (MTBF, Mean Time Between Failure) of storage devices ). If the disk is damaged, you only need to replace the damaged disk with a new disk, and the RAID Controller restores the Image array.

IDC/Platform + platform/b7dv + platform/yb +/0NSho9K7uPZzdHJpcGVkwt + 8rcf9tq/Platform + dPQyv2 + platform = "center">

Although the striping mode does not have redundancy, it maximizes the storage capacity of the physical drive of the entire disk array. Because logical drives in RAID 0 arrangement cover each physical drive, the total storage capacity of the disk array is the sum of the storage capacity of the physical drive.

RAID 1 + 0/0 + 1

RAID 1 + 0/0 + 1-RAID 1 + 0 and 0 + 1 modes are similar, they try to achieve better performance and redundancy at the same time, that is, the length of the RAID 0 and RAID 1 disk arrays. However, RAID 1 + 0 differs from RAID 0 + 1 in image processing and redundancy. RAID 1 + 0 uses two hard disks to form a RAID 1 array, and then combines the two arrays in RAID 0 mode. RAID 0 + 1 is the opposite.

Both RAID 1 + 0 mode and 0 + 1 mode provide the same storage capability. Whether RAID 1 + 0 or 0 + 1, the total storage capacity is half the total storage capacity of all hard disks in the array. Likewise, logical disks in their respective combinations are mirrored copies. Therefore, only half of the total storage capacity of all hard disks is available.

RAID 1 + 0 and 0 + 1 disk arrays have the same storage capacity, and they all have full redundancy to prevent one of the independent hard disk faults, however, once one of the hard disks fails, the redundancy capabilities of the two modes become different: For RAID 0 + 1 disk arrays, if the RAID 0 mode of the faulty hard disk is another hard disk failure, of course, this disk image has no impact, but if it appears on another RAID 0 array, the entire disk array crashes. In RAID 1 + 0 mode, if both hard disks in a RAID 1 array fail, the entire disk array will crash. Therefore, as long as there is a hard disk failure, it is best to replace the two modes as soon as possible.

RAID 5

RAID 5 uses distributed parity to verify redundant data instead of using images. In the RAID 0 array, data is scattered on each hard disk in the array, while in the RAID 5 array, the parity data is also sorted. The indexes of these parity data are distributed across each hard disk in the array. Maintaining the indexes of these parity test data slows down the performance of the RAID 5 array, but gives it a level of redundancy not available for the striped RAID 0 array. If one hard disk fails, the RAID 5 disk array can use data from other physical drives, parity check data, and some simple binary mathematical algorithms to restore the disk.

The storage capacity of the RAID 5 disk array depends on the number of hard disks in the array. The size of each physical hard disk in the RAID 5 array must be the same. The larger the number of physical hard disks in the RAID 5 disk array, the lower the total storage capacity, which is obvious because of the parity check data index. We used four hard disks to form a RAID 5 disk array for comparative testing. Therefore, the total capacity of this array is the sum of the capacity of the three hard disks. (Put it simply: the effective capacity of RAID 5 mode is the capacity of the smallest hard disk in the array multiplied by the number of hard disks in the array minus one, here, the number of hard disks minus one because one of them is used to store verification information .)

Finally, the RAID 0 array provides the highest performance and the most effective available capacity, but it reduces data reliability, this may make it better if you use multiple hard disks to form your RAID 0 array but use one hard disk separately. The RAID 1 array can provide redundancy through images, but it cannot provide any performance advantages of expansion, because the image will occupy half of the total disk capacity in your array.

Differences between raid 0 + 1 and raid 1 + 0

The commonly used raid 10 is actually 1 + 0 rather than 0 + 1. It seems that simplicity is just a matter of order. Actually, it is very different.

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.

Differences between RAID 10 and RAID 0 + 1

RAID 10 and RAID 0 + 1 are two completely different implementation and setting methods.

Here are two examples: two disks in a single disk array and three disks.

(1) Two Disks in a single disk array

RAID 10 (first 0, then 1)

A
----]-RAID0 (array 1)
B
---------------------]-RAID 1 (array final)
C
----]-RAID0 (array 2)
D


RAID 0 + 1 (first 1, then 0)

A
---]-RAID1 (array 1)
B
--------------------]-RAID 0 (array final)
C
---]-RAID1 (array 2)
D


Does it look similar? Well, don't draw a conclusion immediately to see how the above three disks will change.

(2) 3 disks in a single disk array

RAID10

A

B -------]-RAID0

C
------------------]-RAID 1
E

F -------]-RAID0

G


RAID0 + 1 because RAID 1 is an image and requires only two hard disks. Therefore, when a single disk array contains more than two disks, it cannot implement RAID0 + 1.


========================================================== ========

The specific configuration differences are described above.

In practical applications, RAID10 is a basic method to ensure data reliability with high-speed access.

For example, some files are frequently accessed on the school's FTP server, but these files are required to be secure and reliable. Therefore, RAID10 is an ideal choice.

For example, a small key department, such as the Finance Department, needs to store some important information to provide other departments of the company, within a certain period of time (such as one hour before the end of work, for example, the settlement time of every Friday morning, instead of in all time periods) is relatively large, so to ensure data reliability, use RAID0 + 1 to slightly improve the access performance.


From this we can see that these two methods are completely different, and the application objects and occasions are also completely different.

Once again, if you really want to design and implement enterprise applications, you should, like competent doctors, carefully identify different characteristics of the business and develop solutions for such businesses, rather than simply generalize RAID5, this is an irresponsible attitude towards users.

According to my feedback, for enterprises that adopt fine-tuned IT systems, the probability of problems in the long operation process in the future is much smaller than that of enterprises that are deployed randomly, in particular, some basic systems, such as mail, web, and database.

Linux is especially suitable for enterprise applications because of its stable and highly open features. However, it must be carefully designed and adjusted. Otherwise, it will be applied to the Enterprise, the effect is not as good as that of the Microsoft platform, and may even be completely erased by its stable and highly open features, making it a failure in the enterprise architecture of the IT system.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.