Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Basic introduction of RAID disk array

2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Basic introduction of RAID disk array

​ RAID (Independent redundant disk Array) is a technology that combines multiple independent hard disks (physical hard drives) in different ways to form a hard disk group (logical hard disk), which provides higher storage performance and data backup technology than a single hard disk. RAID is divided into different levels, and different levels of RAID make different tradeoffs in data reliability and read-write performance. Several common RAID forms: RAID 0, RAID 1, RAID 5, RAID 6, RAID 1 0.

1. RAID 0

​ is called striped storage, which divides the data into consecutive or byte units, stores the data in segments in each hard disk, and reads / writes data in parallel. It has a high data transfer rate, but there is no data redundancy. The damage of a single disk will affect all data. Therefore, RAID 0 cannot be used in situations with high data security requirements.

1. To configure raid 0 in xshell, you first need to create two hard disks in the virtual machine. After rebooting, the hard disk information will be displayed.

2. After the hard disk is allocated, set raid on two of the hard drives.

3. The system must need this software mdadm to see if there is mdadm. This is the soft raid tool, through the command to make disk arrays.

4. At this time, there is md0 under the dev file. First format the md0 under dev, then create the mount point / opt/md0, and mount it.

5. To mount automatically, command: vim / etc/fstab, enter the configuration, press the o key to the bottom to configure, and press: wq to save and exit after the configuration is completed.

By this time, raid 0 has been configured.

Two: RAID 1

​, called mirrored storage, achieves data redundancy through disk data mirroring. the principle is that data backed up each other on piles of independent disks, because the data is equally written to pairs of disks, so the performance is slow. However, when the original data is busy, you can mirror the copy and read the data directly, so the read performance is faster.

1. You need to create three hard drives, two as raide, and the other as waiting state. If one disk is broken, the other will be replaced automatically. First of all, you need to configure the three disks as raid, the same configuration as above.

2. Check whether the progress is completed. After the progress is completed, you can see that two disks are active and the other disk is waiting.

3. Format / dev/md1 after the progress is completed. After creating a mount point for opt, mount / dev/md1 to / opt/md1.

4. Create 1-99 text (touch / opt/md1/test {1.. 99} .txt) in / opt/md1, and verify that one disk will be disconnected and the other disk will be replaced.

Three: RAID 5

​ RAID5 is a storage solution that combines storage performance, data security and storage cost. RAID 5 has a data read speed similar to that of RAID 0, but with one more parity information, and writing data is slightly slower than writing to a single disk. At the same time, because multiple data correspond to a parity information, RAID 5 has higher disk space utilization and lower storage cost than RAID 1, so it is a widely used solution at present.

1. First create 4 disks, the principle is similar to raid1, disconnect one disk and another disk will replace it. Four disks (sdg, sdh, sdi, sdj) have been created here

2. Now you are ready to disconnect a disk and verify whether the waiting disk will be replaced.

​ RAID5 stores the data and the corresponding parity information on the disks that make up the RAID5, and the parity information and the corresponding data are stored on different disks, in which any Nmuri disk stores complete data, that is to say, there is a space equivalent to the capacity of a disk to store parity information. Therefore, when a disk of RAID5 is damaged, it will not affect the integrity of the data, thus ensuring the security of the data. When the damaged disk is replaced, RAID will automatically use the remaining parity information to reconstruct the data on the disk to maintain the high reliability of RAID5. Raid6 and raid5 are the same, the configuration is the same, raid6 needs 4 disks, can use one hard disk backup, can also be two.

Four: RAID1+0

As the name implies, RAID1+0 is the combination of RAID1 and RAID0, which first mirrors (1) and then stripes (0). It takes into account the fault tolerance of raid1 and the advantages of striping reading and writing data of raid0, with good performance and high reliability. It belongs to hybrid RAID.

The RAID1 on both sides of the RAID1+0 can break one hard drive at the same time, but not both hard drives on one side at the same time.

For example:

If there are four hard drives DISK A1 Magi disk A2 Magi disk B1, DISK B2 Magi A Group (A1, A2) Group B (B1, B2).

1. Any hard disk in Group A can be broken because it is in RAID 1 format, and the data in any hard disk in Group B can also be broken because it is also in RAID 1 format. Therefore, any hard disk in An and B is allowed to be damaged at the same time without affecting the integrity of the data.

2. If both hard drives in Group An or Group B are damaged at the same time, the data cannot be maintained. Therefore, it is not allowed to damage both hard drives on one side at the same time.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report