基本知识讲解请参考鸟哥的私房菜基础篇第三版,知识很详细,这里就不多说了。
(1) 创建LVM
步骤一:再新建5块10MB SCSI的硬盘
这一步和上一步制作raid的操作是一样的,请参见上一篇
步骤二:用4块硬盘做raid5+1hostspare
mdadm --create --auto=yes /dev/md1 --level=5 --raid-devices=4 --spare-device=1 /dev/sdc{5,6,7,8,9}
注意:这次我们创建raid起名为/dev/md1(上次为/dev/md0)
步骤三:查看RAID组成情况
[root@compute-0 mnt]# mdadm --detail /dev/md* mdadm: /dev/md does not appear to be an md device /dev/md0: # 上次RAID实验创建的 Version : 1.2 Creation Time : Fri Mar 22 04:41:39 2013 Raid Level : raid5 Array Size : 480768 (469.58 MiB 492.31 MB) Used Dev Size : 160256 (156.53 MiB 164.10 MB) Raid Devices : 4 Total Devices : 5 Persistence : Superblock is persistent
Update Time : Fri Mar 22 05:44:28 2013 State : clean Active Devices : 4 Working Devices : 5 Failed Devices : 0 Spare Devices : 1
Layout : left-symmetric Chunk Size : 512K
Name : compute-0:0 (local to host compute-0) UUID : d81cdfce:03d33c89:ffe54067:44e19b55 Events : 18
Number Major Minor RaidDevice State 0 8 21 0 active sync /dev/sdb5 1 8 22 1 active sync /dev/sdb6 2 8 23 2 active sync /dev/sdb7 5 8 24 3 active sync /dev/sdb8
4 8 25 - spare /dev/sdb9 /dev/md1: #这次我们新创建的 Version : 1.2 Creation Time : Fri Mar 22 04:42:44 2013 Raid Level : raid5 Array Size : 480768 (469.58 MiB 492.31 MB) Used Dev Size : 160256 (156.53 MiB 164.10 MB) Raid Devices : 4 Total Devices : 5 Persistence : Superblock is persistent
Update Time : Fri Mar 22 05:44:31 2013 State : clean Active Devices : 4 Working Devices : 5 Failed Devices : 0 Spare Devices : 1
Layout : left-symmetric Chunk Size : 512K |