The disk array is made up of many inexpensive disks, combined into a large disk group, which uses individual disks to provide data with the added effect to improve the performance of the entire disk system. Using this technique, the data is cut into many sections and stored on each hard drive
The disk array can also take advantage of the concept of the same-bit inspection, in the array of any one hard disk failure, can still read the data, when the data is reconstructed, the data is calculated and re-placed into the new hard disk
RAID Grade |
Minimum hard drive |
Maximum fault tolerance |
Usable capacity |
Read Performance |
Write Performance |
Security |
Purpose |
Application Industry |
Single Drive |
Reference |
0 |
1 |
1 |
1 |
No |
|
|
JBOD |
1 |
0 |
N |
1 |
1 |
None (with raid 0) |
Increase capacity |
Personal (temporary) storage backup |
0 |
2 |
0 |
N |
N |
N |
One hard drive exception, all hard drives will be abnormal |
The pursuit of maximum capacity, speed |
Video Splicing Cache usage |
1 |
2 |
N-1 |
1 |
N |
1 |
The highest, a normal can |
The pursuit of maximum security |
Personal, Enterprise backup |
5 |
3 |
1 |
N-1 |
N-1 |
N-1 |
High |
The pursuit of maximum capacity, minimum budget |
Personal, Enterprise backup |
6 |
4 |
2 |
N-2 |
N-2 |
N-2 |
Security is higher than RAID 5 |
With RAID 5, but more secure |
Personal, Enterprise backup |
10 |
4 |
N/2 |
N/2 |
N |
N/2 |
High safety |
Comprehensive raid 0/1 advantages, faster theoretical speed |
Large databases, servers |
1. n represents the total number of drives
2. Jbod can be connected to an existing hard drive to increase capacity directly
3. If the hard drive to create the raid is large, it may take a while for Cat/proc/mdstat to see the progress
Create a good software RAID corresponding to/dev/mdn,n for digital
RAID information is saved in the/proc/mdstat file and can be viewed through the mdadm command
Mdadm
-C Create a new raid
-S off specify raid, uninstall before closing
-R re-enable specified RAID (requires restart)
-D View RAID information (Cat/proc/mdstat can also be viewed)
-a automatically create the corresponding device
-l Specifies the raid level
-N Number of drives
-x Specifies the backup disk-X followed by the number
-F indicates the hard drive is faulty
-R removing the hard drive
-A add a new hard drive to the raid
--ZERO-SUPERBLOCK/DEV/SDB Delete all information and data (RAID is off first)
Cases:
1. Create a RAID10 with a number of 4 drives
Mdadm-c/dev/md0-a yes-l 10-n 4/dev/sdb/dev/sdc/dev/sdd/dev/sde
2. Mount the file system after it is created
Mkfs.xfs-f/dev/md0
mount/dev/md0/home/
3. Set up auto mount on boot
Vim/etc/fstab
/dev/md0/home XFS Defaults 0 0
1. Batch create file test data is missing
Cd/home
Touch {1..20}
2. Mark SDB as the failed drive and remove
Mdadm/dev/md0-f/dev/sdb
Mdadm/dev/md0-r/dev/sdb
ll/home/See if data is missing
Add a piece of hard disk
Cat/proc/mdstat Discovery [4/3]
is rebuilding
Mdadm/dev/md0-a/dev/sdb
Cat/proc/mdstat
[=========>...] recovery = 45.9%
linux-Software RAID