Linux系统基于分区的软raid实现概要
kenthy#qingdaonews.com 2007-01-09
1. 使用fdisk创建四个相同大小的硬盘分区,修改类型id为fd
#vi /etc/raidtab
raiddev /dev/md0
raid-level 5
nr-raid-disks 3
nr-spare-disks 1
chunk-size 4
parity-algorithm left-symmetric
device /dev/sda3
raid-disk 0
device /dev/sdb3
raid-disk 1
device /dev/sdc1
raid-disk 2
device /dev/sdd1
spare-disk 0
2. 创建raid分区
#mkraid /dev/md0
#lsraid -a /dev/md0
#mkfs -t ext3 /dev/md0
#mount /dev/md0 /mnt/raid
#df -hT
3. 验证恢复机制
#dd if=/dev/zero of=/dev/sdc1 bs=1M count=99999999
#lsraid -a /dev/md0
#umount /dev/md0
#raidstop /dev/md0
#raidstart /dev/md0
#lsraid -a /dev/md0
阅读(1006) | 评论(0) | 转发(1) |