当前位置:网站首页>RAID configuration experiment
RAID configuration experiment
2022-07-24 06:35:00 【Walking Di five flowers】
Catalog
One 、RAID Disk array Introduction
Two 、 Commonly used RAID Array Introduction
1、RAID0 Disk array Introduction
2、RAID 1 Disk array Introduction
3、RAID 5 Disk array Introduction
4、RAID 10 Disk array Introduction
3、 ... and 、RAID Array experiment
One 、RAID Disk array Introduction
RAID: Independent redundant disk array
working principle : Combine multiple independent physical hard disks in different ways to form a hard disk group ( Logical hard disk ), So as to provide higher storage performance than a single hard disk and provide data backup technology
RAID Commonly used :RAID0,RAID1,RAID5,RAID6,RAID1+0,RAID 0+1 etc.
Two 、 Commonly used RAID Array Introduction
1、RAID0 Disk array Introduction
working process : Put multiple physical hard disk devices ( At least two ) Connected in series by hardware or software , Form a large volume group , And write the data to each physical hard disk in turn , It is a kind of striped storage .

analysis :RAID 0 It has a high data transmission rate ; There is no redundant ( Backup )、 check , The reliability guarantee of data is low , It cannot be used in occasions with high safety requirements .
2、RAID 1 Disk array Introduction
working process : Put multiple physical hard disk devices ( At least two ) Connected in series by hardware or software , Form a large volume group , The contents of each disk are the same , It is a kind of mirrored storage .

analysis : Disk data mirroring realizes data redundancy ( Backup ), When raw data is busy , Data can be read directly from the mirror copy , therefore RAID 1 Can improve read performance , But the reading performance is not RAID 0 high . High data security and reliability . When a disk fails , The system can automatically switch to read and write on the mirror disk .
3、RAID 5 Disk array Introduction
working principle : Save data parity information to other hard disk devices .RAID 5 The parity information of the data in the disk array is not stored separately in a — Block hard disk device , Instead, it is stored on other hard disk devices besides itself .

analysis : from N( At least 3 Block hard disk ) The disks form an array , A data generation N-1 A strip , As well as 1 Check data , common N The data is in N Cycle balanced storage on the block disk ;N Read and write at the same time , High reading performance , But because of the problem of checking mechanism , Write performance is relatively low (N-1)/N Disk utilization ; High reliability , Allow bad 1 Block plate , It doesn't affect all the data
4、RAID 10 Disk array Introduction
working principle :RAID 10 The technology is RAID1+RAID0 One of the technologies “ assembly ”. You need at least 4 Block hard disk to build , Two of them are made into RAID 1 disk array , To ensure data security ; And then two more RAID1 Raid implementation RAID 0 technology , Into the — Step 1: improve the reading and writing speed of hard disk devices .

analysis : RAID1+0 array : First make a mirror image , And then make a strip ,N Block plate (N For the even , At least 4 A hard disk ) After two mirror images , Then combine it into a RAID 0, High performance , High reliability .
Four kinds of RAID Array comparison :
| RAID Level | Number of hard disks | Disk utilization | Check function | Can break several disks | Write performance |
| RAID0 | N individual | N | nothing | 0 | Of a single hard disk N times |
| RAID1 | N individual ( even numbers ) | N/2 | nothing | 1 | Need to write two hard disks , Prepare for each other |
| RAID5 | least 3 individual | (N-1)/N | Yes | 1 | Need to calculate and verify |
| RAID10 | least 4 individual | N/2 | nothing | At most, each group can only be broken 1 individual | Double write calculation verification is required |
3、 ... and 、RAID Array experiment
RAID Use command mdadm
mdadm function : Used to manage RAID Raid group , You can create 、 adjustment 、 monitor 、 Delete and other complete management operations
Grammar format :mdadm [ Options ] Device name
Options :-D ---- Show RAID Device details
-G ---- change RAID Size or shape of equipment
-C ---- hold RAID Information is written into each member super block
-v ----- Show RAID Details of the creation process
-l ----- Appoint RAID The level of
-n ---- Appoint RAID Number of active devices in
-f ---- hold RAID Members are listed as having problems , To remove the member
-r ---- hold RAID Members move out RAID equipment
-a ---- towards RAID Add — Members
-x ----- Specify initial RAID Number of spare members of the device
newly added 4 A hard disk , Set one for each hard disk 2G Main partition

Turn off firewall and central protection

1、RAID 0 disk array
( hold sdb1 and sdc1 Form a RAID 0 Array of disks )

① Grammatical format analysis :mdadm -Cv /dev/md0 -n2 -l0 /dev/sd[b,c]1
mdadm: command , At this point, create a disk array
-Cv Can be written separately -C -v : Means to create a disk card , And show the detailed process
/dev/md0 : Name of the array created
-n2 : Appoint RAID The number of active devices in is 2
-10 : Appoint RAID The number of levels is 0
/dev/sd[b,c]1 Which disks make up the disk array



It can also be permanently attached :

mount -a
Speed measurement test :

2、RAID 1 disk array
① hold sdd1 and sde1 Form a RAID 0 Array of disks
![]()
② see mdadm -D /dev/md1

③ format

④ mount Or permanently mount vim /etc/fstab

3、RAID 5 disk array
Use sdb2、sdc2、sdd2 form raid 5 And sde1 As a backup
① 
②

③ format

④ Mount or permanently mount vim /etc/fstab
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 100G 0 disk
├─sda1 8:1 0 500M 0 part /boot
├─sda2 8:2 0 7.8G 0 part [SWAP]
└─sda3 8:3 0 91.7G 0 part /
sdb 8:16 0 20G 0 disk
├─sdb1 8:17 0 4G 0 part
│ └─md127 9:127 0 8G 0 raid0 /data/raid0
├─sdb2 8:18 0 2G 0 part
│ └─md5 9:5 0 4G 0 raid5 /data/raid5
├─sdb3 8:19 0 2G 0 part
├─sdb4 8:20 0 1K 0 part
└─sdb5 8:21 0 12G 0 part
└─md10 9:10 0 22G 0 raid10 /data/raid10
sdc 8:32 0 20G 0 disk
├─sdc1 8:33 0 4G 0 part
│ └─md127 9:127 0 8G 0 raid0 /data/raid0
├─sdc2 8:34 0 2G 0 part
│ └─md5 9:5 0 4G 0 raid5 /data/raid5
├─sdc3 8:35 0 2G 0 part
├─sdc4 8:36 0 1K 0 part
└─sdc5 8:37 0 12G 0 part
└─md10 9:10 0 22G 0 raid10 /data/raid10
sdd 8:48 0 20G 0 disk
├─sdd1 8:49 0 4G 0 part
│ └─md126 9:126 0 4G 0 raid1 /data/raid1
├─sdd2 8:50 0 2G 0 part
│ └─md5 9:5 0 4G 0 raid5 /data/raid5
├─sdd3 8:51 0 3G 0 part
├─sdd4 8:52 0 1K 0 part
└─sdd5 8:53 0 11G 0 part
└─md10 9:10 0 22G 0 raid10 /data/raid10
sde 8:64 0 20G 0 disk
├─sde1 8:65 0 4G 0 part
│ └─md126 9:126 0 4G 0 raid1 /data/raid1
├─sde2 8:66 0 2G 0 part
├─sde3 8:67 0 2G 0 part
│ └─md5 9:5 0 4G 0 raid5 /data/raid5
├─sde4 8:68 0 1K 0 part
└─sde5 8:69 0 12G 0 part
└─md10 9:10 0 22G 0 raid10 /data/raid10
sr0 11:0 1 4.3G 0 rom
Simulate this sdb2 The dish is broken
Before bad :

Set fault : Set up sdb2 Something goes wrong
![]()
see raid 5

4、RAID 10 disk array
①
![]()
②

③ format

④ Mount or permanently mount vim /etc/fstab
![]()
⑤ [[email protected] data]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 100G 0 disk
├─sda1 8:1 0 500M 0 part /boot
├─sda2 8:2 0 7.8G 0 part [SWAP]
└─sda3 8:3 0 91.7G 0 part /
sdb 8:16 0 20G 0 disk
├─sdb1 8:17 0 4G 0 part
│ └─md127 9:127 0 8G 0 raid0 /data/raid0
├─sdb2 8:18 0 2G 0 part
│ └─md5 9:5 0 4G 0 raid5 /data/raid5
├─sdb3 8:19 0 2G 0 part
├─sdb4 8:20 0 1K 0 part
└─sdb5 8:21 0 12G 0 part
└─md10 9:10 0 22G 0 raid10 /data/raid10
sdc 8:32 0 20G 0 disk
├─sdc1 8:33 0 4G 0 part
│ └─md127 9:127 0 8G 0 raid0 /data/raid0
├─sdc2 8:34 0 2G 0 part
│ └─md5 9:5 0 4G 0 raid5 /data/raid5
├─sdc3 8:35 0 2G 0 part
├─sdc4 8:36 0 1K 0 part
└─sdc5 8:37 0 12G 0 part
└─md10 9:10 0 22G 0 raid10 /data/raid10
sdd 8:48 0 20G 0 disk
├─sdd1 8:49 0 4G 0 part
│ └─md126 9:126 0 4G 0 raid1 /data/raid1
├─sdd2 8:50 0 2G 0 part
│ └─md5 9:5 0 4G 0 raid5 /data/raid5
├─sdd3 8:51 0 3G 0 part
├─sdd4 8:52 0 1K 0 part
└─sdd5 8:53 0 11G 0 part
└─md10 9:10 0 22G 0 raid10 /data/raid10
sde 8:64 0 20G 0 disk
├─sde1 8:65 0 4G 0 part
│ └─md126 9:126 0 4G 0 raid1 /data/raid1
├─sde2 8:66 0 2G 0 part
├─sde3 8:67 0 2G 0 part
│ └─md5 9:5 0 4G 0 raid5 /data/raid5
├─sde4 8:68 0 1K 0 part
└─sde5 8:69 0 12G 0 part
└─md10 9:10 0 22G 0 raid10 /data/raid10
sr0 11:0 1 4.3G 0 rom
summary :
RAID 0 It is a strip type Don't break any disk , Read write speed block , No backup
RAID 1 It is an image type Can break a disk , The reading and writing speed is not RAID 0 block , But there are backups , High safety
RAID 5 It is a strip plus check type , The most widely used type in production . The worst one is allowed
RAID 10 It's the mirror image first and the strip , Each group raid 1 A bad one is allowed at most
边栏推荐
- Li Kou 986. Intersection of interval lists
- Leetcode sword finger offer jz23: the entry node of the link in the linked list
- Batch operation of generating MySQL statements from Excel
- 一个测试经理/测试主管/测试总监的工作总结
- 系统安全及应用
- JSP tag
- MySQL forgot to exit and close the window directly. How to delete the entire folder now
- Go environment construction and start
- 进行挂载永久挂载后无法开机
- Leetcode refers to the duplicate number in the offer jz3 array
猜你喜欢
随机推荐
Log collection and analysis platform
MySQL from basic to entry to high availability
Modeling of XML
Data set and pre training model
Customize MVC 3.0
Work summary of a test Manager / Test Supervisor / test director
Metersphere one stop open source continuous testing platform
history命令历史记录中加时间
Remember 20 classic interview questions of performance test in three minutes
Process and planned task management
使用自定义zabbix包(4.0.5版本)安装agent和proxy
[award issuance] the results of the first essay solicitation activity in oneos zone were announced
JSP tag 02
Unable to boot after permanent mounting
FTP service and experiment
【217】#!/ The meaning of usr/bin/env
Life warning Maxim
进程和计划任务管理
自定义zabbix agent rpm包
Do not rent a server, build your own personal business website (how to buy a domain name)









