How to implement soft raid in linux

Source: Internet
Author: User

In linux, how does one perform soft raid? I hope the following introduction will help and inspire my friends!
Add a 10 Gb hard disk to the Virtual Machine System as sdb, divide the hard disk into five logical disks: sdb {5, 6, 7, 8, 9}, and the size of each disk is 1 GB.
First, use three of the hard drive sdb {5, 6, 7} to create raid5, and sdb8 as the hot backup disk.
Then, take sdb6 out as the faulty disk, then pull out sdb6, and insert the new disk sdb9.
Command: mdadm-C/dev/md0-l5-n3-x1/dev/sdb {5, 6, 7, 8}
The preceding command creates a RAID 5 with 2 GB space. Drive letter:/dev/md0

There are two ways to view the creation result:
1. mdadm -- detail/dev/md0
2. cat/proc/mdstart
The commonly used raid levels include 0, 1, 5, 6, and 10. You only need to modify the value of-l ().
Command for Fault test: mdadm -- manage/dev/md0-f/dev/sdb6-r/dev/sdb6-a/dev/sdb9
-F = -- fail-r = -- remove-a = -- add.

You can mount and edit the fstab file to enable persistent mounting. However, if you delete a created raid, you need to detach it and use
Command: after the raid is stopped by mdadm-S/dev/md0, delete each disk. Where-S = -- stop

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.