Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Comparison of the principle, types, performance and advantages and disadvantages of RAID commonly used in servers

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Disk array (Redundant Arrays of Independent Disks,RAID)

1. The stored data must be segmented.

two。 There are software-based soft RAID (such as mdadm) and hardware-based hard RAID (such as raid card).

3. Raid cards, like network cards, are integrated on board and independent (PCI-e). Generally, the performance of independent raid cards is relatively good. Taobao can see their original form.

4. Now, basically, the native hardware of the server supports several commonly used RAID

5. Of course, there are more high-end disk array cabinets dedicated to storage, with dedicated storage technology, specifications such as 12amp 24 / 48 disk cabinet, disk optional mechanical / solid state, 3.5 inch 2.5 inch, etc.

Level feature principle unit redundancy performance utilization the most bad use defect RAID0 stripe split storage in 2 hard disks 2 No read and write speed twice 100%0/2SWAP/TMP non-redundancy, data difficult to recover RAID1 mirror the same data is stored in 2 hard disks 2 is the same write speed 2 times the write speed 50% 1 drive 2 data backup read and write speed is not added Low utilization RAID4 check slices are stored in 2 hard disk check codes stored in the third hard disk 3 is 2 times the read and write speed, 2 times the speed of read and write, 3 to 66% 1, 1 to 3, which is rarely used. In case of bad disk, the other 2 pieces need to recalculate the bad disk data 2. The pressure on the check code disk becomes a bottleneck. RAID5 check sharding and check code mixed storage 3 is 2 times the read and write speed. When the other 2 blocks need to recalculate the bad disk data and restore the bad disk data, the RAID6 check disk check code disk is calculated twice and the read and write speed is 2 times. In 2-42-4, 1 ∈ 2 is rarely used. "half of the troops are engaged in logistics, and I still don't feel very good." RAID101+02 block hard disk group 1 do RAID1 multi-group RAID1 and then do RAID04 is read and write speed N times N for group 1 ∈ 2 on 2-42-4-RAID505+03 block hard drive group 1 do RAID5 multi-group and then do RAID06 is read and write number 2N times N for group 4-62-6 1 ∈ 3 Tuhao used "good is good, is expensive!"

Recently, I want to build a private cloud system, which involves installing and using a network storage server. For the connection of the hard disk in the server, which RAID mode can accurately meet the requirements, the data is collected, which is simply sorted out and recorded as follows:

1. A brief introduction to the advantages and disadvantages of RAID model.

The advantages and disadvantages of RAID, which is widely used at present, are roughly as follows:

1. RAID0 mode

Advantages: in the state of RAID 0, the stored data is divided into two parts, which are stored on two hard disks respectively. At this time, the theoretical storage speed of the mobile hard disk is twice as fast as that of a single hard disk, and the actual capacity is equal to twice the capacity of the smaller hard disk of the two hard drives.

Disadvantages: if any hard disk fails, the data on the entire RAID will not be recoverable.

Note: it is appropriate to store high-definition movies.

2. RAID1 mode

Advantages: in this mode, the two hard drives mirror each other. When a hard disk is damaged, replace the original hard disk with a brand new hard disk (greater than or equal to the capacity of the original hard disk) to automatically recover data and continue to use. The actual capacity of the mobile hard disk is equal to the capacity of a smaller hard disk, and the storage speed is the same as that of a single hard disk. The advantage of RAID 1 is that if any hard disk fails, the stored data will not be lost.

Disadvantages: the actual capacity of the hard disk that can be used in this mode is relatively small, which is only the smallest of the two hard drives.

Note: very important information, such as databases and personal data, is a foolproof storage solution.

3. RAID 0room1 mode

RAID0 + 1 is a combination of disk segmentation and mirroring. the disk arrays with two sets of RAID0 mirror each other, and they become an array of RAID1. Hard disk usage is only 50%, but provides the best speed and reliability.

4. RAID 3 mode

RAID3 divides the data into several "blocks". According to a certain fault-tolerant algorithm, it is stored on 1 hard disk, the effective space occupied by the actual data is the sum of the space of N hard disks, and the data stored in the N + 1 hard disk is the check fault-tolerant information. When one of the hard disks in the N hard disk fails, the data in the other N hard disks can also recover the original data.

5. RAID 5 mode

RAID5 does not back up the stored data, but stores the data and the corresponding parity information on the disks that make up the RAID5, and the parity information and the corresponding data are stored on different disks respectively. When a disk data of RAID5 is damaged, the remaining data and corresponding parity information are used to recover the damaged data.

6. RAID 10 mode

RAID10 requires at least 4 hard drives to complete. Two hard drives are formed into a RAID1, and then two groups of RAID1 are formed into a RAID0. Although the RAID10 scheme results in 50% disk waste, it provides 200% speed and data security with single disk corruption.

Second, a brief introduction to the other three fast hardware setup modes

When collecting data, we can see that some hardware devices provide fast disk mode settings, which is also very convenient for everyone to use. The details are as follows:

1. Clone mode

In clone mode, all data on the disk is the same, subject to the smallest hard disk.

2. Large mode

The capacity of the hard disk is simply added up, turning several hard drives into a single hard disk, with the capacity of the sum of several hard disks. In this mode, you can get the maximum hard disk space.

3. Normal mode

The hard disk is in a normal and independent state, and it can write or read data independently, and the actual capacity that can be used is the capacity of four hard drives respectively. If one of the hard drives is damaged, the other drives will not be affected.

III. Points for attention in the use of RAID

Please back up the data of the hard disk before using ★. Once you set the RAID or change the RAID mode, all the data in the hard disk will be erased and cannot be recovered.

When ★ establishes RAID, it is recommended to use hard drives of the same brand, model and capacity to ensure performance and stability.

★ do not replace or remove the hard drive at will. If you remove the hard drive, please note that the order in which the hard drive is put into the two positions shall not be changed, and do not insert only one hard disk to avoid data damage or loss.

★ if the old hard drive has ever been used in RAID mode, please clear the hard disk RAID information first and return the hard drive to the factory state, so as to avoid the failure of RAID establishment.

In ★ RAID0 mode, when one of the hard drives is damaged, all data on the other hard drives will be lost.

In ★ RAID1 mode, if a hard disk is damaged, you can replace the damaged hard disk with a new hard disk that is greater than or equal to the damaged hard disk capacity, and then power on to automatically recover and repair data as well as RAID mode. This process will take some time, please wait patiently

Fourth, count RAID mode

1. Concept

Disk array (Redundant Arrays of Inexpensive Disks,RAID), which means "cheap and redundant disk array". The principle is to use the array method to make the disk group, with the design of scattered arrangement of data to improve the security of the data. Disk array is composed of many cheap, small, stable and slow disks into a large disk group, using the addition effect produced by individual disks to provide data to improve the performance of the entire disk system. At the same time, using this technology, the data is cut into many sections and stored on each hard disk. The disk array can also use the concept of parity check (Parity Check) to still read the data when any hard disk in the array fails, and when the data is reconstructed, the data will be calculated and re-placed into the new hard disk.

2. Norms

RAID technology mainly includes several specifications such as RAID 0~RAID 50, which have different emphasis, and the common specifications are as follows:

RAID 0:RAID 0 continuously splits data in bits or bytes and reads / writes in parallel on multiple disks, so it has a high data transfer rate, but it has no data redundancy, so it is not a true RAID structure. RAID 0 simply improves performance and does not guarantee the reliability of the data, and the failure of one of the disks will affect all data. Therefore, RAID 0 can not be used in situations with high data security requirements.

RAID 1: it achieves data redundancy through disk data mirroring, producing 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.

RAID 0room1: also known as RAID 10 standard, is actually the product of the combination of RAID 0 and RAID 1 standard, while continuously dividing data in bits or bytes and reading / writing multiple disks in parallel, each disk is mirrored for redundancy. Its advantage is that it has both the extraordinary speed of RAID 0 and the high data reliability of RAID 1, but the CPU occupancy is also higher, and the disk utilization is relatively low.

RAID 2: strips data across different hard drives in bits or bytes, and uses an encoding technique called "weighted average error correction code (hamming code)" to provide error checking and recovery. This coding technique requires multiple disks to store inspection and recover information, which makes the implementation of RAID 2 technology more complex, so it is rarely used in business environments.

RAID 3: very similar to RAID 2, it strips data across different hard drives, except that RAID 3 uses simple parity and uses a single disk to store parity information. If a disk fails, parity disks and other data disks can be reproduced.

New data is generated; if the parity disk fails, the use of the data will not be affected. RAID 3 can provide a good transfer rate for a large amount of continuous data, but for random data, parity disks can become the bottleneck of write operations.

RAID 4:RAID 4 also strips and distributes data on different disks, but the blocks are in blocks or records. RAID 4 uses a disk as a parity disk, which requires access to the parity disk for each write operation, which becomes the bottleneck of the write operation, so RAID 4 is rarely used in business environments.

RAID 5:RAID 5 does not specify a separate parity disk, but accesses data and parity information across all disks. On RAID 5, read / write pointers operate on array devices at the same time, providing higher data traffic. RAID 5 is more suitable for small data blocks and random read-write data. The main difference between RAID 3 and RAID 5 is that every data transfer in RAID 3 involves all array disks, while for RAID 5, most data transfers operate only on one disk and can be operated in parallel. There is a "write loss" in RAID 5, that is, each write operation produces four actual read / write operations, including two reads of old data and parity information, and two writes of new data and parity information.

RAID 6: compared with RAID 5, RAID 6 adds a second independent parity block. Two independent parity systems use different algorithms, and the reliability of the data is so high that even if two disks fail at the same time, it will not affect the use of the data. However, RAID 6 needs to allocate more disk space for parity information, which has a greater "write loss" than RAID 5, so the "write performance" is very poor. Poor performance and complex implementation make RAID 6 rarely used in practice.

RAID 7: this is a new RAID standard with an intelligent real-time operating system and software tools for storage management, which can be run completely independent of the host and do not consume host CPU resources. RAID 7 can be thought of as a storage computer (Storage Computer), which is significantly different from other RAID standards. In addition to the above standards (such as Table 1), we can combine a variety of RAID specifications to build the required RAID arrays, such as RAID 0 arrays 1. For example, RAID 5 arrays 3 (RAID 53) is a widely used array form. Users can generally obtain disk storage systems that better meet their requirements by flexibly configuring disk arrays.

RAID 5e (RAID 5 Enhencement): RAID 5e is an improvement based on the RAID 5 level. Similar to RAID 5, the data check information is evenly distributed on each hard disk, but some unused space is reserved on each hard disk. This part of the space is not striped, allowing up to two physical hard drives to fail. It seems that RAID 5e and RAID5 plus a hot spare are similar, but because RAID 5e distributes data on all hard drives, its performance will be better than RAID5 plus a hot spare. When a hard disk fails, the data on the failed hard disk will be compressed to unused space on other hard drives, and the logical disk remains at the RAID 5 level.

RAID 5EE: compared to the RAID 5e, RAID 5EE's data distribution is more efficient. Part of the space of each hard disk is used as a distributed hot spare, which is part of the array. When a physical hard disk in the array fails, the data is rebuilt faster.

RAID50: RAID50 is a combination of RAID5 and RAID0. This configuration strips data, including parity information, on each disk of the subdisk group of the RAID5. Three hard drives are required for each RAID5 subdisk group. RAID50 is more fault tolerant because it allows one disk in a group to fail without data loss. And because the parity bit is partial on the raid 5 subdisk group, the reconstruction speed is greatly improved. Advantages: higher fault tolerance and the potential for faster data reading rates. It is important to note that disk failures can affect throughput. It takes longer to rebuild information after a failure than in the case of a mirror configuration.

3. Advantages

Increase the 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 transfer data at the same time, and these disk drives are logically a disk drive, so using RAID can achieve several times, dozens or even hundreds of times the speed of a single disk drive. This is also the problem that RAID initially wanted to solve. Because the speed of CPU was growing rapidly at that time, and the data transfer rate of disk drives could not be greatly improved, a solution was needed to solve the contradiction between the two. RAID finally succeeded.

Fault tolerance is provided through data verification. A normal disk drive cannot provide fault tolerance if it does not include CRC (cyclic redundancy check) codes written on disk. RAID fault tolerance is based on the hardware fault tolerance of each disk drive, so it provides higher security. In many RAID modes, there are relatively complete measures for mutual verification / recovery, or even direct mutual mirror backup, which greatly improves the fault tolerance of the RAID system and improves the stability and redundancy of the system.

4. Realize

Disk arrays can be implemented in two ways, namely, "software arrays" and "hardware arrays".

Software array means that multiple hard disks on connected ordinary SCSI cards are configured into logical disks through the disk management function provided by the network operating system itself. The software array can provide data redundancy, but the performance of the disk subsystem will be reduced, some by about 30%.

The hardware array is implemented using a special disk array card. The hardware array can provide online capacity expansion, dynamic modification of array level, automatic data recovery, driver roaming, hyperbuffering and other functions. It provides solutions for performance, data protection, reliability, availability, and manageability. Array card dedicated processing unit to operate, its performance is much higher than the conventional non-array hard disk, and more secure and stable.

In fact, disk arrays are also divided into soft array (Software Raid) and hard array (Hardware Raid). The soft array is made up of software programs 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 spare hard disk settings, remote management and so on are missing. Hard array is the control and computing function of the whole disk array provided by independently operated hardware. Do not rely on the CPU resources of the system.

Because the hard array is a complete system, all the required functions can be done. Therefore, the function and performance of hard array is better than that of soft array. And if you want to put the system in the disk array, the hard array is the only option. Therefore, we can see that the RAID level 5 disk arrays on the market are hard arrays. Soft arrays are only available for Raid 0 and Raid 1. For the mirror tower we use for mirroring, we certainly won't use Raid 0 or Raid 1. As a high-performance storage system, it has been more and more widely used. The level of RAID has developed into six levels since the concept of RAID was put forward, which are 0, 1, 2, 3, 4, 5 and so on. But the most commonly used levels are 0, 1, 3, and 5.

Which RAID mode should individual users choose?

First of all, we need to analyze what the attributes of the files we need to store are. This requires a large amount of storage and takes up a large amount of storage files are two different things.

Roughly divided from the point of view of use, the files that individuals need to store are generally text files, photo and video files, audio and video files, applications and so on.

1. Text files: a large number of long-term storage, periodic updates, but its small space, high security requirements, most of them are general

2. Photo and video recording: a large number of long-term storage, permanent records, large space, high security requirements, once the loss is difficult to make up

3. Audio-visual files: some of them are stored for a long time, some are stored for a short time, updated periodically, they take up a lot of space, and the security requirements are general. Even if they are lost, they can be downloaded and restored from the network.

4. Application program: this includes some software and hardware drivers. At present, the software is basically available from the network. Drivers sometimes need to be backed up in advance and can be used at any time when installing the device. It belongs to a small amount but needs to be stored for a long time. Periodic updates, general security requirements.

See what type of file you need to store, and then choose the RAID mode you need.

My photos and private video materials are more, usually like to collect APE and other lossless format of music files, for individuals, this is the greatest treasure, can not be lost, and then there are some hardware drivers, relatively important, and will edit a small number of personal files, the stage is more important, the last is the film, after watching also deleted, not very important. On the other hand, the space occupied by photo video recording and lossless music is huge, and the security requirements are very high. after weighing, under the premise of saving money to ensure security, we are prepared to purchase five large-capacity hard drives to form a NAS storage server and choose RAID5 mode.

By the way, there is another reason for buying five fast hard drives, that is, I use the old chassis to transform the NAS server. There are 3 to 5 hard disk cages on the market that can simply change the original 3 optical drive bits into the storage bits of 5 hard drives. Considering that the capacity of 8T of home storage is enough, 10T can basically be worry-free, so I chose 5 hard drives with 2T capacity each. Of course, after the composition of RAOD5 will be less than 10T, that is enough!

There are many benefits of NAS, so I won't repeat it here. Interested friends suggest to know more about it. It can complete not only centralized storage but also many private cloud functions such as automatic BT download, network printer, Apple media server and so on. It is a good home network application solution.

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report