Raid is divided into software Raid and hardware Raid. Because the hardware Raid is expensive, some people choose to use the software Raid. Raid is easy to use and low cost. The following small series will introduce you how to operate the software Raid.
First, what is Raid
Raid was originally called Redundant Arrays of Inexpensive Disks, which is now called Redundent Array of Independent Disks. This is a storage module that uses a mechanism to combine multiple hard drives with fault tolerance. It can be simply understood that this is a combination of several small hard drives into a large hard drive with fault tolerance. Raid is usually divided into several levels. For example, Raid0, Raid1, Raid4, Raid5, Raid6, Raid10, and Raid01 are common. The level of Raid is not a level in the usual sense. This level represents a combination of disks with different internal storage structure patterns. Raid is often used in projects where data storage is at risk and data reading and writing capabilities are high.
Raid is divided into hardware Raid and software Raid. The two Raid structures are the same, and the implementation mechanism is similar. The difference is that the hardware Raid has a separate chip responsible for processing data, powerful, and outstanding performance; while the software Raid can only read and write data by CPU, so the performance is weak, can be used for emergency processing. In other cases, I don't agree with the software Raid.
Second, the operation of software Raid in Linux
In Linux, the mdadm tool is usually used to perform soft Raid operation on the disk partition. mdadm generally calls the md module of the system. When md is used as a soft raid, any block device can be made into a raid, such as a system partition. It is not recommended to use two partitions on the same hard disk when doing raid0 to the system disk. Because raid0 itself is for data dispersion, but this situation still stores the data on a hard disk, so this situation does not make any sense. Here, for the experimental reasons, the operation is performed on the virtual machine, so this factor is not considered for the Raid0 operation.
mdadm is a patterning tool with the following modes
-A: assembly mode
-C: creation mode
-F: monitoring mode
-C: Common parameters for creating mode:
-n #: Number of devices used to create RAID devices
-x #: Number of hot spare disks < Br>
-l Level: Custom raid level, raid0, 0 can be written
-a yes: Automatically create device files for the created raid device;
-c Chunk_Size: Specifies the block size, the default is 512, the unit is KB
mdadm other unique parameters:
-f: the simulated device is damaged
-r: analog pullout Bad Disk
-a: Plug the new device into
-S: Stop the RAID, this operation needs to uninstall the device
-D(--detail): Display Array details
Next, let's create a new 12G Raid0
1. First use the system fdisk tool to partition the hard disk, and divide the two disks into 6G format for Linux raid autodetect.
Here are two of my disks /dev /sdb1 and /dev /sdb2
2, and the use of kpart partx command to refresh the system partition table records
kpartx -af /dev/sdb
partx -a /dev/sdb
Then use the cat command to view the partition table records. When your new partition appears in the list, you can Create a raid
cat /proc/partitions
3. Create a Raid0 using the command mdadm -C
mdadm -C /dev/md0 -a yes -l 0 -n 2 /dev/sdb{1,2}
-C /dev/md0 The device name is /dev/md0
-a yes The problem is automatically answered as yes
-l 0 Level is raid0
-n 2 Number of devices is 2
/dev/sdb{1,2} Devices are /dev/sdb1 and /dev/sdb2
Sometimes the partition is occupied, but it can still be created successfully. You can view the raid without interruption during the operation
Previous12Next page Total 2 pages
QQ is one of the largest social chat software in the country, so many Linux users also want to insta
After the Linux system has been in operation for a long time, it will generate a lo
There are many commands on Linux systems that allow users to create new directories
In the Linux system using awk text processing tools, sometimes need to merge multip
Ubuntu can't input Chinese using QT. What should I do?
Techniques for setting up multiple network cards as virtual network cards under Linux
When the Linux virtual machine mounts the hard disk, you are prompted to specify how to solve it?
After the Linux boot, the terminal prompts -bash-2.05b$ What should I do?
The Linux find command combined with xargs method
Detailed explanation of the functions and parameters of the Linux system ar command
RedHat Linux system how to install wireless network card driver
What should I do if the device id of the Linux virtual machine does not match the drive letter?
Linux uses node.js to execute commands.
Summary of problems often encountered when using Linux for the first time
Win8.1 system Internet speed is slow solution
Two wonderful ways to easily change the icon of the computer hard drive letter
Win7 prompt "load driver" solution
Windows8 system is now high-risk vulnerabilities may cause hardware damage
Win7/8.1 Tips: Quick Restart in a Special Period
The real thing is now! Windows7 RC version full experience
win8 Right off setting graphic tutorial
Personalize your start screen with Win8.1
How to open the system with the Notepad program in Windows 8
How does the Win10 system re-open the notification center and suddenly found that there is no