当前位置:网站首页>RAID disk array
RAID disk array
2022-06-12 22:06:00 【A thought of going to war】
List of articles
One 、RAID Introduce
RAID, Full name Redundant Arrays of Inexpensive Disk , Independent redundant disk array .
Disk arrays are It consists of many independent physical hard disks , Combined into a large capacity hard disk group , So as to provide higher storage performance than a single hard disk and provide data backup technology .
RAID Can be realized including Improve I/O( Reading and writing ) Ability 、 Improve durability 、 Improve data redundancy And so on .
DAID How to implement :
- External connection : Provide adaptability through expansion cards
- Built in : motherboard integrated DAID controller , It is usually installed before the operating system BIOS Set in the
- Software style : Through the software of the operating system , For example, Qunhui's NAS
The different ways in which the entire column of disks is composed are called RAID Level , Most commonly used RAID There are four kinds of :
RAID 0、RAID 1、RAID 5、RAID 10(10 Not ten , It is 1+0, Do it first RAID 1, Do it again RAID 0)
however , This is not RAID All levels of , There are also RAID 2、DAID 3、RAID 4、RAID 6、RAID 50 wait , It's just that it's not often used in production environments for performance reasons , So as to be eliminated or carried away by a stroke .
Two 、 Several commonly used RAID
1.RAID 0
RAID 0 , Also called striped storage . It's in all RAID Highest storage performance in class , The principle is to store a continuous piece of data on different hard disks ( The process is carried out simultaneously ). If you want to achieve RAID 0, At least two hard disks are required .
If I have a continuous piece of data 123456789, Three hard disks are used at the same time a,b,c Did RAID 0, Then its storage mode is 1 save a,2 save b,3 save c,4 save a,5 save b,6 save c,7 save a,8 save b,9 save c, And so on , And the stored processes are simultaneous , thus it can be seen , With the same data ,RAID 0 The storage speed of increases with the increase of hard disk **( Single hard disk N times ,N by RAID 0 Number of hard disks in )**.
however ,RAID 0 Just to improve the performance , and There is no guarantee for the reliability of the data , A disk failure will affect all data , therefore RAID 0 It can't be used in the situation with high data security requirements .
It can be seen from the above figure , When a hard disk hangs up , Some data will be lost , This will affect the integrity of the data .
2.RAID 1
RAID 1 , Also known as mirrored storage . It is realized through disk data mirroring data redundancy , stay Pair Data backed up by each other is generated on independent disks of . Generally speaking , Is that all ( The number of hard disks is even , namely 2n)RAID 1 All data is written to the hard disk in , Its capacity is only equal to the capacity of a hard disk , Because the other piece is just a data mirror . When raw data is busy , Data can be read directly from the mirror copy .
RAID 1 Of Writing speed is usually slow , Because the data has to be written into two hard disks and compared , But it's Data reading is faster than a single hard disk , Because the data will be read out from the faster one of the two hard disks .
RAID1 It is in the hard disk The unit cost is the highest Of , but It provides high data security and availability , When a hard disk fails , The system can Automatically switch to the mirrored hard disk for reading / Write , also There is no need to reorganize invalid data .

It can be seen from the above figure , When a hard disk hangs up , The system will read the complete data information from the backup hard disk , Does not affect the integrity of the data .
3.RAID 5
RAID 5 It's a storage capability 、 A storage solution that combines data security and storage cost , Its At least three hard disks are required to form an array .
RAID 5 With and RAID 0 Similar data reading speed , It's just There is one more parity information , therefore The speed of writing data is slightly slower than that of a single disk .
Since multiple data correspond to one parity information ,RAID 5 The disk space utilization ratio of RAID 1 high , by n-1/n(n Is the number of hard disks )
RAID 5 Of High reliability , It is allowed to damage a disc , When a disk is damaged ,RAID 5 Meeting Using the remaining data and the corresponding parity information to recover the damaged data , Thus, the integrity of image data will not . Of course , If two disks break at the same time , Or when one disk is damaged and the problem is not solved, another disk is broken , Then only GG 了 .
As shown in the figure above , If disk 0 damage , The other three hard disks can recover data according to the verification information , So it does not affect the integrity of the data
4.RAID10
RAID10, refer to RAID 1 + 0 , Do it first RAID 1 , Do it again RAID 0 . it yes RAID 1 and RAID 0 Products of combination , Divide data in consecutive bits or bytes and read in parallel / Write multiple disks at the same time , For each disk as a disk image for redundancy .
RAID 10 meanwhile Have RAID 0 Fast read and write speed and RAID 1 High reliability of data , however CPU The occupancy rate is also higher , and Disk utilization is low (n/2).
Because of the use of RAID 0 High reading and writing efficiency and RAID 1 High data protection 、 Resilience , send RAID 10 It has become a high cost-effective grade , At present, almost all RAID All control cards support this level .


3、 ... and 、Linux System construction software RAID
stay Linux In the system , To build RAID disk array , Need to use mdadm Tools .
Format : mdadm [ Pattern ] <raiddevice> [ Options ] <component-device>
| Options | Pattern |
|---|---|
| -C | Create mode |
| -A | Assembly mode |
| -F | Monitoring mode |
| -f,-r,-a | management model |
| management model | effect |
|---|---|
| -f | Mark the specified disk as damaged |
| -r | Remove disk |
| -a | Add disks |
| Options | effect |
|---|---|
| -n # | Use # Devices to create this RAID |
| -l # | Specify the created RAID The level of |
| -x # | Specify the size of the free disk |
| -c | Specify block size , Unit is k |
| -D | Show RAID Details of |
below , I will demonstrate to you in detail Linux Build in RAID 5 The process of :
First , We now add the virtual machine management interface 4 Block hard disk . add to 4 The purpose of the block is to 3 Block making RAID 5 , The rest is a hot spare , namely RAID 5 If one disc is damaged , The hot spare can be directly replaced .


yum install -y mdadm

mdadm -Cv md0 -l 5 -n 3 /dev/sd[b-d] -x 1 /dev/sde

mdadm -D /dev/md/md0

format

mount

simulation sdd damage




边栏推荐
- SQL调优指南笔记12:Configuring Options for Optimizer Statistics Gathering
- 【QNX Hypervisor 2.2 用戶手册】4.2 支持的構建環境
- 【数据分析】基于 kmeans实现数据聚类分组含Matlab源码
- Ansible Roles-项目案例(四)
- What is the race condition? How do you find and solve the competition?
- Cloning PDB with ADG standby
- The 2023 campus recruitment officially opened! Oceanbase would like to make an interview with you this spring
- Data batch writing
- 六月集训(第10天) —— 位运算
- USB机械键盘改蓝牙键盘
猜你喜欢

Recommended Chinese font in the code input box of Oracle SQL developer

SQL tuning guide notes 13:gathering optimizer statistics

Dolphin-2.0.3 cluster deployment document

SQL tuning guide notes 10:optimizer statistics concepts

Ansible基础和常用模块(一)

Configuring Dingding notification of SQL audit platform archery

PE安装win10系统

Ansible summary (VI)

Oracle LiveLabs实验:Introduction to Oracle Spatial Studio

MySQL master-slave replication
随机推荐
How to write a vscode plug-in by yourself to realize plug-in freedom!
Ansible基础和常用模块(一)
SQL tuning guide notes 8:optimizer access paths
Dolphin-2.0.3 cluster deployment document
Kotlin collaboration process - flow
logstash时间戳转换为unix 纳秒nano second time
SQL调优指南笔记11:Histograms
Yyds dry goods inventory solution sword finger offer: the first non repeated character in the character stream
#yyds干货盘点# 解决剑指offer:字符流中第一个不重复的字符
疼痛分级为什么很重要?
回文链表及链表相交问题(和心怡的人相交)你真的会了吗?
MySQL体系结构及基础管理(二)
Xingda easy control modbustcp to profibusdp
[sword finger offer] sword finger offer 58 - ii Rotate string left
Modstartcms modular station building system v3.3.0 component function upgrade, event triggering enhancement
Can tonghuashun open an account? Is it safe to open an account in tonghuashun? How to open a securities account
A puzzle about + =
Zip compression decompression
What is the race condition? How do you find and solve the competition?
Exception encountered by selenium operation element