What is RAID (redundant Arrays of independent disks,raid, disk array)?
The disk array is made up of many inexpensive disks, combined into a large disk group, which uses individual disks to provide data with the added effect to improve the performance of the entire disk system. Using this technique, the data is cut into many sections, which are stored on each hard drive. It is also possible to use the concept of a Parity check to read data when any hard disk in the array fails, and to reset the data to the new hard drive when the data is reconstructed.
Why use RAID technology?
because the CPU increases faster than the speed of disk space, and in order to balance the processing performance of the computer, it is necessary to use expensive large disk to balance, which is often not economical and impractical.
To meet production needs and save costs and improve stability, you might consider using RAID technology .
RAID Technology level:
RAID 0:
RAID 0 is the first RAID mode, data stripping.
Built in parallel by multiple hard drives to form a similar large disk.
The data stream is split, stored on each hard drive by law, and the I/O capability is increased, but any one of the disks is corrupted and data corruption cannot be recovered, security is 1/n
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/72/66/wKiom1XipXyyXj7HAAJtoHy1c6E525.gif "title=" Raid0.gif "alt=" Wkiom1xipxyyxj7haajtohy1c6e525.gif "/>
RAID 1:
RAID 1 enables data redundancy through disk data mirroring, resulting in data being backed up on paired independent disks. When raw data is busy, data can be read directly from the mirrored copy, so RAID 1 can improve read performance. RAID 1 is the highest unit cost in a disk array, but provides high data security and availability. When a disk fails, the system can automatically switch to read and write on the mirrored disk without having to reorganize the failed data.
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/72/66/wKiom1Xipo-iXY-YAAB18Io9w3I776.gif "title=" Raid1.gif "alt=" Wkiom1xipo-ixy-yaab18io9w3i776.gif "/>
RAID 2:
With the sea-check display
Raid 2 is a modified version of RAID 0 that encodes data into separate bits in the form of Hamming code (Hamming code), and writes the data to the hard disk separately. Because the error correction code (ecc,error Correction code) is added to the data, the overall capacity of the data is larger than the original data.
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/72/66/wKiom1XipXyyXj7HAAJtoHy1c6E525.gif "title=" Raid0.gif "alt=" Wkiom1xipxyyxj7haajtohy1c6e525.gif "/>
RAID 3:
RAID 3 is to divide the data into multiple "blocks", according to a certain fault-tolerant algorithm, stored in the n+1 hard disk, the actual data occupied by the total space of n hard disk, and the data stored on the n+1 hard disk is to verify fault-tolerant information, when one of the n+1 hard disk fails, Data from other n hard drives can also restore the original data, so that only using these n hard drives can also continue to work with injuries (such as capture and playback footage), when a new hard disk is replaced, the system can re-restore the full checksum fault-tolerant information. Because in a hard disk array, more than one hard disk at the same time the probability of failure rate is very small, so under normal circumstances, the use of RAID3, security can be guaranteed.
RAID 4:
Stand-alone disk structure with parity codes
RAID4 and RAID3 very much like, data are stored in order on multiple hard disk, parity check code stored on a separate parity disk, the only difference is that the data is divided on the RAID3 access to the data is bitwise, RAID4 is a data block unit
650) this.width=650; "Src=" http://s3.51cto.com/wyfs02/M01/72/67/wKiom1Xiqt6gWJnJAADdTL9VhI0069.jpg " Title= "Raid4.jpg" alt= "Wkiom1xiqt6gwjnjaaddtl9vhi0069.jpg"/>
RAID 5:
Isolated disk architecture for distributed parity
RAID 5 is a storage solution that combines storage performance, data security, and storage costs. RAID 5 can be understood as a compromise between RAID 0 and RAID 1. RAID 5 can provide data security for the system, but with a lower level of protection than mirror and higher disk space utilization than mirror. RAID 5 has a similar data read speed as RAID 0, with only one parity information, which is slower than writing to a single disk. At the same time, because of multiple data corresponding to a parity information, RAID 5 disk space utilization is higher than RAID 1, the storage cost is relatively low, is the use of more than a solution.
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/72/67/wKiom1XirPfD4UzLAACsrtR8yRU636.gif "title=" Raid5.gif "alt=" Wkiom1xirpfd4uzlaacsrtr8yru636.gif "/>
RAID 6:
Disk structure of two stored parity codes
RAID-6 is a RAID level that increases the checksum information from one to two bits on a RAID-5 basis.
RAID-6 and RAID-5 like to strip the logical disk and then store the data and check bits, just adding a check digit to each bit of data. This way, when using the RAID-6, there will be two hard drives to store the check bit, enhance the fault tolerance function, and inevitably reduce the actual use capacity of the hard disk. The previous RAID level generally allowed only one hard drive to break, while RAID-6 could allow two hard drives to be broken, so RAID-6 required at least 4 hard drives.
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/72/67/wKiom1XisMXRMwGPAAGJzP3jIjo763.jpg "title=" 1_ 120629202706_1.jpg "alt=" Wkiom1xismxrmwgpaagjzp3jijo763.jpg "/>
RAID 7:
The raid 7 full name is called "Optimized asynchrony for high I/O Rates as well as higher data Transfer Rates (the most optimized asynchronous hi I/O rate and high data transfer rate)", which with the previous we saw the raid level have obvious differences. RAID 7 is fully understood as an isolated storage computer with operating system and management tools, and can be run independently
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/72/67/wKiom1XisU-DkV1IAAD9SCjrXGw764.jpg "title=" Raid7.png "alt=" Wkiom1xisu-dkv1iaad9scjrxgw764.jpg "/>
RAID 10:
RAID 10 is a combination of RAID 0 and RAID1, which implements stripe set mirroring with parity, so it inherits the RAID0 's fast and RAID1 security. We know that RAID 1 is a redundant backup array here, while RAID 0 is responsible for reading and writing the data array. In fact, Figure 6 is only a raid 10 way, more cases are separated from the main channel two, do striping operation, that is, the data segmentation, and this points out each road is divided into two ways, do mirroring operation, that is, mutual mirror.
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/72/67/wKiom1XisnqC04pJAAB42ZIRnb4923.jpg "title=" Raid10.jpg "alt=" Wkiom1xisnqc04pjaab42zirnb4923.jpg "/>
implementation of software RAID on CentOS 6:
Combined with MD (multi devices) in the kernel
Mdadm: a modular tool
Syntax format for commands: mdadm [mode] <raiddevice> [options] <component-devices>
Supported RAID levels: LINEAR, RAID0, RAID1, RAID4, RAID5, RAID6, RAID10;
Mode:
Create:-C
Assembly:-A
Monitoring:-F
Management:-F,-R,-a
<raiddevice>:/dev/md#
<component-devices>: any block device
-C: Create pattern
-N #: Create this raid with # blocks of devices;
-L #: Indicates the level of RAID to be created;
-A {Yes|no}: Automatically create device files for target RAID devices;
-C Chunk_size: Indicates the block size;
-X #: Indicates the number of free disks;
For example: Create a RAID5 of 10G free space;
-D: Displays details of the raid;
Mdadm-d/dev/md#
Management mode:
-F: flag specifies that the disk is damaged;
-A: Adding disks
-R: Remove disk
Observe the status of MD:
Cat/proc/mdstat
To stop the MD device:
Mdadm-s/dev/md#
Watch Command:
-N #: Refresh interval, unit is seconds;
watch-n# ' COMMAND '
Linux System Management-(3)-raid disk array technology