In Linux, RAID means "Redundant Array of Inexpensive Disks"; RAID is the abbreviation of "Redundant Array of InexpensiveDisks". The basic idea is to combine multiple cheap small disks together, called a Disk group, enabling performance equal to or exceeding that of a large, expensive disk.
#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.
What does raid mean in Linux
RAID (Redundant Array of InexpensiveDisks) is called a redundant array of cheap disks. The basic idea of RAID is to combine multiple cheap small disks together into a disk group, so that the performance can reach or exceed that of a large-capacity, expensive disk.
Currently RAID technology is roughly divided into two types:
Hardware-based RAID technology and software-based RAID technology.
The RAID function can be realized through the built-in software under Linux, which saves the need to purchase expensive hardware RAID controllers and accessories and greatly enhances the IO performance and reliability of the disk.
Because the RAID function is implemented using software, it is flexible in configuration and easy to manage. Using software RAID at the same time, you can also merge several physical disks into a larger virtual device to achieve performance improvement and data redundancy.
Of course, hardware-based RAID solutions are slightly better than software-based RAID technology in terms of usage performance and service performance, which are specifically reflected in the ability to detect and repair multi-bit errors, automatic detection of error disks, and array reconstruction. . This section will describe in detail how to create and maintain software RAID on the Red Flag Linux server.
Extended knowledge
Introduction to RAID levels
With the continuous development of RAID technology, there are now RAID 0 to There are seven basic RAID levels of RAID 6, as well as a combination of RAID 0 and RAID 1, called RAID 10. The level does not represent the level of technology, and RAID 2 and RAID 4 are basically no longer used, while RAID 3 is rarely used because it is too complicated to implement. Currently, these commonly used RAID levels are supported by the Linux kernel. This section takes the Linux 2.6 kernel as an example. The software RAID in the Linux 2.6 kernel can support the following levels: RAID 0, RAID 1, RAID 4, RAID 5 and RAID 6. wait. In addition to supporting the above RAID levels, the Linux 2.6 kernel can also support LINEAR (linear mode) soft RAID. Linear mode combines two or more disks into one physical device. The disks do not have to be the same size. When writing to the RAID device disk A is filled first, then disk B, and so on.
RAID 0
is also called striped mode (striped), which spreads continuous data to multiple disks for access, as shown in Figure 1. When the system has a data request, it can be executed by multiple disks in parallel, and each disk executes its own part of the data request. This kind of parallel operation on data can make full use of the bus bandwidth and significantly improve the overall disk access performance. Because reads and writes are done in parallel on the device, read and write performance will increase, which is often the main reason to run RAID 0. But RAID 0 has no data redundancy, so if a drive fails, no data can be recovered.
RAID 1
RAID 1 is also called mirroring (Mirroring), a mode with full redundancy, as shown in Figure 2. RAID 1 can be used for two or 2xN disks, and uses 0 or more spare disks. Every time data is written, it is written to the mirror disk at the same time. This type of array is highly reliable, but its effective capacity is reduced to half of the total capacity, and the disks should be of equal size, otherwise the total capacity is only the size of the smallest disk.
RAID 4
Three or more disks are required to create RAID 4, which stores parity information on one drive and writes the data in RAID 0 mode. Insert other disks, as shown in Figure 3. Because one disk is reserved for parity information, the size of the array is (N-l)*S, where S is the size of the smallest drive in the array. Just like in RAID 1, the disks should be equal in size.
If a drive fails, the checksum information can be used to rebuild all data. If both drives fail, all data will be lost. The reason this level is not often used is that the checksum information is stored on a drive. This information must be updated every time another disk is written. Therefore, when writing a large amount of data, it is easy to cause a bottleneck in the verification disk, so this level of RAID is rarely used at present.
RAID 5
RAID 5 is probably the most useful RAID mode when you want to combine a large number of physical disks and still retain some redundancy. RAID 5 can be used with three or more disks and uses zero or more spare disks. Just like RAID 4, the size of the resulting RAID5 device is (N-1)*S.
The biggest difference between RAID5 and RAID4 is that the parity information is evenly distributed on each drive, as shown in Figure 4, thus avoiding the bottleneck problem that occurs in RAID 4. If one of the disks fails, all data remains intact thanks to the parity information. If a spare disk is available, data synchronization will begin immediately after a device failure. If both disks fail at the same time, all data is lost. RAID5 can survive the failure of one disk, but not the failure of two or more disks.
RAID 6
RAID 6 is an extension of RAID 5. Like RAID 5, data and checksums are divided into data blocks and stored on each hard disk of the disk array. Only a check disk is added to RAID 6 to back up the check codes distributed on each disk, as shown in Figure 5. In this way, the RAID 6 disk array allows two disks to fail at the same time, so the RAID 6 disk array has the least Four hard drives are required.
Recommended learning: Linux video tutorial
The above is the detailed content of What does raid mean in linux?. For more information, please follow other related articles on the PHP Chinese website!

linux设备节点是应用程序和设备驱动程序沟通的一个桥梁;设备节点被创建在“/dev”,是连接内核与用户层的枢纽,相当于硬盘的inode一样的东西,记录了硬件设备的位置和信息。设备节点使用户可以与内核进行硬件的沟通,读写设备以及其他的操作。

区别:1、open是UNIX系统调用函数,而fopen是ANSIC标准中的C语言库函数;2、open的移植性没fopen好;3、fopen只能操纵普通正规文件,而open可以操作普通文件、网络套接字等;4、open无缓冲,fopen有缓冲。

端口映射又称端口转发,是指将外部主机的IP地址的端口映射到Intranet中的一台计算机,当用户访问外网IP的这个端口时,服务器自动将请求映射到对应局域网内部的机器上;可以通过使用动态或固定的公共网络IP路由ADSL宽带路由器来实现。

在linux中,eof是自定义终止符,是“END Of File”的缩写;因为是自定义的终止符,所以eof就不是固定的,可以随意的设置别名,linux中按“ctrl+d”就代表eof,eof一般会配合cat命令用于多行文本输出,指文件末尾。

在linux中,交叉编译是指在一个平台上生成另一个平台上的可执行代码,即编译源代码的平台和执行源代码编译后程序的平台是两个不同的平台。使用交叉编译的原因:1、目标系统没有能力在其上进行本地编译;2、有能力进行源代码编译的平台与目标平台不同。

在linux中,可以利用“rpm -qa pcre”命令判断pcre是否安装;rpm命令专门用于管理各项套件,使用该命令后,若结果中出现pcre的版本信息,则表示pcre已经安装,若没有出现版本信息,则表示没有安装pcre。

linux查询mac地址的方法:1、打开系统,在桌面中点击鼠标右键,选择“打开终端”;2、在终端中,执行“ifconfig”命令,查看输出结果,在输出信息第四行中紧跟“ether”单词后的字符串就是mac地址。

在linux中,rpc是远程过程调用的意思,是Reomote Procedure Call的缩写,特指一种隐藏了过程调用时实际通信细节的IPC方法;linux中通过RPC可以充分利用非共享内存的多处理器环境,提高系统资源的利用率。


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

Dreamweaver Mac version
Visual web development tools

Notepad++7.3.1
Easy-to-use and free code editor

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft
