Description
This summary comes from a personal technical documentation summary, codenamed 101.
First, RAID introduction
1.Raid Basic situation
Raid: Disk array
• Combine multiple physical disks in different ways to form a disk, logically a disk, which is RAID technology;
· RAID can provide larger capacity and higher performance than a single disk, while providing redundant backup of multiple levels of data;
2.Raid level
RAID level: The disk is made into raid in a technical way, which is the raid level
· RAID levels are: RAID 0, RAID 1, RAID 2, RAID 3, RAID 4, RAID 5, RAID 6, RAID 7, RAID 10;
• Common RAID levels in production scenarios are: RAID 0, RAID 1, RAID 5, RAID (RAID 0 + RAID 1), compared to the following:
| RAID level |
Key Benefits |
Key drawbacks |
Practical Application Scenarios |
| Raid 0 |
Fastest read and write speeds |
Without any redundancy |
MySQL Slave, cluster of nodes RS |
| Raid 1 |
Data 100% Redundancy |
Read-write performance in general, high cost |
A single server, data-critical, no-downtime business, system disk |
Raid 5
|
Have a certain performance and redundancy, can be bad piece of disk, read good performance |
Write Performance is low |
General business can be used |
| Raid 10 |
Fast read and write speed, data 100% redundancy |
High cost |
Performance and redundancy require a high level of business, data Main library and storage master node |
3.Raid Technical Classification
--Soft raid
• Use the software to implement RAID capabilities;
--Hard raid
• Hardware-based, better performance than soft raid;
• The hardware is a RAID card (RAID controller), which can be connected to multiple disks via disk, looking at the following image:
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/71/F4/wKiom1XbMlmhDpmxAAKtoNCvXzY455.jpg "title=" Clipboard.png "alt=" Wkiom1xbmlmhdpmxaaktoncvxzy455.jpg "/>
• Hardware-based RAID is the first choice in a production environment;
• Some servers are supported by default RAID 0, 1, if required 5, 10, you need a RAID card;
• Disks are connected to a RAID card and are not available for use without raid.
4.LVM
• A mechanism for managing disk partitions in a Linux environment;
· LVM, logical volume management, can make the disk partition arbitrarily enlarge or reduce, flexibly manage the disk capacity;
· LVM is actually a few physical partitions or disks through the software combination, partition, you can arbitrarily to the capacity of the partition to expand or shrink;
• Emphasize performance and backup, you should use RAID.
5. Benefits of using raid
• The performance of a single server can be fully mined through raid;
• Data security;
• Data read and write performance;
• Provides a larger single logical disk data capacity storage, such as RAID 0.
Second, common RAID level details introduction
1.Raid 0
• RAID 0 has the highest storage performance in all RAID levels;
· Raid 0 Principle Description:
A.raid 0 Spread continuous data across multiple disks for access
B. When the system performs data reading and writing, parallel execution on multiple disks, each disk has its own data request
C. Parallel data execution, can make full use of bus bandwidth, improve the overall disk access performance
· Raid 0 Authoring Requirements and recommendations:
A. A minimum of 1 physical disks, or 1 disks connected to the RAID card, can do RAID 0
B. Do raid 0 of different disks, the best size to maximize the data parallel reading and writing advantages
· Raid 0 Illustration:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/71/F0/wKioL1XbOSqCZI7uAADH1ddjCl0568.jpg "title=" Raid 0 " alt= "Wkiol1xbosqczi7uaadh1ddjcl0568.jpg"/>
· Raid 0 If there are two disks, the theoretical performance of a single disk twice times, considering the factors of the bus, the actual lower than the theoretical value;
· Application of Raid 0 in production scenarios:
A. Multiple identical RS node servers under the Load Balancer cluster
B. Distributed file storage The following master node or chunk SERVER
C.mysql multiple slave servers for master-slave replication
D. High performance requirements, low redundancy requirements related to the business
• For 4 disks, for example, RAID 0 is described:
| Focus Point |
Describe |
Capacity
|
4 disks plus a piece of capacity, the highest storage performance, the principle is to spread the continuous data across multiple disks to access |
| Performance |
In theory, disk read and write speed is 4 times times the Flixbox, due to the bus factor, the actual lower than the theory, the more disk multiples smaller |
Redundancy
|
Without any redundancy, bad 1 disks, the whole raid won't work. |
| Occasion |
There's a talk. |
Characteristics
|
Fast speed, no redundancy, no loss of capacity |
2.Raid 1
· Raid 1, also known as mirror or mirroring, is mirrored;
· Raid 1 Description:
A. To make RAID 1, at least two disks required, whether only 2 blocks to see the actual situation
B. The entire RAID 1 size, equal to the smallest disk capacity in two disks
C. Data storage, simultaneous writing of two disks for 100% data backup, but reduced write performance
D. When the data is read, is the Guthrie reserve (in the case of the main bad), or can read in parallel, you need to actually verify
· Raid 12 block When the disk is broken, you should change the disk as soon as possible, change the disk plug can be used (hot Plug and unplug), the data will be automatically copied;
• The disk can be monitored in the production scenario (for the case of a bad disk);
• Production Scenario: The performance requirements are not high, but the data requirements are high;
· Raid 1 Illustration:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/71/F4/wKiom1XbOr6zBqzcAACwpOsU9BM821.jpg "title=" Raid 1 " alt= "Wkiom1xbor6zbqzcaacwposu9bm821.jpg"/>
• For 2 disks, for example, RAID 1 is described:
| Focus Point |
Describe |
Capacity
|
Loss of more than 50% of capacity. For example: 2 1T disk, RAID 1, capacity of 1T |
| Performance |
Can not improve the storage performance, the theoretical write performance and the single-disk correlation is not small (think is to write the primary, then the main disk to copy to the spare, but there will be a little difference); read performance is twice times, that is, whether the data can be read in parallel, the actual situation is accurate |
Redundancy
|
Provides 100% backup of data to provide the highest data redundancy |
| Occasion |
Ideal for storing important data such as Server system partitions (multiple raid on one server) and database storage with low performance requirements |
Characteristics
|
Data 100% redundancy, capacity loss more than half |
This article from "Fragrant fluttering leaves" blog, reproduced please contact the author!
RAID Technology Streamlined summary