[root@192_168_11_203 tmp]# cat /proc/mdstat 查看做raid情况
Personalities : [raid1]
md0 : active raid1 sdc[1] sdb[0]
998891520 blocks super 1.2 [2/2] [UU]
bitmap: 2/8 pages [8KB], 65536KB chunk
unused devices: <none>
[root@192_168_11_203 ~]# fdisk -l
Disk /dev/sdb: 1023.0 GB, 1022999134208 bytes
Disk /dev/sdc: 1023.0 GB, 1022999134208 bytes
Disk /dev/sdd: 899.0 GB, 898999779328 bytes
Disk /dev/sde: 899.0 GB, 898999779328 bytes
Disk /dev/sda: 299.0 GB, 298999349248 bytes
Disk /dev/md0: 1022.9 GB, 1022864916480 bytes
[root@192_168_11_203 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 30G 4.8G 24G 17% /
tmpfs 64G 4.0K 64G 1% /dev/shm
/dev/sda1 190M 47M 133M 27% /boot
/dev/md0p1 938G 132G 759G 15% /data <--- /dev/md0: 1022.9 GB
/dev/sdd1 824G 73M 783G 1% /backup <--- /dev/sdd: 899.0 GB
/dev/sde1 824G 11G 773G 2% /logs <--- /dev/sde: 899.0 GB
[root@192_168_11_203 ~]# cat /etc/fstab
/dev/md0p1 /data ext4 defaults 0 0
/dev/sdd1 /backup ext4 defaults 0 0
/dev/sde1 /logs ext4 defaults 0 0
###################创建软RAID0
###分区
fdisk /dev/sdb
n/p/1/+50M/w
fdisk /dev/sdc
n/p/1/+50M/w
###安装软raid工具
下载mdadm
http://download.chinaunix.net/down.php?id=28095&ResourceID=6641&site=1
tar jxf mdadm-3.0.tar.bz2
make
make install
###做软raid
mdadm -C --verbose /dev/md0 --level=1 --raid-devices=2 /dev/sdb2 /dev/sdc2
y
###查看是否有:/dev/md0
fdisk -l
###格式化
mkfs.ext4 /dev/md0
###查看raid信息
mdadm -D /dev/md0
cat /proc/mdstat
###挂载
mkdir /mdata
mount /dev/md0 /mdata
### df -h 查看
/dev/md0 80M 1.6M 74M 3% /mdata
参考:http://www.ibm.com/developerworks/cn/linux/l-cn-raid/#resources