Building tutorial for Linux disk array RAID 5

I. Introduction to RAID Disk Array

RAID is the abbreviation of Redundant Array of Independent Disks in English, and the Chinese abbreviation is Redundant Array of Independent Disks. RAID is a combination of multiple independent physical hard disks in different ways to form a hard disk group (logical hard disk), thereby providing higher storage performance than a single hard disk and providing data backup technology to form a disk array. The different methods are called RAID levels ( RAID Levels), the commonly used RAID levels are as follows: RAIDO, RAID1, RAID5, RAID6, RAID1+0, etc.

二, RAID 5 disk array

RAID 5 disk array consists of N (N>=3) disks Array, one piece of data produces N-1 strips, and one piece of parity data, N pieces of data are stored cyclically and balancedly on N disks

< p> Share a picture

< /p>

N blocks of disk simultaneously read and write, read performance Very high, but due to the issue of the verification mechanism, the write performance is relatively low. The disk is (N-1)/N, which has high reliability and allows one disk to be broken without affecting all data.

Experimental step environment preparation:

1. Prepare more than three and the same size Partition (fd), check whether the mdadm installation package is installed

2. Command:mdadm -C -v /dev/md5 -l5 -n3 /dev/sd[bd]1 -x1 /dev/sde1

share pictures

3. View the synchronization process Command:cat /proc/mdstat

< p>

Share pictures

4. View disk usage command mdadm -D /dev/md5

Share a picture

< span style="margin: 0px; padding: 4px 8px; max-width: 100%; box-sizing: border-box; font-family: -apple-system-font, BlinkMacSystemFont,'Helvetica Neue','PingFang SC' ,'Hiragino Sans GB','Microsoft YaHei UI','Microsoft YaHei', Arial, sans-serif; font-size: 15px; letter-spacing: 0.544px; text-align: justify; border-radius: 3px; color : #c7254e; background-color: #f9f2f4; overflow-wrap: break-word !important;">

5Execute “mdadm -f /dev/md5 /dev/sdb1” command to unmount the disk to simulate a disk is hung up.

You can see that it is being replaced, sdb1 has expired

Share a picture

share picture

6. Usemdadm /dev/md5 / -r /dev/sdb1Remove and put/dev/sde1 mdadm /dev/md5 –add /dev/sdf1added as a hot spare disk

< img alt="Share a picture" src="/wp-content/uploads/images/os/linux/1626797195740.png" >

< /p>

p>

>

RAID 5 disk array is composed of N (N>=3) disks, one piece of data Generate N-1 strips, and at the same time there is 1 copy of parity data, N copies of data are stored on N disks in a circular and balanced manner

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 5118 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.