RAID 0+1 hard disk array build plots and the difference between raid 0+1 and 1+0

Source: Internet
Author: User

Often someone communications raid, but it does not know its so dye, today I will be an example of Internet cafes to explain.

With the expansion of Internet cafes, internet cafes will increase the number of computers, Internet users also increased, the speed of data access to the server will become a new bottleneck, many customers began to complain about the server on-demand film comparison card, game upgrade slow and other issues, if not to take relevant measures, Then the business will be destroyed by the difficulty of expansion.

so how to solve the bottleneck of hard disk access speed? Building a RAID array with multiple hard disks will be a better solution. However, many network management due to lack of practical experience, the raid technology only vague concept, so the small series specially written this article, with everyone to share the raid basic knowledge and the most commonly used raid 0+1 build instance.
RAID English is all called Redundant array of inexpensive Disks, which is translated into a redundant array of inexpensive disks. In essence, it uses multiple physical hard disks to form a logical hard disk with acceleration, automatic backup, data corruption recovery and other functions.

To meet the needs of different working environments, RAID technology is divided into the following RAID 0-7 Count 8. Each array has its own advantages and disadvantages, such as a RAID 1 array that emphasizes the security of the data on the disk, the RAID 0 array improves access, the RAID 5 array is both fast and secure, and so on. Here's a look at the specific features of common arrays.


Common RAID Array types
raid 0

The RAID 0 Array (data stripping) is a striped array, the main feature of which is that the data being accessed is divided into strips (stripped) distributed on each physical disk. The advantage of this approach is that it can be accessed in parallel, resulting in double or multiple access speeds. One of the simplest RAID 0 arrays, using two hard drives to provide double transfer speed, if the array card can support more than one hard disk to compose RAID 0, then you can get n times (n is the number of hard drives joined to the array) transfer speed.
The disadvantage of this array is that data security is fragile, as long as one of the drives in the array fails, all the data will be lost. Thus, in order to achieve a good balance between data fragility and speed, the actual use of RAID 0 usually only use two hard drives, to achieve double transmission speed and stability decreased by half, for storing video-on-demand files, temporary files and other security requirements of the data is not high.
raid 1
The RAID 1 array, the data Mirror, is the primary feature that provides superior data security. The entire array requires at least two hard drives to be assembled, and when the data is written back to another hard disk, the file is not lost even if one of the hard drives fails and the data becomes corrupted. But the cost is that half of the hard drives in the array are used for instant mirror backups, with a capacity of half the total capacity of the array's internal drives, with no increase in speed.
raid 0+1
To combine the fast Access features of RAID 0 with the benefits of RAID 1 data security, a raid 0+1 array has been designed. This array requires a minimum of 4 hard disks to create. Two of these drives are used to access data, and two hard drives are used to mirror data. For storing data two hard drives are divided into strips of parallel access, which gives you twice the speed of data access, while the other two drives instantly mirror the hard disk of a strip parallel access to ensure that any disk fails and does not result in data loss.
This array is widely used in internet cafes and small businesses due to the security of access and data.
raid 3 and RAID 5
RAID 3 and RAID 5 are used to verify the data storage, the difference is that RAID 3 uses a physical hard disk dedicated to store the checksum data, and the hard disk that holds the data has several hard disk parallel work, regardless of the data of each hard drive is modified, the data of the verification of the hard disk will be changed at the same time, This results in checking the hard disk workload overload, affecting the storage efficiency of the data, and RAID 5 just the opposite, it is the verification data into pieces stored on each hard disk so that can solve the bottleneck of verifying data storage.
Because of the high price of the RAID 5 array card, the array is currently used only in large enterprises and is rarely used by internet cafes.
RAID 0+1 Combat
After understanding the various RAID arrays, the following is an example of the setup of Raid 0+1 commonly used in internet cafes, illustrating the entire setup process.
Start by preparing four hard drives, a computer with a blank PCI card or PCI-E slot (depending on the interface of the raid card), a RAID card (if the motherboard is already integrated with the RAID card is not required).
Install the RAID card to the motherboard and connect the four drives to the data interface of the RAID card. Turn on your computer and enter the RAID settings screen according to the instructions. The TRAK100 array card used in this example uses the "tab" key to set the hotkey, so press the "tab" key to enter the raid settings screen.
After entering the RAID setup environment, press the 3 key to select the "Define Array" option and enter the RAID definition window.
In the RAID definition window Press "Enter" button to enter the Raid editing window, in the editing window can set the mode of RAID, it is important to note that many RAID cards for the user-provided mode is used in the storage mode expression, wherein "Stripe" Bar storage is RAID 0 mode; " Mirror "represents RAID 1, while" Mirror/stripe "represents the raid0+1 mode. The user can switch the RAID mode using the SPACEBAR, select "Mirror/stripe" mode, and set the four drive in the channel to "Y" status. After setting is complete, press "Ctrl+y" to save the result of the setting.
It is important to note that the RAID 0+1 mode cannot be set using less than 4 drives and the "Mirror/stripe" selection mode does not occur.
After the setup is complete, you can see that the entire capacity of the hard disk reaches 80G, which is based on the features of the raid 0+1. Its capacity is the minimum hard disk base twice times, because the author uses the smallest of the hard disk is 40G, so after the setup is completed, the capacity is 40g*2, if you are using 4 80G hard disk, then the result of setting "Mirror/stripe" mode should be 2*80g.
Press the "ESC" button to exit the Setup window, enter "Y" in the pop-up dialog to determine the setting, and reboot the system.
After rebooting the system, the result of the raid is displayed, which includes the operating mode, the total capacity of the array, and the status. At this point, users can partition, install systems, software, and other operations on the array. For an operating system, an entire array is equivalent to a hard disk.
If a hard drive fails, you only need to find the damaged hard drive, and then select 2,rebuild raid in the raid definition window to rebuild the array.

Now that the RAID disk array is mentioned, let's start by knowing what raid is. The so-called raid, is redundant Arrays of independent disks abbreviation ...

  First, what is RAID? What are the common tool patterns?

now that the RAID disk array is mentioned, let's take a look at what raid is. So-called raid, is redundant Arrays of Indepen

Dent disks Short, Chinese is a cheap redundant disk array. Proposed by the University of California, Berkeley, in 1987, the idea was to combine inexpensive, multiple small disks to replace expensive high-capacity disks, hoping that a single disk would be damaged without affecting the continued use of other disks, making the data more secure. RAID is an inexpensive, redundant array of disks that provides a single, large-scale storage device solution. While increasing the capacity of the hard disk, it can also fully improve the speed of the hard disk, make the data more secure and easier to manage the disk.

After understanding the RAID basic definition, let's look at several common operating modes of RAID.

  1. RAID 0

RAID 0 is the first RAID mode that occurs Data Stripping Data sub-strip technology. RAID 0 is the simplest form of a disk array, requiring more than 2 hard drives and low cost to improve performance and throughput across the entire disk. RAID 0 does not provide redundancy or error-repair capability, and is the lowest implementation cost.

The simplest way to implement RAID 0 is to use the same hard drive as hardware in the form of a smart disk controller or

  Operating System the disk drivers in the software are concatenated together to create a large volume set. In the use of computer data is written to each block of hard disk, its greatest advantage is that it can be multiplied to increase the capacity of the hard disk. If you use threeGB of hard disk set to build RAID 0 mode, then the disk capacity will be 240GB. In terms of speed, the speed of each individual piece of hard disk is exactly the same. The biggest drawback is that any piece of hard disk failure, the entire system will be destroyed, reliability is only a single piece of hard disk 1/n.

To solve this problem, another mode of RAID 0 was created. That is, select a reasonable band on n hard drives to create a stripe set. The principle is that the previously written data is distributed across all four drives and read and write. The parallel operation of the four drives increases the speed of disk reads and writes by 4 times times over the same time.

when creating a stripe set, it is important to choose the size of the band appropriately. If the band is too large, it is possible that the band space on a disk can satisfy most of the I/O operations, so that the reading and writing of the data is still limited to one or two hard disks, and the advantages of parallel operation cannot be fully played out. On the other hand, if the band is too small, any I/O instructions can cause a lot of read and write operations, consuming too much controller bus bandwidth. Therefore, when creating a stripe set, we should carefully select the size of the band based on the needs of the actual application.

Stripe set Although the data can be evenly distributed to all the disk to read and write. But if we connect all the hard drives to a single controller, it can be potentially harmful. This is because when we read and write frequently, it is easy to overload the load on the controller or bus. To avoid these problems, it is recommended that you use more than one disk controller. The best solution is to have a dedicated disk controller for each drive.

While RAID 0 can provide more space and better performance, the entire system is very unreliable and cannot be remedied in the event of a failure. Therefore, RAID 0 is generally only used in situations where data security requirements are not high.

  2. RAID 1

RAID 1 is called disk mirroring, and the principle is to mirror the data on one disk to another, which means that the data is written to a disk while the image is generated on another idle disk, without compromising performance.

Degree of guarantee system reliability and repairable, as long as the system in any pair of mirror disk can be used, or even in half a number of hard disk problems when the system can operate normally, when a hard disk fails, the system will ignore the hard disk, and then use the remaining mirror disk to read and write data, Good disk redundancy capability. While this is absolutely safe for the data, the cost is significantly increased, with a disk utilization of 50% and a disk space of only 160GB for four 80GB capacity drives. In addition, the hard disk failure of the RAID system is no longer reliable, should promptly replace the damaged hard disk, or the remaining mirror disk also has problems, then the entire system will crash. The original data will take a long time to synchronize the image after the replacement of the new disk, the external data access will not be affected, but the performance of the entire system has declined. As a result, RAID 1 is used in situations where critical critical data is stored.

RAID 1 mainly uses two reads and writes to implement disk mirroring, so the load on the disk controller is significant, especially in environments where data is frequently written. To avoid performance bottlenecks , it is necessary to use multiple disk controllers.

 3, Raid0+1

From the raid 0+1 name we can see that RAID0 and RAID1 are the combination of the body. When we use RAID 1 alone, the problem is similar to using RAID 0 alone, that is, you can write data to only one disk at a time and not make full use of all resources. To solve this problem, we can create a stripe set in disk mirroring. Because this configuration combines the benefits of stripe set and mirroring, it is called raid 0+1. Combining RAID0 and RAID1 technology, data is distributed across multiple disks, each with its physical mirror disk, providing full redundancy, allowing one of the following disk failures without compromising data availability and having fast read/write capability. Raid0+1 to establish a stripe set of at least 4 hard disks in disk mirroring.

Since we are only introducing how the RAID disk array function is set up in the home desktop, the main motherboard is only providing these three build modes, so other advanced raid modes, such as services, we will not introduce too much.

Second, motherboard chipset RAID control chip introduction

Intel South Bridge chip ICH5R, ICH6R integrated Sata-raid controller, but only support Sata-raid, does not support Pata-raid. Intel uses bridging technology to bridge the Sata-raid controller to ide Controller, so you can pass bios detects the SATA hard drive and sets the Sata-raid through the BIOS. When connecting a SATA hard drive without raid, the SATA hard drive is treated as a PATA hard drive, the OS is not required to drive the floppy disk, in the OS Device Manager can not see the Sata-raid controller, see the IDE ATAPI controller, and two more IDE channels ( Bridged by two SATA channels). Only use the Sata-raid controller when connecting two SATA hard drives, and when installing the OS, you need to drive the floppy disk, and you can see the Sata-raid controller in the OS Device Manager. \ sata-raid After installing ICH5R, ICH6R's Raid IAA driver, you can view the performance parameters of the raid disk through the IAA program.

The Sata-raid design of the Via South Bridge Chip VT8237, vt8237r, differs from Intel in that it integrates a Sata-raid controller into the 8237 South Bridge, which is not related to the IDE controller in the South Bridge. Of course, this Sata-raid controller is not necessarily the original SATA mode, because the transmission speed is not the ideal SATA performance indicators. The BIOS is not responsible for detecting SATA drives, so SATA hard drives are not visible in the BIOS. The SATA hard drive detection and RAID settings need to be bootrom via the Sata-raid controller (also known as the Sata-raid Controller's BIOS). So after the BIOS self-test will start a bootrom detection SATA hard drive, after detecting the SATA hard drive to display the hard disk information, press the shortcut key tab to enter the Bootrom settings sata-raid. Using a SATA hard drive on the motherboard of Via's VT8237 South Bridge, the Sata-raid controller can be seen in the OS Device Manager, regardless of whether the raid installation OS requires a floppy drive. Via's chip is also just integrated with the Sata-raid controller.

The sata/ide/raid processing of Nvidia's NFORCE2/NFORCE3/NFORCE4 chipset is a combination of Intel and via's benefits. The first is to bridge the Sata/ide/raid controller together, without a raid, the installation of xp/2000 does not require any driver. The second is that the SATA HDD in the BIOS does not require special settings like Intel, which can be detected by the SATA hard drive BIOS. The third is not only the SATA hard disk can be composed of raid,pata hard disk can also be composed of raid,pata hard disk and SATA hard disk can also compose raid. This brings great convenience to users who need RAID, and Intel's ich5r, Ich6r,via VT8237 do not support PATA IDE RAID.

  Three, the Nvidia chipset BIOS settings and RAID settings simple introduction

There are two options for SATA and RAID settings in the BIOS of the NForce series chipsets, both in integrated Perip

Herals (consolidated perimeter) menu.

SATA Setup Entry: serial- ATA , the setting value is [Enabled], [Disabled]. The purpose of this is to turn on or off the onboard Serial-ata controller. This entry must be set to [Enabled] using the SATA hard drive. If you do not use a SATA hard drive, you can set this to [Disabled], which reduces the amount of interrupt resources that are consumed.

RAID settings in the integrated Peripherals/onboard device (onboard device) menu, move the cursor to Onboard device, press ENTER as submenu: RAID config is the RAID configuration option, the cursor moves to raid Config, press on to enter such as RAID configuration menu:

The first IDE RAID is to determine if RAID is set, and the setting value is [Enabled], [Disabled]. If you do not raid, the default value [Disabled] is maintained, and the following options are grayed out.

If you select [Enabled] for RAID, then the options below will be yellow to set. IDE RAID Below is a 4 IDE (PATA) channel, and the following is the SATA channel. The NFORCE2 chipset is a 2 SATA channel, and the NFORCE3/4 chipset is a 4 SATA channel. You can set the channel's hard disk to be used for raid based on your own intentions, setting that tunnel to [Enabled].

Setup is complete to exit Save BIOS settings and reboot. The point here is that when you set up a raid, the channel is managed by the RAID controller, and the BIOSstandardCMOS features does not see the hard disk that does the raid.

After the BIOS setup, just specify those channels of the hard drive for raid, and do not complete the raid build, the previous said RAID disk is managed by the RAID controller, so the RAID controller is to detect the hard disk, and set the RAID mode. After the BIOS starts the self-test, the raid BIOS initiates detection of the hard disk that makes the raid, the detection process is displayed on the monitor, the hard drive is detected and left to the user for a few seconds so that the user presses F 1 0 into the raid BIOS Setup.

There are four modes of RAID (redundant disk array) provided by the nforce chipset:

RAID 0: Drive string scheme to improve the speed of hard disk read and write.

RAID 1: Technology for mirroring data.

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

The following types of RAID are common:

RAID 1

is not worried about your HDD will be corrupted and all the data that you have painstakingly forgotten to backup will be lost? RAID 1 can help you solve the problem. RAID 1 requires at least two hard drives of the same capacity, both of which mirror each other, if any of the hard drives are damaged, you have another full backup-two hard drives are less likely to be damaged than a single drive. Of course, RAID 1 does not protect the normal data on your hard drive from viruses or other threats, and RAID 1 can only prolong the average downtime of the storage device (Mtbf,mean time between Failure). If the hard drive is damaged, simply replace the damaged platter with a new one, and the raid control card will restore the mirrored array.

Despite the fact that RAID 1 uses two physical hard disks, Operating System but only one logical hard drive can be distinguished. Because the data on one disk is duplicated on another disk, a dual-drive RAID 1 disk array has the ability to store only one single platter.

RAID 0

The RAID 0 controller divides the data into small chunks and then writes them to each hard disk in the disk array in parallel, with no redundancy in the storage space in the disk array. Data blocks are written in parallel to each hard disk in the array, which improves performance but greatly reduces reliability. A striped logic driver If any of the physical hard disks in the array are damaged, the system cannot be recovered. For example, you have a dual hard drive that consists of a RAID 0 disk array, and your mean time between failures (MTBF) is reduced to half. Failure of any one of the disks in a RAID 0 disk array will destroy the entire disk array system and cause all data on the logical hard drive to be lost.

Although there is no redundancy in the striping mode, it maximizes the storage capacity of the physical drives of the entire disk array at least. Because the logical drives arranged in RAID 0 cover each physical drive, the total storage capacity of the disk array is the sum of the storage capabilities of the physical drives.

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 combination of RAID 0 and RAID 12 disk array length. However, RAID 1+0 and 0+1 are different in handling mirroring and redundancy. Raid 1+0 is a RAID 1 array that consists of two hard drives, and then combines the two arrays in RAID 0 mode, while RAID 0+1 is just the opposite.

Both the raid 1+0 mode and the 0+1 mode have the same storage capability. Whether it's raid 1+0 or 0+1, its total storage capacity is half the sum of the storage capacity of all the drives in the array. It is also a mirrored copy of the logical disk in the respective combination, so that only half of the total storage capacity of all drives is available.

RAID 1+0 and 0+1 disk arrays have the same storage capabilities, while they are fully redundant to prevent one single hard drive failure, but once one of these drives fails, the redundancy of the two modes becomes different: for RAID 0+1 disk arrays, If another hard drive failure in the RAID 0 mode where the failed hard drive is located, of course, has no effect on this disk image, but if it appears on another RAID 0 array, the entire disk array crashes, and for RAID 1+0 mode, if two hard drives in a RAID 1 array fail, Then the entire array of disks will crash. Therefore, for both modes, as long as there is a hard drive failure, it is best to replace as soon as possible.

RAID 5

RAID 5 does not take advantage of mirroring but uses distributed parity redundancy data. In a RAID 0 array, the data is scattered across every hard drive in the array, and the parity data is ordered in the RAID 5 array. The indexes of these parity data are cross-distributed across every hard disk in the array. Maintaining the index of these parity data causes the performance of the RAID 5 array to slow down, but gives it a redundancy level that striped the raid 0 array does not have. If one hard drive fails, the RAID 5 disk array can be recovered using data from other physical drives, parity-check data, and some simple two-element math algorithms.

The storage capacity of a RAID 5 disk array depends on the number of hard drives in the array. The parity calibration Data index requires a consistent capacity size for each physical hard disk in a RAID 5 array. The more physical hard disks you have in a RAID 5 disk array, the lower the total storage capacity, which is obvious because of the parity calibration data index. We used four hard drives to form a RAID 5 disk array for a controlled trial, so the total capacity of this array is the sum of the capacity of the three drives. (Better put it on: the effective capacity of RAID 5 mode is the smallest capacity in the array, the number of hard drives in the battle column minus one, and the number of hard drives here is subtracted because one of the hard drives is used to hold the checksum information.) )

Finally, the RAID 0 array provides the highest performance and the most efficient available capacity, but it reduces data reliability, which may make it better to use a single hard drive when you are using multiple hard disks to compose your RAID 0 array. A RAID 1 array can provide redundancy through mirroring, but it does not provide any extended performance benefits, because mirroring will take up half of the total capacity of the hard disk in your array.

The difference between raid 0+1 and 1+0

The RAID10 we use now is actually 1+0 rather than 0+1, which seems to be simply a matter of order. In fact, it is very different for the application.

RAID 0+1-using 4 drives, pairs is 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, and all, are 1 stipe. At the this point, if one drive fails, you is in trouble. To recover, the offending are removed, and the entire stipe needs to be Resync ' d.

RAID 1+0-using 4 Drives, pairs is mirrored, and the results is used to create a single stripe. In this configuration, when one of the drives fails, it is only breaks one mirror, without affecting the stripe ... at this PO int, only in the stipe is mirrored ... but if a 2nd drive failure were to occur, it had a 2-in-3 chance of occuring on The last mirror ... if it does, you are still OK. To recover, the offending are removed, and only the mirror of the "The stripe needs to be Resync ' d."

The difference between RAID 10 and RAID 0+1

RAID 10 and raid0+1 are two completely different implementations and Setup methods

Now for two examples, the case of a single disk array of 2 disks and 3disk

(i) A single disk array 2 pieces of disk

RAID 10 (0 first, then 1)

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


RAID 0+1 (1 First, then 0)

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


Does it look the same? Hehe, do not jump to conclusions, see what will change in the three-piece plate

(ii) Single disk array 3 disk

RAID10

A

B-------]-RAID0

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

F-------]-RAID0

G


Raid0+1 because is to do 1 first, then make 0, because RAID 1 is a mirror, need and only two hard drives, so, in a single disk array is more than 2 pieces of the case, is not achieve raid0+1


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

It says the exact configuration difference.

In practical applications, RAID10 is a means of pursuing the basic reliability of data in a high-speed access situation.

For example, in the school's FTP server, some files are frequently accessed, but require these files themselves have a certain security and reliability, so, RAID10 is the ideal choice.

Another example, in the Finance Department and other small key departments, need to store some of the more important information to provide other departments of the enterprise, in a certain period of time (such as one hours before work, such as settlement time, such as every Friday morning settlement time, rather than in all the time period) more access, So in the case of ensuring data reliability, take a raid0+1 way to slightly improve access performance.


As a result, the two approaches are completely different, and the objects and situations used are completely dissimilar.

Here again, if you really want to design and implement enterprise applications, it should be like a competent doctor, by carefully screening the different characteristics of the business, to formulate a solution for this business, and can not casually take out the RAID5 generalize, this is the user's irresponsible work attitude.

According to my feedback, for enterprises with fine-tuned IT systems, the probability of problems occurring in the long run is much smaller than those of sloppy deployment, especially some basic systems, such as mail,web,database.

Linux because of its stable and highly open characteristics, particularly suitable for enterprise applications, but the premise is the fine design and adjustment, otherwise, it is applied to the enterprise, the effect is not seen better than the Microsoft platform, and even may completely erase its stable and highly open features, become enterprise architecture IT system failure.

RAID 0+1 hard disk array build plots and the difference between raid 0+1 and 1+0

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.