> 文章列表 > 在CentOS上创建 Software RAID 10的详解

在CentOS上创建 Software RAID 10的详解

昨天重装一台老服务器的时候发现 Intel hardware RAID 控制卡有问题,不能识别所有硬盘,但是安装操作系统过程中可以识别所有硬盘,还有一个问题就是操作系统安装正常,但是安装完后无法启动,某种原因导致 BIOS 不能从硬盘启动系统。所以打算把操作系统安装到一个 USB 盘上,然后从 USB 盘启动系统,并给上面的6块硬盘做成 Software RAID 10 后挂载到系统里用。

做 Software RAID 不要求硬盘都一模一样,但是强烈推荐用同一厂商、型号和大小的硬盘。为啥 RAID 10,不选 RAID0, RAID1, RAID5 呢?答:RAID0 太危险,RAID1 性能稍逊一些,RAID5 频繁写情况下性能差,RAID10 似乎是当今磁盘阵列的最佳选择,特别适合做 KVM/Xen/VMware 虚拟机母机(host)的本地存储系统(如果不考虑 SAN 和分布式存储的话)。

这台服务器上有6块完全相同的硬盘,给每块硬盘分成一个区,分区格式为 Linux software raid:

# fdisk /dev/sdaWARNING: DOS-compatible mode is deprecated. It\'s strongly recommended toswitch off the mode (command \'c\') and change display units tosectors (command \'u\').Command (m for help): nCommand action   e   extended   p   primary partition (1-4)pPartition number (1-4): 1First cylinder (1-91201, default 1):Using default value 1Last cylinder, +cylinders or +size{K,M,G} (1-91201, default 91201):Using default value 91201Command (m for help): pDisk /dev/sda: 750.2 GB, 750156374016 bytes255 heads, 63 sectors/track, 91201 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0x0005c259   Device Boot      StartEnd      Blocks   Id  System/dev/sda1    1       91201   732572001   83  LinuxCommand (m for help): tSelected partition 1Hex code (type L to list codes): fdChanged system type of partition 1 to fd (Linux raid autodetect)Command (m for help): wThe partition table has been altered!Calling ioctl() to re-read partition table.Syncing disks.