当前位置:网站首页>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
边栏推荐
- 进行挂载永久挂载后无法开机
- Leetcode sword finger offer jz73 flip word sequence
- FTP服务与实验
- Use of MySQL
- 三分钟记住20道性能测试经典面试题
- Solution of forgetting root password in mysql5.7 under Windows
- Leetcode sword finger offer jz23: the entry node of the link in the linked list
- Flink production environment configuration recommendations
- IP course (OSPF) comprehensive experiment
- [no need for public IP] configure a fixed public TCP port address for remote desktop raspberry pie
猜你喜欢

United Nations agricultural products data analysis
![[no need for public IP] configure a fixed public TCP port address for remote desktop raspberry pie](/img/85/dec6a66dd10c35e2519bd240c05de1.png)
[no need for public IP] configure a fixed public TCP port address for remote desktop raspberry pie

grep与正则的搭配使用
![[214] what is an automation framework](/img/bb/24c35613c49357258876ce3f1611ee.jpg)
[214] what is an automation framework

【218】CS架构和BS架构以及数据放在服务端和客户端的利与弊?

PXE技术网络装机

go的环境搭建和起步

IP notes (9)

List of problems in the re disk guidance of the project

Crud of MySQL
随机推荐
Maximum value of jz47 gifts (dynamic planning ideas)
Common commands and package management of go language
Summary of common working methods (7S, SWOT analysis, PDCA cycle, smart principle, 6w2h, time management, WBS, 28 principles)
openssl版本升级
Wasm vs EVM, Boca's choice predicts the future of the public chain
Batch operation of generating MySQL statements from Excel
LuckyFrameWeb测试平台(一款支持接口自动化、WEB UI自动化、APP自动化,并且支持分布式测试的全纬度免费开源测试平台)
【219】app 测试和web测试的区别点?
Windows下bat脚本备份MySQL数据库
进程和计划任务管理
The public network uses Microsoft Remote Desktop remote desktop to work remotely at any time
[301] grotesque behavior - predictable irrationality
IP notes (12)
Jenkins automated unattended operation (up / down)
【217】#!/usr/bin/env 的意义
MySQL批量修改数据表编码及字符集为utf8mb4
Combination of grep and regular
Quick start of go language
Solution of forgetting root password in mysql5.7 under Windows
Playing RTSP video stream on webpage