In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Construction of RAID disk array 1, RAID disk array 1, RAID disk array introduction
RAID is the abbreviation of Redundant Array of Independent Disks in English and independent redundant disk array in Chinese.
RAID combines multiple independent physical disks in different ways to form a hard disk group (logical hard disk), thus providing higher storage performance and data backup technology for this single hard disk.
The different ways of forming a disk array are called RAID levels (RAID Lecels).
There are several commonly used RAID levels: RAID0, RAID1, RAID5, RAID6,RAID1+0, etc.
2. RAID 0 (stripe volume with zone)
Features: high reading and writing. Consecutive bits or bytes split data in units and read / write in parallel on multiple disks, so it has a high data transfer rate.
Cons: unreliable. There is no data redundancy and the failure of one of the disks will affect all data.
RAID 0 cannot be shipped in situations with high data security requirements.
Composition condition: composed of disks of the same size
Capacity: total capacity of multiple disks
Build RAID 0 Volume
(1) add 2 disks to the virtual machine, partition the disk / dev/sdb and disk / dev/sdc respectively, and then change them to Linux raid mode
Create a raid0 and view the created raid0
The command to create raid 0 is: mdadm-C-v / dev/md0-10-N2 / dev/sd [bmerc] 1
The command to view raid 0 is: mdadm-D / dev/md0
Command to view raid 0 status: cat / proc/mdstat
Format raid 0 volume: mkfs.xfs / dev/md0
Create mount point: mkdir / opt/md0
Mount: mount / dev/md0 / opt/md0
View mount: df-h
This is the creation of RAID 0
3. RAID 1 (Mirror Volume)
Data redundancy is realized through disk data mirroring to produce data backed up by each other on pairs of independent disks.
When the original data is busy, the data can be read directly from the mirrored copy, so RAID 1 can improve read performance.
RAID 1 has the highest unit cost of the disk array, but provides high data security and availability. When a disk fails, the system can automatically switch to the mirrored disk to read and write without the need to reorganize the failed data.
Features: high reliability
Disadvantages: lack of scalability
Composition condition: composed of disks of the same size
Capacity: half of the total capacity of multiple disks
Build RAID 1 Volume
Add 3 disks to the virtual machine. Partition them and convert them to linux raid types
Create a raid0 and view the created raid0
The command to create raid 0 is: mdadm-C-v / dev/md1-L1-N2 / dev/sd {b.. c} 1-x1 / dev/sdd1
The command to view raid 0 is: mdadm-D / dev/md1
Format raid 1 Volume: mkfs.xfs / dev/md1
Create mount point: mkdir / opt/md1
Mount: mount / dev/md1 / opt/md1
View mount: df-h
Hang up the / dev/sdb1 disk setting in raid1: mdadm-f / dev/md1 / dev/sdb1
The command to view raid 1 is: mdadm-D / dev/md1
4 、 RAID 5
An array of N (N > = 3) block disks. One piece of data produces a strip of NMel, and there is also a copy of check data. A total of N pieces of data are cyclically stored on the N block disk.
Features: high reading, general writing. High reliability, allows a bad disk, does not affect all data.
Composition: at least 3 disks of the same size
Capacity: sum of disk capacity of nmurl
Build RAID 5 volumes
Add 4 disks to the virtual machine. Partition them and convert them to linux raid types
Command to create raid 5 volumes mdadm-C-v / dev/md5-15-N3 / dev/sd {b.. d} 1-x1 / dev/sde1
Command to view the processes of raid 5 volumes: cat / proc/mdstat
View the command for the created raid 5: mdadm-D / dev/md5
Format raid 5 volumes: mkfs.xfs / dev/md5
Create mount point: mkdir / opt/md5
Mount: mount / dev/md5 / opt/md5
View mount: df-h
After removing a disk, the reserved disk is automatically added and starts to synchronize the information.
5 、 RAID 6
Composition condition: n (N > = 4) block disk to form an array
Capacity: (Nmur2) / N capacity.
Features: compared with RAID 5, RAID 6 adds a second independent parity block. Two independent parity systems use different algorithms, and even if two disks fail at the same time, it will not affect the use of data.
Disadvantages: there is a larger write loss of 1 compared to RAID 5, so the write performance is poor.
Build RAID 6 volumes
Add 5 disks to the virtual machine. Partition them and convert them to linux raid types
Command to create raid 6 volumes mdadm-C-v / dev/md6-16-N4 / dev/sd {b.. e} 1-x1 / dev/sdf1
Command to view the processes of raid 6 volumes: cat / proc/mdstat
Format raid 6 volumes: mkfs.xfs / dev/md6
Create mount point: mkdir / opt/md6
Mount: mount / dev/md6 / opt/md6
View mount: df-h
After removing a disk, the reserved disk is automatically added and starts to synchronize the information.
6. RAID 1: 0
Composition condition: n (even number, N > = 4) disk after pairwise mirror image, after combining into a RAID 0
Capacity: Number2 capacity
Features: Number2 disks are written at the same time and N disks are read at the same time. High performance and high reliability.
Build RAID 1 0 Volume
Add 4 disks to the virtual machine. Partition them and convert them to linux raid types
Command to create raid 1 volume: mdadm-C-v / dev/md1-L1-N2 / dev/sd {b.. c} 1
Mdadm-C-v / dev/md2-L1-N2 / dev/sd {d.. e} 1
Mdadm-C-v / dev/md10-10-N2 / dev/md1 / dev/md2
Format raid 1 / 0 volumes: mkfs.xfs / dev/md10
Create mount point: mkdir / opt/md10
Mount: mount / dev/md10 / opt/md10
View mount: df-h
7. Introduction of array cards
The full name of the array card is the disk array card, which is used to realize the RAID function. Generally divided into hard raid card and soft RAID card.
9. Array card cache
Cache: a place where raid cards exchange data with external buses. Raid cards first transfer data to the cache, and then exchange data between the cache and the external data bus.
The size and speed of the cache are important factors directly related to the actual transmission speed of the raid card.
Different raid cards are equipped with different memory capacity, generally ranging from a few megabytes to hundreds of megabytes.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.