RAID levels vary widely

1. Introduction to RAID disk array

  • Redundant Array of Independent Disks (RAID, Redundant Array of Independent Disks), formerly known as Redundant Array of Inexpensive Disks
  • (Redundant Array of Inexpensive Disks), referred to as disk array. Using virtualization storage technology to combine multiple physical hard disks in different ways to form a silver = hard disk group (logical hard disk), thus providing higher storage performance than a single hard disk and providing data backup technology.
  • The different ways to form a disk array are called RAID levels. The RAID level is different, and the data will be scattered on each hard disk in various modes. The name of the RAID level will start with RAID and have a number. Each level has its theoretical advantages and disadvantages. Different levels achieve a balance between the two goals. They are to increase data reliability and increase the read and write performance of the memory group.

Commonly used RAID levels:

  • RAID0, RAID1, RAID5, RAID6, RAID1+0 and other
    RAID technologies mainly have the following three basic functions :
  • By striping the data on the disk, the data can be accessed in blocks, the mechanical seek time of the disk space can be reduced, and the data access speed can be improved.
  • By reading several disks in an array at the same time, the mechanical seek time of the disk is reduced, and the data access speed is improved.
  • By mirroring or storing the verification information of the adventure, the redundant RAID implementation of the data is realized.
  • External disk array: provide adaptation capabilities through expansion cards
  • Built-in RAID: The motherboard integrates a RAID controller, and it is configured separately in the BIOS before installing the OS.
  • Software RAID: realized by OS, such as Synology NAS

2. Detailed explanation of RAID levels

2.1 RAID-0 (five redundant data stripes)

  • RAID-0 is a new logical disk composed of N hard disks in parallel.
  • RAID-0 continuously divides data in units of bits or bytes, reads and writes in parallel with multiple disks, so it has a high data transfer rate, but it has no data redundancy
  • The read and write performance of RAID-0 is theoretically N times that of a single disk.
  • RAID-0 only improves performance alone, and does not guarantee data reliability, and the failure of one of the disks will affect all data
  • RAID-0 cannot be used in occasions that require high data security performance, and is generally not used in actual work.
    insert image description here

2.2RAID-1 (mutual mirroring without parity)

  • RAID-1 is a group of mirror images composed of N (even number) hard disks.
  • Realize data redundancy through disk data mirroring, and generate mutual backup data on paired independent disks
  • When the original data is busy, the data can be read directly from the mirror, so RAID-1 can improve the read performance. slow write performance
  • When RAID-1 is the availability of data security with the highest unit cost in the disk array. When one of the disks fails, the system can automatically switch to the mirror disk for reading and writing, without the need to reorganize the failed data
  • Available capacity: N/2 (N is the number of hard disks)
  • The actual space utilization rate is only 50%, and two disks are used as one. This is a relatively expensive DJ solution. It is generally not used in actual work
    insert image description here
    Note:
    RAID can prevent physical damage, but if it is damaged artificially, such as deleting the A1 data on one side, the A1 on the other side will also be deleted. So just to be on the safe side, make another backup.
    think:
  • A RAID1 consisting of 2 hard disks, one with a capacity of 2T and the other with a capacity of 1T, what is the usable capacity of the RAID?
  • The available capacity is 1T. Calculated by the minimum hard disk capacity

2.3RAID-5 (data stripe with distributed parity)

  • N (N>3) disks form an array, one piece of data generates N-1 stripes, and there is also one piece of verification data, and a total of N pieces of data are circularly and balancedly stored on N disks
  • N disks can be read and written at the same time, and the read performance is very high, but due to the problem of the verification mechanism, the write performance is relatively low
  • High reliability, one disk is allowed to fail without affecting all data
    Available capacity: N-1. Disk utilization (N-1)/N
  • RAID-5 is a solution that combines storage performance, data security, and storage cost, and is currently the most used method
    insert image description here

2.4RAID-6 (data striping with double distributed checksum)

  • N(N>4) disks form an array, (N-2)/N disk utilization
  • Compared with RAID-5, RAID6 adds a second independent parity information block
  • Two independent parity systems use different algorithms, even if two disks fail at the same time, it will not affect the data usage
  • Has a larger 'write' penalty' relative to RAID-5, hence poorer write performance

insert image description here

2.5RAID-10 (mirroring first, then striping)

  • After N (even number, N>4) disks are mirrored in pairs, a RAID0 is formed
  • Available capacity: N/2 disk utilization 50%
  • Write to N/2 disks at the same time, and read to N disks at the same time
  • High performance and high reliability
  • A maximum of 2 disks are allowed to be damaged. Allow Disk0 and Disk2 to be damaged at the same time, or Disk1 and Disk3 to be damaged at the same time, other combinations of damage will affect the data
    insert image description here

2.6RAID-01 (strip first, then mirror)

  • N (even number, N > 4) disks are first combined into a RAID0, and then a RAID1
  • The read and write performance is the same as that of RAID1+0
  • In RAID0+1, RAID0 is done first without data backup, so the data reliability is worse than that of RAID1+0, and the actual use is less.
    insert image description here

3. Comparison of RAID levels

Comparison item RAID0 Raid1 RAID5 RAID6
Minimum number of hard disk blocks 2 2 (must be even) 3 4
available capacity N N/2 N-1 N-2
disk utilization 100% 50% (N-1)/N (N-2)/N
write speed quick constant slow slow
read speed quick quick quick quick
read speed Difference high high high
safety Difference high high high
Allow Huaiji Express 0 N/2 1 2

4. Disk array card

4.1 Array card introduction

  • The array card is a board used to implement the RAID function, and is usually composed of a series of components such as an I/O processor, a hard disk controller, a hard disk connector, and a cache
  • Different RAID cards support different RAID functions:
    for example, support RAID0, RAID1, RAID10, RAID5, etc.
    • Interface type of RAID card:
      IDE interface, SCSI interface, SATA interface, SAS interface

4.2 Array card cache

  • Cache (Cache) is the place where the RAID card exchanges data with the external bus. The RAID card first transfers the data to the cache, and then exchanges data between the cache and the external data bus.
  • The size and speed of the cache are important factors directly related to the actual transmission speed of the RAID card. A large cache can improve the hit rate
  • Different RAID cards are equipped with different memory capacities when they leave the factory, generally ranging from a few megabytes to hundreds of megabytes.

5RAID hot spare disk

effect:

  • It is equivalent to making another backup in the raid. For example, the system and data can still run normally when only one disk is damaged in the Raid, but it will not work if two disks are damaged. However, after adding hot backup, two disks can be damaged at the same time. There is no problem with every disk, so there is an extra insurance.
    principle:
  • The hot spare disk is equivalent to making multiple backups for the Raid array. If one of the disks in the Raid array fails, the hot spare disk will replace the bad disk in the Raid. The original data is made and stored in the hot spare disk. In this way, it means that the Raid is not damaged, and then find a similar disk to replace the bad disk, and the status of the Raid and the hot spare disk is normal again.

Guess you like

Origin blog.csdn.net/fyb012811/article/details/131966181