代码改变世界

Linux_RAID

2015-11-23 21:22  云物互联  阅读(120)  评论(0编辑  收藏  举报

目录

RAID

Description: Lots of disk combination become a more big virtual disk by RAID, and it will have more fast I/O speed.

Create RAID

mdadm -C /dev/md[0|10|5|1] -l 10 -n[Number] -x 2 /dev/sb{a..z}
    -l level
    -n diskCount
    -x hotSpare

Check RAIDinfo and syncSchedule

mdadm -D /dev/mdName

Remove disk member from RAID

mdadm /dev/mdName -f /dev/sdMemberName  # Manual assign fault device
mdadm /dev/mdName -r /dev/sdMemerName   # Remove the fault device

Add RAID device

mdadm /dev/mdName -a /dev/sdMemberName

Stop/delete RAID

mdadm -D -s > /etc/mdadm.conf #create new config file -s:--scan
mdadm -S /dev/mdName --> stop/delete RAID
mdadm -As /dev/mdName -->restart RAID

Re-add the hot spare to RAID

mdadm -G /dev/mdName -n 6 #RAID10 not support.