One, zoning
Fdisk/dev/sdb//sdb for newly added disks
M View Command Menu
Mr. N expands the partition and then generates the logical partition
L represents logical partitioning
T set partition type FD (Auto RAID) 8e represents LVM
W Save exit
P Print out partition information
The above order can be divided into a good distinction.
Partprobe//Load new partition
Partx-a/dev/sdb//centos6 above with this command, you can see the newly added partition without rebooting
FDISK-L//view partitions
Second, create raid
Create md0
Mdadm-c/dev/md0-ayes-l0-n2/dev/sdb{5..6}////raid0
Mdadm-c/dev/md1-ayes-l1-n2/dev/sdb{7..8}//raid1
Mdadm-c/dev/md5-ayes-l5-n3/dev/sdb{9..11}//-x can heat a spare
Format md0
Mkfs.ext3/dev/md0
Three, Mount raid
Test
Mount/dev/md0/raid0
Unmout/dev/md0
Mount-a
Add Fstab
/DEV/MD0/RAID0 ext3 defaults 0 0
Add this configuration, otherwise reboot and find md0
echo device/dev/sdb[56] >/etc/mdadm.conf
Mdadm–detail–scan >>/etc/mdadm.conf
If an error occurs during reboot
Mdadm–stop/dev/md0
Four, the RAID5 test partition is broken
cp-rf/etc/*/raid5/
DD If=/dev/zero of=/raid5/file bs=1m count=100
Mdadm–manage/dev/md5–fail/dev/sdb11
Mdadm–manage/dev/md5–add/dev/sdb12–remove/dev/sdb11//sdb11 broken, put on SDB12
Mdadm:added/dev/sdb12
Vim/etc/amadm.conf also remember to add SDB12
V. View raid
Cat/proc/mdstat