软RAID实践操作:
1.首先我们要准备4个分区,其中三个用于RAID5的组成部分,剩余一个用于做空闲的RAID磁盘,防止RAID5中一块硬盘发生错误时,能够及时的顶替上。
[iyunv@localhost ~]# fdisk /dev/sda
Command (m for help): n
First cylinder (8513-15665, default 8513): 5
Value out of range.
First cylinder (8513-15665, default 8513):
Using default value 8513
Last cylinder, +cylinders or +size{K,M,G} (8513-15665, default 15665): +5G
Command (m for help): t
Partition number (1-7): 5
Hex code (type L to list codes): fd
Changed system type of partition 5 to fd (Linux raid autodetect)
Command (m for help): p
Disk /dev/sda: 128.8 GB, 128849018880 bytes
255 heads, 63 sectors/track, 15665 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0008ea5a
Device Boot Start End Blocks Id System
/dev/sda1 * 1 26 204800 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 26 7859 62914560 8e Linux LVM
/dev/sda3 7859 8512 5252256 fd Linux raid autodetect
/dev/sda4 8513 15665 57456472+ 5 Extended
/dev/sda5 8513 9166 5253223+ fd Linux raid autodetect
/dev/sda6 9167 9820 5253223+ fd Linux raid autodetect
/dev/sda7 9821 10474 5253223+ fd Linux raid autodetect
通过以上命令准备好我们将要使用的分区
[iyunv@localhost ~]# partx -a /dev/sda