Linux Soft RAID overview

Source: Internet
Author: User
Tags requires hex code linux

RAID Overview

RAID is the abbreviation for a low-cost Redundant array of disks (Redundantarray of inexpensive disk), which allows multiple disks to be integrated into an array, and can be used as a single disk when applied. Depending on the technology it uses, the RAID array can be used to improve data literacy, improve data redundancy (backup), and, when one disk in the array fails, can be recovered from other disks by validating data, greatly enhancing the read-write performance and reliability of the application system data.

The more common RAID technologies include the following levels:

RAID 0: The most basic array mode, which is used as a large disk by simply composing multiple disks (at least 2 blocks) together. When accessing data, the efficiency is greatly improved by writing the data fragment simultaneously to different disks. However, there is no data redundancy in this way, and any one of the disks that is broken may cause data loss.

RAID 1: Disk mirroring technology requires a minimum of 2 disks (disk Utilization: 1/n). In this way, the data is written to multiple disks in the array, and the data on the different disks are mirrored to each other. Therefore, the data will not be lost when any one of the disks is broken.

RAID 5: By introducing data validation technology to ensure data security, a minimum of 3 disks (disk Utilization: N-1) are required.

This method does not use a fixed piece of disk to store the checksum data, but it is segmented on each disk. Therefore, after any of these disks are broken, you can also recover from the checksum data on the other disks.

Because the RAID5 array technology enhances the reliability through the data redundancy, and simultaneously writes the data through the multiple disks to improve the efficiency, has been widely used.

RAID technology that is not implemented using a hardware disk card, commonly referred to as soft raid technology. This article will use multiple partitions on different disks in the RHEL5 system to configure the RAID 5 disk array.

9.2 Build using a soft RAID disk array

In a RHEL5 system, configuring a soft RAID array can be achieved by installing the MDADM package. This package is generally the default installation of the system, if the check is not installed, from the RHEL5 system CD to find the installation can be.

[Root@localhost ~]# mount/dev/cdrom/media/cdrom/

Mount:block Device/dev/cdrom iswrite-protected, mounting read-only

[Root@localhost ~]# rpm-ivh/media/cdrom/server/mdadm-2.5.4-3.el5.i386.rpm

Preparing ... ########################################### [100%]

1:mdadm ########################################### [100%]

[root@localhost ~]# Rpm-qi Mdadm | grep "Summary"

Summary:mdadm control of Linux MD devices (software RAID array)

The following is an example of a RAID5 disk array, which explains how to use the floppy array configuration.

Prepare partitions for RAID arrays

The partitions used to make up the RAID array should be located in different disk devices, otherwise the utility value is small. The partitions have the best capacity, and the entire hard disk can be divided into one partition if necessary.

Add 4 SCSI hard disks to the Linux server, and use the Fdisk tool to divide each partition into 2GB, in order:

/DEV/SDB1,/DEV/SDC1,/DEV/SDD1,/dev/sde1. Before partitioning, be aware that no other program is using the corresponding disk. In the next section, take these 4 partitions as an example (RAID 5 requires at least 3 disks or partitions) to explain how the RAID5 disk array was created.

The partition should also change its type ID to "FD", which corresponds to "Linux raid AutoDetect", which indicates support for the RAID disk array.

[Root@localhost ~]# Fdisk/dev/sdb

......

Command (M for help): N

Command Action

E Extended

P primary partition (1-4)

P

Partition number (1-4): 1

The cylinder (1-522, default 1):

Using Default value 1

Last cylinder or +size or +sizem or +sizek (1-522, default 522): +2048m

Command (M for help): t

Selected partition 1

Hex code (type L to list codes): FD

Changed system type of partition 1 to FD (Linux raid AutoDetect)

Command (M for help): P

......

Device Boot Start End Blocks Id System

/DEV/SDB1 1 2008093+ fd Linux raid AutoDetect

Command (M for help): W

The partition table has been altered!

Calling IOCTL () to re-read partition table.

Syncing disks.

[Root@localhost ~]#

Related Article

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.