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

Storage management-RAID

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

Share

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

The full name of RAID is Redundant Array of Inexpensive Disks, which can be interpreted as a cheap redundant array of disks. Later, the letter I in RAID was thought to be Independent, that is, a separate redundant array of disks.

The main function of RAID is to improve IO ability and disk durability through parallel reading and writing of multiple stripes.

The implementation of RAID

Hardware implementation

Organize the required disks into RAID through a hardware RAID controller or adapter, and then install OS

Rely on BIOS program to set up RAID array

Software simulation implementation

The operating system simulates the implementation of RAID by means of system call

There are several RAID operation levels:

RAID0: stripe volume-strip

At least two disks with no redundant fault tolerance

There is no waste of storage space, and each disk must provide the same size of storage space.

RAID1: mirror volume-mirror

Generally two disks, first save the data to the master disk, and then save the data to the slave disk. Therefore, the write efficiency is low, the read efficiency is slightly improved, the overall utilization of disk space is 50%, and it is redundant and fault tolerant.

RAID4:

Perform XOR operations on multiple disks to get the check value, and save it to a special disk

Even if a disk is damaged, no data will be lost

However, the IO pressure of the check disk is huge, so it is easy to form a performance bottleneck.

RAID5:

RAID4 is similar, but multiple disks are used for cyclic redundancy check, and the check values are randomly assigned to different disk stripes.

The performance of both read and write IO is significantly improved without performance bottleneck.

Disk utilization = (nmer1) / nasty 100%, so disk utilization is not 100%

RAID6:

Multiple disks perform two rounds of cyclic redundancy check, and the check values are randomly assigned to the stripes of different disks.

The performance of both read and write IO is significantly improved without performance bottleneck.

At most two disks are damaged and the data is still available.

The price is to increase the time to calculate the check value.

In addition, there is a RAID mixed level.

RAID01:

Do RAID0 first, then do RAID1

RAID10:

Do RAID1 first, then do RAID0

RAID50

RAID7: can be understood as a storage computer with its own operating system and corresponding management tools, which can be run independently

Implementing soft RAID on CentOS (rarely used, all implementing hard RAID)

The kernel provides a md module (multi disks,multi devices)

User space requires mdadm tools; to set and modify the parameters of the md kernel module

Mdadm:

Mdadm [mode] [option...]

Mode:

Create mode:-C: mode switch

-n #: explicitly tell the md module to use # disks to create RAID devices

-l #: indicates the level of RAID

-a {yes | no}: allows or disallows the system to automatically create md device files

-c CHUNK_SIZE: default is 512K

-x #: specify the number of free disks in the array

Assembly mode:-A

Management mode:-an add-r delete-f mark device failure

Miscellaneous:

-D-scan displays the details of the RAID device

Mdadm-D-scan > / etc/mdadm.conf

This profile is used for the reassembly of RAID devices

-S stop RAID device

For example, RAID0 the newly added disk

~] # mdadm-C / dev/md0-n 4-l 0-a yes / dev/sd {brecincec djiggy e}

Then create a file system and mount it for use, df-hT to see md0

Dd command: dd if=/dev/zero of=./test bs=1024 count=1000000 test device write speed (if= target large file of=/dev/null is test read speed)

RAID0 can improve the read and write speed of the hard disk.

Mdadm-S stops using md0

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