RAID
Posted dinghailong128
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了RAID相关的知识,希望对你有一定的参考价值。
RAID10:
[root@localhost ~]# mdadm -Cv /dev/md0 -a yes -n 4 -l 10 /dev/sd[b-e]
[root@localhost ~]# mdadm -Q /dev/md0 (简要查看)
[root@localhost ~]# mdadm -D /dev/md0 (详细查看)
[root@localhost ~]# mkfs.xfs /dev/md0
[root@localhost ~]# mkdir /haha
[root@localhost ~]# mount /dev/md0 /haha
[root@localhost ~]# df –h
[root@localhost ~]# vim /etc/fstab
/dev/md0 /haha xfs defaults 0 0
[root@localhost ~]# cd /haha
[root@localhost haha]# ls
[root@localhost haha]# cp -rf /etc/* ./
[root@localhost haha]# ls
[root@localhost ~]# mdadm /dev/md0 -f /dev/sdb
[root@localhost ~]# mdadm -D /dev/md0
[root@localhost ~]# umount /haha
[root@localhost ~]# mdadm /dev/md0 -a /dev/sdb
mdadm: added /dev/sdb
[root@localhost ~]# mdadm -D /dev/md0
[root@localhost ~]# mount -a
[root@localhost ~]# df -h
RAID5:
[root@localhost ~]# ls -l /dev/sd*
[root@localhost ~]# mdadm -Cv /dev/md0 -n 3 -l 5 -x 1 /dev/sd[b-e]
[root@localhost ~]# mdadm -D /dev/md0
[root@localhost ~]# mkfs.ext4 /dev/md0
[root@localhost ~]# mkdir /hoho
[root@localhost ~]# mount /dev/md0 /hoho
[root@localhost ~]# df -h
[root@localhost ~]# vim /etc/fstab
以上是关于RAID的主要内容,如果未能解决你的问题,请参考以下文章