Raid technology learning-general Linux technology-Linux programming and kernel information. The following is a detailed description. Knowledge Development: http://www.scsi.cn/knowledge/knowledge_list.php? News_id = 588 RAID
Http://www.it.com.cn/f/server/051/4/53660.htm what is a Redundant Array of Independent Disks?
Http://download.chinaitlab.com/soft/452.htm high-end server RAID configuration recording
Http://www.net130.com/2004/8-31/85635.html RAID full solution
Http://www-900.ibm.com/developer... m/raid1/index.shtml software RAID in the new Linux 2.4 kernel
What is RAID?
RAID (Redundant Array of Inexpensive Disks) is called an independent Redundant disk Array. The basic idea of RAID is to combine multiple Inexpensive small Disks into one disk group, make the performance reach or exceed a large capacity, expensive disk.
RAID (Redundant Array of Independent Disk Independent Redundant Disk Array) technology was proposed by the University of California at Berkeley in 1987, initially to combine small cheap disks to replace large expensive disks, at the same time, it is hoped that the disk will not cause data access losses when it becomes invalid, and a certain level of data protection technology will be developed. RAID is a Redundant Array composed of multiple low-cost disks. It appears as an independent large storage device in the operating system. RAID can give full play to the advantages of multiple hard disks, increase the speed and capacity of hard disks, and provide Fault Tolerance functions to ensure data security and ease of management, you can continue to work in the case of any hard disk failure, without being affected by the damage to the hard disk.
Disk arrays are also divided into Software Raid and Hardware Raid. the soft array is achieved by the software program and the CPU of the computer. because the software program is not a complete system, it can only provide the most basic RAID fault tolerance function. other functions, such as hot backup hard disk settings and remote management, are not recommended. the hardware with independent operations provides the control and computing functions of the entire disk array. it does not rely on the CPU resources of the system.
Since the hard array is a complete system, all required functions can be implemented. therefore, the functions and performance of the hard array are better than those of the soft array. moreover, if you want to make the system a disk array, hard arrays are the only choice. therefore, we can see that the RAID Level 5 disk arrays on the market are hard arrays. (2001)
Software RAID allows you to greatly enhance the I/O performance and reliability of linux Disks without buying expensive hardware RAID controllers and accessories. Linux RAID is implemented by software, so it is flexible and fast. Using software RAID, you can combine several physical disks into a larger virtual device, to improve performance and data redundancy.
Software RAID level
Currently, the software RAID for Linux 2.4 kernel supports the following levels: linear mode, RAID0, RAID1, RAID4, and RAID5.
Linear mode:
Combine two or more disks into one physical device, and the disk does not have to have the same size. Because the disks are attached to each other, when writing data to a RAID device, the disk 0 is first filled, and then the disk 1 is similar.
There is no redundancy in this level. If a disk is applauded, all data may be lost. However, because the file system only loses a large continuous data block, it is lucky to recover some data.
For separate read and write operations, the Read and Write performance will not improve. However, if several users use this device at the same time and one user actually uses the first disk while the other user is accessing the data on the second disk, the performance will be improved.
RAID0
It also becomes the Strip mode. It is similar to the linear mode, but reading and writing are done in parallel on the device, and the device size should be roughly equal, because all accesses are completed in parallel and all devices are equally populated. If a device is much larger than other devices, additional space will be used in the RAID device, however, when writing data to the high-end part of the RAID device, you can only access the large disk, which will reduce the performance.
Like linear mode, RAID0 is not redundant. Unlike linear mode, if the drive fails, no data can be recovered. If a drive is taken from RAID0, the RAID device will not only lose a continuous data block, but the entire device will be filled with small holes.
Because reading and writing are done in parallel on the device, read and write performance will increase, which is usually the main reason for running RAID0. If the disk bus is fast enough, it can be very close to N * P Mbit/S
RAID1
In a truly redundant mode, RAID1 can be used for two or more disks with 0 or more backup disks. This mode retains an accurate image of one disk information on other disks. Of course, the disk size must be equal. If not, your device will have the minimum disk size.
If a N-1 block disk is evicted at most (or fails), all data remains unchanged. If there is a backup disk and the system is not damaged in the fault, after a drive failure is detected, the image will be rebuilt on a backup disk immediately.
The Write Performance of RAID is slightly worse than that of a single device, because the same copy of the written data must be sent to each disk in the column, and the read performance is usually worse, however, the 2.4 kernel has been greatly improved.
RAID4
RAID 4 blocks and distributes data on different disks, but the disk unit is block or record. RAID 4 uses a disk as the parity disk. Each write operation requires access to the parity disk. In this case, the parity disk becomes the bottleneck for write operations. Therefore, RAID 4 is rarely used in commercial environments. Array size is (N-1) * S, S is the minimum size of the drive in the array
If a drive fails, you can use the parity information to recreate all data. If the two drives fail, all data will be lost.
RAID5
When you want to combine a large number of physical hard disks and retain some redundancy, RAID 5 may be the most useful RAID mode. RAID 5 can be used on three or more disks, and use 0 or more backup disks. Just like RAID4, the size of the RAID5 device is (N-1) * S.
The biggest difference between RAID5 and RAID4 is that the parity information is evenly distributed on each drive, which avoids the bottleneck problem in RAID4. If one disk fails, therefore, due to the parity information, all data can be kept inconvenient. If you can use a disk, the data will be rebuilt immediately after the device fails. If two hard disks fail at the same time, all data will be lost. RAID5 can withstand faults of one disk, but cannot withstand faults of two or more disks.
Reading and Writing Performance is usually high, but it is difficult to predict the improvement.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service