Various RAID levels and characteristics

RAID (Redundant Array of Inexpensive Disks)

Redundant Array of Inexpensive Disks RAID (Redundant Arrays of Independent Disks, RAID)

  • RAID features
    RAID can be through a technology (software or hardware), will be integrated into smaller disk with a larger disk devices, improved I / O capabilities, also has a data protection feature, called a data protection function is to more than copies exist on different physical disks, thus avoiding data pieces even more than single pieces of disk failure caused the loss of the problem, when the heat it needs the help of RAID levels to achieve a more feature-rich.
    Level is to organize multi-disk pieces work together, combining different levels of disks with different functions.
  • RAID implementations
    1. External Disk Array: adaptation capabilities provided by the expansion card
    2. The internal contact type RAID: RAID controller onboard
    3.Software RAID: RAID functions implemented in software
  • How to achieve the RAID:
    1. set by the BIOS prior to installing the operating system
    in this manner that the primary object of the operating system installed on the RAID
    2. performed by the BIOS or the operating system software after installation is provided
    in this manner the main purpose operating system and other dedicated partition (e.g., data disk) independent release
  • RAID level
    1.RAID0: (string banding pattern)
    requires: at least two disk
    advantages: dispersing data stored on different disks, read and write may be concurrently implemented, the highest levels of all RAID storage performance; disk utilization 100% of the available space N * min (S1, S2, ..)
    disadvantages: no fault tolerance, once one of the disks will hang all the data will destroy the

    Various RAID levels and characteristics
    2.RAID1: (Mirroring mirrored volume)
    Various RAID levels and characteristics
    Requirements: at least two disk
    advantages: disk image data used for data redundancy to ensure data security, backup for each other on the two disc, when the original data is busy, can read directly from the data mirroring;
    disadvantages: RAID level is the highest data unit cost, when one of the disks hang up, the system can switch directly to the mirror disk reader, and no recombinant failure, disk utilization % 50
    3.RAID5:
    principle: data blocks (the chunk) dispersed units stored on each drive, RAID 5 data is not backed up, but the data and corresponding parity information stored in each disk consisting of RAID5 on, and the parity information, and the corresponding data are stored on a different disk, wherein one (only one) hang time, using the remaining data and parity information data can be recovered.
    Various RAID levels and characteristics
    Various RAID levels and characteristics
    On the table A, B, which represents a different bit value, using a simple XOR operation may hang calculated data on the disk.
    Requirements: three or more hard disks and
    advantages: both read and write speed and data security, read and write performance, wherein when a disk hang, can ensure that data is not corrupted; (Note that, only a bad disk, and bad disk to be replaced)

    Disk utilization = [(n-1) / n] * 2/3

    4.RAID 1+0:
    Various RAID levels and characteristics

    Create RAID 1, RAID 0 is created on the basis of RAID

    Advantages: data security, read and write performance, fault-tolerant rate: as long as the two hard drives on a RAID 1 is not also damaged, will not affect the normal reading and writing data, data recovery quick

    Cons: Write performance than RAID 0 + 1 worse

    5.RAID 0+1
    Various RAID levels and characteristics

    Create RAID 0, RAID 1 and then created on the basis of RAID 0

    Pros: Consider the words of the performance, RAID 0 + 1 for a few more advantages, RAID 0 + 1 faster write speed, read speed and RAID 1 + 0, like,

    缺点:一旦其中一块硬盘挂掉之后,一半的硬盘无法正常工作,如果2个条带上各坏一块,整个阵列将挂掉
    6.JBOD:Just a Bunch Of Disks:不是标准的 RAID 等级,它通常用来表示一个没有控制软件提供协调控制的磁盘集合。
    功能:将多块磁盘的空间合并一个连续空间使用,sum(S1,S2,..)
    Various RAID levels and characteristics

  • RAID的具体实现方式
    1.硬件实现方式:通过BIOS参数调整来实现
    2.软件实现方式:通过软件工具mdadm来实现
    mdadm:是一个模拟化的工具
    用法: mdadm [mode] <raiddevice> [options] <component-devices>
    支持的RAID级别有:RAID-0,RAID-1,RAID-4,RAID-5,RAID-6,RAID-10
    模式<mode>:创建,装配,监控,管理
    具体操作过程所涉及的命令及相关选项:
    1.创建:
    使用mdadm命令:mdadm支持的选项有:
    -C:创建RAID,还有以下子选项:
    -n#:使用#个块设备来创建此RAID
    -l#:指明要创建的RAID的级别
    -a{yes|no}:自动创建目标RAID设备的设备文件
    -c CHUNK_SIZE:指明块大小、
    -x#:指明空闲盘的个数
    -D:显示RAID的详细信息
    mdadm -D /dev/md#:
    2.装配:
    mdadm -A:装配模式,重新识别此前实现的RAID
    3.监控模式:
    mdadm -F:监控模式
    4.管理模式:
    -f:标记指定磁盘为损坏
    -a:添加磁盘
    -r:移除磁盘
    其他管理:
    Md state observed: cat / proc / mdstat
    stop md devices: mdadm -S / dev / md #

Guess you like

Origin blog.51cto.com/14418331/2420019