CentOS RAID 7 and the disk array configuration unattended

A, RAID disk arrays Introduction

RAID is a Redundant Array of Independent Disks English abbreviation, the Chinese referred to as an independent redundant disk array. A plurality of RAID is to combine separate physical hard in different ways to form a disk group (logical drive), thereby providing a higher performance than a single disk storage data in different ways and provide backup technology called RAID disk array composed levels ( RAID levels), commonly used RAID levels are as follows: RAIDO, RAID1, RAID5, RAID6, RAID1 + 0 and so on.

Two, RAID 0 disk array

RAID 0 consecutive bits or bytes divided data, read and write to multiple disks in parallel, thus having a high data transfer rate, but it has no data redundancy, and therefore can not be considered a RAID configuration.
CentOS RAID 7 and the disk array configuration unattended
RAID 0 is simply to improve performance, and provide no guarantee for the reliability of data, and in which a disk failure will affect all the data.
CentOS RAID 7 and the disk array configuration unattended
RAID 0 can not be used in high data security requirements of the occasion.

Three, RAID 1 disk array

Data redundancy through mirroring disk data, generates data on a mutual backup pair of independent disks. When the original data is busy, data can be read directly from the mirrored copy, so RAID 1 can improve read performance.
CentOS RAID 7 and the disk array configuration unattended
RAID 1 disk array is the highest unit costs, but provides high data security and availability. When a disk fails, the system can automatically switch to the reader the mirror disk failure without data reorganization.
CentOS RAID 7 and the disk array configuration unattended

Four, RAID 5 disk array

RAID 5 disk array consists of N (N> = 3) composed of the disk array block, a data generating the N-1 band, as well as a part of check data were N parts iterative equalization data block stored on the N disks.
CentOS RAID 7 and the disk array configuration unattended
N simultaneously read and write disk blocks, high read performance, but because of problems with a checking mechanism, relatively high write performance. Disk capacity of (N-1) / N, high reliability, allowing a bad disk, does not affect any data.
CentOS RAID 7 and the disk array configuration unattended

Experimental Analysis:

1, the virtual machine to add four hard disks (each disk 20G) to identify and restart, and then open the terminal performs "fdisk / dev / sdc" command to enter the interactive mode, all in accordance with FIG disk RAID type instruction into steps.
CentOS RAID 7 and the disk array configuration unattended
2, we execute "rpm -q mdadm" command to query whether there mdadm software, no change can be performed "yum install mdadm" command to install (yum repository can refer to specific articles).
CentOS RAID 7 and the disk array configuration unattended
3, the implementation of "mdadm -C -v / dev / md5 -l5 -n3 / dev / sd [bd] 1 -x1 / dev / sde1" command to create a RAID 5 disk array and a reserved as spare.
CentOS RAID 7 and the disk array configuration unattended
4, the implementation of "cat / proc / mdstat" command to view disk synchronization process.
CentOS RAID 7 and the disk array configuration unattended
5, the implementation of "mdadm -D / dev / md5" command to view disk array information.
CentOS RAID 7 and the disk array configuration unattended
6, the implementation of "mdadm -f / dev / md5 / dev / sdb1" command to remove the disk to simulate a disk hung up.
CentOS RAID 7 and the disk array configuration unattended
7, and then perform "mdadm -D / dev / md5" command to view information for a disk array, a bad one can see that the hard disk unattended, spare automatically takes up work.
CentOS RAID 7 and the disk array configuration unattended
(These are the works demonstrate RAID 5 disk array, specifically formatted disk and mount the disk, please refer to chapter)

Five, RAID 6 disk arrays

RAID 6 arrays of N (N> 4) composed of an array of disk blocks, disk capacity of (N-2) / N. Compared with RAID 5, RAD 6 adds a second independent parity block. Two independent parity systems use different algorithms, even if two disks fail concurrently does not affect the use of the data with respect to a greater RAID 5 "write losses, poor writing performance.
The RAID. 6 and substantially the same as the above-described RAID 5 operation, the implementation of "mdadm -C -v / dev / md5 -l5 -n3 / dev / sd [bd] 1 -x1 / dev / sde1" command can be, Remember to keep spare disk, interested friends can try.
CentOS RAID 7 and the disk array configuration unattended

Six, RAID 1 + 0 RAID

After RAID 1 + 0 disk array of N (an even number, N> = 4) blocks twenty-two disk image, and then combined into a RAID 0, disk capacity N2. N / 2 blocks disc simultaneously written, N disk blocks read simultaneously, high performance, high reliability.
CentOS RAID 7 and the disk array configuration unattended

Experimental Analysis:

1, re-insert the four hard disks (each disk 20G), and made RAID type, and then perform "mdadm -C -v / dev / md01 -l1 -n2 / dev / sd [bc] 1" command to create a first mirror volume, then execute "mdadm -C -v / dev / md02 -l1 -n2 / dev / sd [de] 1" command to create a second mirror volume.
CentOS RAID 7 and the disk array configuration unattended
2, the implementation of "mdadm -C -v / dev / md10 -l0 -n2 / dev / md1 / dev / md2" mirrored volume on the basis of the command to do the composition into two mirrored disk RAID 10 array.
CentOS RAID 7 and the disk array configuration unattended
3, we execute "mdadm -D / dev / md10" command to view information about RAID 10 disk arrays, you can see the capacity of only 40G.
CentOS RAID 7 and the disk array configuration unattended
These are the contents of the RAID 5, RAID 6, RAID 10 in the enterprise use more widely.

Guess you like

Origin www.linuxidc.com/Linux/2019-08/160392.htm