Outline: 1. what is RAID? II. What are the advantages and disadvantages of RAID? 3. RAID style? 4. RAID classification? 5. What are the common RAID summaries? 6. Introduction to the mdadm tool? 7. create a RAID? 8. RAID management? 9. RAID optimization? 10. RAID monitoring? 11. RAID scaling? Note: What Is RAID for CentOS5.5X86 _ 64-bit 1? Brief description: RAID :( RedundantArrayofindenpen
Outline:
I. What is RAID?
II. What are the advantages and disadvantages of RAID?
3. RAID style?
4. RAID classification?
5. What are the common RAID summaries?
6. Introduction to the mdadm tool?
7. create a RAID?
8. RAID management?
9. RAID optimization?
10. RAID monitoring?
11. RAID scaling?
Note: CentOS 5.5 X86_64-bit testing machine
I. What is RAID?
Simple description:
RAID :( Redundant Array of indenpensive Disk) independent Redundant Disk Array: a Disk Array is an Array consisting of multiple disks. it is used as a single Disk and uses data in segments or strip (striping) storage in different disks. when accessing data, the related disks in the array work together to greatly reduce the data access time and improve the space utilization. Disk arrays use different technologies, called RAID levels. different levels are used for different systems and applications to solve data security issues. To put it simply, RAID combines multiple hard disks into one logical sector. Therefore, the operating system only treats them as one hard disk.
II. What are the advantages and disadvantages of RAID?
Advantages:
1. improve transmission rate. RAID greatly improves the data Throughput (Throughput) of the storage system by storing and reading data on multiple disks at the same time ). In RAID, many disk drives can transmit data at the same time, and these disk drives are logically a disk drive, therefore, using RAID can speed up to several times, dozens, or even hundreds of times of a single disk drive. This is also the problem RAID originally wanted to solve. At that time, the CPU speed was growing rapidly, and the data transmission rate of the disk drive could not be significantly improved. Therefore, a solution was needed to solve the conflict between the two. RAID is successful.
2. Fault tolerance is provided through data verification. Common disk drives cannot provide fault tolerance functions, if they do not include CRC (cyclic redundancy verification) codes written on the disk. RAID Fault tolerance is built on the hardware fault tolerance function of each disk drive, so it provides higher security. In many RAID modes, there are relatively complete mutual verification/recovery measures, or even direct backup of mutual images, which greatly improves the fault tolerance of the RAID system, this improves the stability and redundancy of the system.
Disadvantages:
1. perform different RAID operations. the hard disk usage in RAID mode is low and expensive.
2. RAID0 has no redundancy function. if a disk (physical) is damaged, all data cannot be used.
3. RAID1 has a utilization of only 50%, which is the lowest among all RAID levels.
4. RAID5 can be understood as a compromise between RAID 0 and RAID 1. RAID5 can provide data security protection for the system, but the level of protection is lower than that of RAID1, and the disk space utilization is higher than that of raid1.
3. RAID style?
-
External Disk array cabinet: it is most often used on large servers and has the Hot Swap feature. However, these products are expensive.
-
Internal disk array card: it is suitable for technical personnel to use because it is cheap but requires high installation technology.
-
Simulation using software: because it will drag down the speed of the machine, it is not suitable for servers with big data traffic.
4. RAID classification?
RAID 0 data sharding (strip) disk-only two or more hard disks are required. The cost is low and the performance and throughput of the entire disk can be improved.
The striping mode requires at least two disks, and the size of the RAID partition should be the same (which can be fully utilized and advantageous). data is distributed and stored on different disks, concurrency can be achieved during reading and writing, so it has the best read and write performance. but there is no fault tolerance function, damage to any disk will damage all data;
| 1234 |
mdadm -C /dev/md0-l1 -n2 /dev/sdb/dev/sdcmdadm -C /dev/md1-l1 -n2 /dev/sdd/dev/sdemdadm -C /dev/md2-l1 -n2 /dev/sdf/dev/sdgmdadm -C /dev/md3-l0 -n3 /dev/md0/dev/md1/dev/md2 |
2. if you want to use a hard disk partition for RAID, you need a specific fdisk partition and specify the partition type: fd.
The specific process is as follows:
1. partition
| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
[root@localhost ~]# fdisk /dev/sdeDevice contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabelBuilding a new DOS disklabel. Changes will remain inmemory only,untilyou decide to write them. After that, of course, the previouscontent won't be recoverable.The number of cylinders forthis disk is setto 2610.There is nothing wrong with that, but this is larger than 1024,and could incertain setups cause problems with:1) software that runs at boot time(e.g., old versions of LILO)2) booting and partitioning software from other OSs(e.g., DOS FDISK, OS/2FDISK)Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)Command (m forhelp): nCommand actione extendedp primary partition (1-4)pPartition number (1-4): 1First cylinder (1-2610, default 1):Using default value 1Last cylinder or +size or +sizeM or +sizeK (1-2610, default 2610):Using default value 2610Command (m forhelp): tSelected partition 1Hex code (typeL to list codes): fdChanged system typeof partition 1 to fd (Linux raid autodetect)Command (m forhelp): wThe partition table has been altered!Calling ioctl() to re-readpartition table.Here is only an example. Others are similar! Note:fdiskAfter partitioning, you must change the partition flag to the Linux raid auto type;The effect is as follows:[root@localhost ~]# fdisk -l | grep /dev/sdDisk /dev/sdb: 21.4 GB, 21474836480 bytes/dev/sdb11 2610 20964793+ fd Linux raid autodetectDisk /dev/sdc: 21.4 GB, 21474836480 bytes/dev/sdc11 2610 20964793+ fd Linux raid autodetectDisk /dev/sdd: 21.4 GB, 21474836480 bytes/dev/sdd11 2610 20964793+ fd Linux ra |