Disk Management raid

Source: Internet
Author: User

RAID (reduntdant Arrays of independent disk), Chinese meaning is an array of disks. Since 1988, Berkeley , published the paper "A Case for redundant Array of independent disk", it was intended to combine several inexpensive disks in a way that was used to improve the disk's i/ o capability and durability, where increased I/O capability is achieved primarily through "parallel read and write" and increased "memory", while increased durability is achieved primarily by increasing the "redundancy" capability. However, it is not cheap yet, but the performance of disk can certainly be improved in one aspect or the other.

RAID is divided into three categories in broad terms:

1, an internal disk array: implemented via a disk array card on the motherboard.

2, external disk array: Through the expansion card (can be imagined as the installation of a discrete graphics card).

3, the software implementation of the disk array simulation: Through the software to achieve.

The above three types of 1 and 2 are hard raid,3 for soft raid. Soft raid is not available in the actual production. After writing the principle, you will

Understand that.

RAID is divided by its composition (because RAID2,RAID3,RAID6 is rarely used, so this is not written):

1,RAID0, the N-block disks are grouped together, and the data is divided into n copies of the N-block disks each time it is stored Chunck

(This Chunck is not a file system data block, do not confuse the two, but also divided into blocks, otherwise the data how to cut

), the next time this is stored, which greatly improves the I/O capability of the disk (read and write), but does not improve the redundancy capability

Because you can read and write from n disk while reading and writing, but once a hard disk is damaged, the data will be lost. So please

Do not use the data very important to the door 0, only in the data is not very important, but for the sake of speed can be considered.

Summary: Greatly improves the I/O capability of the disk, but reduces the redundancy of the disk, using a minimum of 2 disks to build

Disk space: N*n The smallest space in the block disk. Bad piece of disk data is all lost

2,RAID1, the N-block disks are divided into two groups, each time the data is stored in the first group, it will save a copy of the image to the second

Group, this greatly improves disk redundancy (since two copies of the data are saved) and improves the disk's "read" performance

(since two data can be read at the same time), but reduces the "write" ability (because it needs to be written two times).

Summary: Improved redundancy, increased read rate, reduced write rate, disk space of n*n disk in the smallest/2

At least 2 disks are required. Can break the N/2 block of the corresponding disk, at least the corresponding two pieces of disk data will be lost part

3,raid4, the N-block disk is divided into two parts (not necessarily equal to two copies), each time the data is stored in the first part

Is doing an XOR operation (that is, 11=0,00=0,10=1,01=1), and then the result exists in a second part of the disk, and the second

Part of the other disk to make a spare disk (in order to replace when the disk is broken), so that there is a disk dedicated to storage

Checksum, which greatly improves the I/O capability of the disk, but because only one disk stores the checksum, so its access pressure increases,

So it becomes a "short board", when it is broken, the first set of disks is also very large may be bad, so that the data will be lost, note

Meaning, this probability is still very large, so its redundancy is not necessarily enhanced, when a disk is broken, it will automatically downgrade.

Summary: Improves read and write rates, requires at least 3 disks, and disk space is the smallest of (N-1) *n block disks. Bad

A disc is nothing, bad two pieces of data will be lost.

3,RAID5, because RAID4 only a disk to store the results of the XOR operation, greatly increased its pressure, so RAID5

The N-block disk is cycled as a check disk, so that if the first disk is a check disc, it is right-symmetric, and the last piece is the first check

The disk is left symmetrical (the symmetric line is the result of the checksum), which greatly improves the I/O capability and redundancy of the disks, but

Both pieces of disk data will be lost.

Summary: Improves read and write redundancy, requires at least 3 disks, disk space is (N-1) *n block disk in the smallest

A bad piece of disk is allowed, but not at the same time two blocks bad.

4,RAID10, the N-block disks are divided into two groups by RAID1, and the two groups are divided into RAID0, so that the data is stored in one copy

There are two groups (RAID0), and then RAID1 one copy of each group to save a copy of the disk on one disk to the next

Block, this is a good way because the probability of a bad adjacent two disk is much smaller.

Summary: Improves read and write rates, improves redundancy, requires at least 4 disks, disk free space is n*n block disk

The smallest/2 is not allowed to be bad at the same time bad for the adjacent two-block disk.

5,RAID01, the N-block disks are first RAID0 and then RAID1, so that the data is stored in the first group for each copy.

A copy of the image is stored in the second copy, and then the data and the image are stored in each disk in their group in the RAID0 Way,

The RAID0 storage in the two groups is not guaranteed to be identical, so it only runs the same bad disk.

Summary: Improve the read and write rate, improve the redundancy. Requires at least 4 disks, disk space is the smallest of the N*n block disks/2

Two disks are not allowed to be damaged at the same time.

6,raid6, like RAID5, just loops two blocks as a check disk.

Summary: Improved fault tolerance, enhanced read and write capability, free space (N-2) * Minimum, minimum number of disks is 4

Two disks are not allowed to be damaged at the same time.

Mention here, RAID7 is a company's patent, its price is very expensive, JBOD will be a number of disk linear combination into a large

RAID for single data.

Soft raid

The software simulates the raid and uses the Mdadm software in Linux, which supports JBOD,RAID0,RAID1

Raid4,raid5,raid51,raid10,raid01 and so on.

Mdadm usage:

Mdadm [mode] <raid devices > [options] < Build a RAID disk or partition >

Mode:

Create:-C

Monitoring:-F

Assembly:-A

Management:-F (think corrupt),-R (remove),-a (add)

Options:

-N: Indicates a few disks to create RAID (not idle disk)

-L: Indicates the level of RAID to be created

-a{yes|no}: Indicates automatic | does not create RAID device files

-C: Chunck block size created

-X #: Number of free disks

Mdadm-d/dev/md#: Display RAID details

CAT/PROC/MDSTAT: Observing MD Status

Mdadm-s/dev/md#: Stop RAID device

Disk Management raid

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.