RAID5 Simulation Experiment

Source: Internet
Author: User

Experiment topic: Create a RAID5 device with free space of 15g, boot automatically mount to /mnt/mydata

Here are the commands to use:

The implementation of software RAID on CENTOS6:

Combined with MD (multi devices) in the kernel

Syntax format for commands: mdadm [mode] <raiddevice> [options> <component-devices>

Supported RAID levels: LINEAR, RAID0, RAID1, RAID4, RAID5, RAID6, RAID10

Mode:

Create:-C

Assembly:-A

Monitoring:-F

Management:-F,-R,-a

<raiddevice>:/dev/md#

<component-devices>: any block device

-C: Create pattern

-N #: Create a secondary RAID using # block devices;

-1 #: Indicates the level of RAID to be created

-A {yes/no}: automatically creates a device file for the target RAID device.

-C Chunk_size: indicates block size

-X #: Indicates the number of free disks


-D: Show raid details

Mdadm-d/DEV/MDX

Management mode:

-F: Flag execution disk corruption

-A: Adding disks

-R: Remove disk

To view the status of MD:

Cat/proc/mdstat

To stop the MD device:

Mdadm-s/dev/md#

Watch command:

-N #: Refresh interval, unit is seconds;

Watch-n # ' COMMAND '


Experiment begins:

1>. See if there is free disk space

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/85/49/wKioL1efEgDDMTKgAAAgJJb4dIU292.png "title=" Capture 1. PNG "alt=" Wkiol1efegddmtkgaaagjjb4diu292.png "/>

2>. Partition the disk with the FDISK/DEV/SDB command. Create 4 partitions of 5g as the disks used to simulate the later experiments.

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/85/49/wKioL1efE7OTF40cAAAy41l_eQI239.png "title=" Capture 2. PNG "alt=" Wkiol1efe7otf40caaay41l_eqi239.png "/>

3>. Modify the format of the partition, modify the format of the partition to "FS", and see if the format is modified.

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/85/49/wKiom1efFLzxj1PdAAA0XdH_pTk115.png "title=" 1.PNG " alt= "Wkiom1efflzxj1pdaaa0xdh_ptk115.png"/>

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/85/49/wKioL1efFXDR7NbhAAAdU-zW3vU404.png "title=" 2.PNG " alt= "Wkiol1effxdr7nbhaaadu-zw3vu404.png"/>

4>: Use Mdadm to create a raid. 650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/85/49/wKiom1efFsiAaQYYAAAP5N86eQY811.png "title=" 4.PNG " alt= "Wkiom1effsiaaqyyaaap5n86eqy811.png"/>

5> Dynamic View Watch-n 1 Cat/pro/mdstat, 8%, indicating that the corresponding number of digits is being matched.

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/85/49/wKioL1efFwbQQMTbAAAhLinrEBU156.png "title=" 3.PNG " alt= "Wkiol1effwbqqmtbaaahlinrebu156.png"/>

6>. Re-read/dev/md0 via Partx

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/85/49/wKioL1efGBOgbiGWAAAHfSx5e9A281.png "title=" 5.PNG " alt= "Wkiol1efgbogbigwaaahfsx5e9a281.png"/>

7>. View/dev/md0 devices (RAID 5 devices)

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/85/49/wKiom1efGKWzhXu_AABYOPu_kY0214.png "title=" 6.PNG " alt= "Wkiom1efgkwzhxu_aabyopu_ky0214.png"/>

8>. Format, mount, use

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/85/49/wKiom1efGS-TjnZuAABA63Y46bQ654.png "title=" 7.PNG " alt= "Wkiom1efgs-tjnzuaaba63y46bq654.png"/>

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/85/4A/wKiom1efGhyQzriqAAApPPWk4jg814.png "title=" 8.PNG " alt= "Wkiom1efghyqzriqaaapppwk4jg814.png"/>

9>. The following is a disk corruption of the emulated disk, viewing the state of the md0, and replacing the damaged disk with the free disk.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/85/4A/wKioL1efGwmRxPX4AAAKRwBQ0Cc281.png "title=" 12.PNG "alt=" Wkiol1efgwmrxpx4aaakrwbq0cc281.png "/>

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/85/4A/wKiom1efG0DSIpzyAABazdcBTT4398.png "title=" 9PNG. PNG "alt=" Wkiom1efg0dsipzyaabazdcbtt4398.png "/>

10>. Simulate damage to two disks, view md0

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/85/4A/wKiom1efHYWiRhbyAAALS5Aes20869.png "title=" 10.PNG "alt=" Wkiom1efhywirhbyaaals5aes20869.png "/>

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/85/4A/wKioL1efHXbQAD8-AABa7Iy1LIc082.png "title=" 11.PNG "alt=" Wkiol1efhxbqad8-aaba7iy1lic082.png "/>

11>. Simulation using File system, file system is available

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/85/4A/wKioL1efHeegsQMdAAAWVO4MJhY509.png "title=" 13.PNG "alt=" Wkiol1efheegsqmdaaawvo4mjhy509.png "/>

13>. Simulating damage to 3 disks, simulating the use of the file system, it is clear that the file system has not been used.

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/85/4A/wKiom1efHmLzfJ3jAAAKu0O9i4I304.png "title=" 15.PNG "alt=" Wkiom1efhmlzfj3jaaaku0o9i4i304.png "/>

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/85/4A/wKiom1efHsvQbDEeAAAYVvORSZE315.png "title=" 20.PNG "alt=" Wkiom1efhsvqbdeeaaayvvorsze315.png "/>

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/85/4A/wKioL1efHxLizVMEAAAOSVAeZBs691.png "title=" 21.PNG "alt=" Wkiol1efhxlizvmeaaaosvaezbs691.png "/>




RAID5 Simulation Experiment

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.