If RAID5 is damaged in the Centos system, the data is automatically switched to the backup disk.

Source: Internet
Author: User

RAID5 + disk quota, 1 disk, simulation of 5 disks in five partitions, four of which are made into RAID 5 partitions, the remaining one as a redundant disk, mounted to the/data1 directory, when one disk is damaged, the redundant disk status automatically changes to active. (You can also mount five disks, with the same effect .) For details about how to create a disk, see

Http://dreamfire.blog.51cto.com/418026/1084729

Note: In a real production environment, RAID volumes are implemented through real disks, and the software implementation is not stable enough. We do not recommend that you use RAID volumes. This experiment demonstrates how RAID5 works.

Run the mdadm command to create the disk array RAID 5 (Note: RAID should have at least three disks. Here we simulate four disks and one hot backup)

-C: Create a RAID block device after the RAID block device name-l 5: specify the number of RAID 5-n 4 used to create a RAID 5 disk, that is, the number of active disks. raid5 has at least three disks, -x 1 Number of backup disks,

View the disk array creation, it can be seen that the sdb5-sdb8 is RAID5, sdb9 is hot standby.

Format the RAID5 md0 disk array.

Use mount

Simulate a disk that is damaged by sdb8.

We can see that sdb8 is changed to faulty space, and hot standby sdb9 quickly replaces sdb8 and becomes active.

This article is from the blog of "the Linux open source technology blog", please be sure to keep this source http://dreamfire.blog.51cto.com/418026/1085175


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.