Linux Disk redundancy array and linux redundancy Array
RAID can prevent physical damage to hard disks and increase the throughput of storage devices. Commonly Used RAID combinations include 0, 1, 5, and 10RAID0: requires at least two hard disks, it can effectively improve the performance and throughput of the hard disk, but without data redundancy and error repair capabilities, multiple hard disks are connected together by means of hardware or software, and become a large volume set, writing data to each Hard Disk in turn will greatly improve the performance, but if any hard disk fails, the data of the entire system will be damaged! RAID1: requires at least two hard disks, which can effectively improve the security and maintainability of data, however, the cost is high. when data is written to the hard disk, an image file is generated on another idle hard disk to maximize data reliability without affecting performance, as long as there is still a hard disk available in a pair of image disks, the data will not be lost and has good Hard Disk redundancy capabilities, but the disk utilization is only 50% RAID5: at least three hard disks are required, taking into account performance, data security and storage costs each disk uses a "parity" block to store the parity information of data on other hard disks (not data on other hard disks ), RAID10: requires at least four hard disks, both speed and security. However, the high cost inherits the high speed and security of RAID0, the combination of RAID1 and RAID0, the four hard disks form Redundant Arrays with Raid 1, and then the two RAID 1 form a read/write array with RAID 0! High cost! The mdadm command is generally used to store data that requires speed and Error Control: -a detection device name-n specify device quantity-l specify raid level-C create-v display process-f simulate Device Damage-r Remove device-a add device-Q view summary information -D view details-S stop the array [root @ dagege dev] # mdadm-Cv/dev/md0-n 5-l 10/dev/sdb/dev/sdc/dev/ sdd/dev/sde # create a RAID10 array, composed of four hard disks, allow one faulty disk in a group of RAID 1 without affecting the use of [root @ dagege dev] # mdadm-Cv/dev/md0-n 3-l 5-x 1/dev/sdb/ dev/sdc/dev/sdd/dev/sde # create a RAID5 array, three hard disks are used, and the remaining one is used as the backup disk. When one of them fails, it is automatically replaced.