Many people are having problems with hardware RAID1 (Mirror RAID) & CentOS 6.4

Especially if you are using a controller with the Marvel  88SE9128 Chipset

You will get an error along the lines of this –  lvcreate failed for vg_hostname

There are plenty of posts out there saying “format the drives” “delete all partitions” blah blah waste of time it won’t work.
If you really want a hardware raid go back to CentOS 5.9 but that doesn’t help at all as the new PHP & other software updates requires CentOS 6.x

So how can you get a Mirror RAID solution with CentOS 6.x?
The Answer is a Software RAID… I know I know, it made me cringe as well but its the only solution to this.

 

Boot up your server making sure both hard drives are connected & not in a raid & boot off the CentOS 6.x DVD. (make sure all partitions have been deleted off the HDD’s before installation)

 

Select the first install/ upgrade option

centos6.4

follow the prompts & setup your installation as needed

once you get to the type of installation page select Create Custom Layout

type of installation

You will now see the 2 drives available that you want for the mirror RAID Array (in my case I am using a virtual machine *VBOX* so I created 2 20GB virtual drives for this guide)

Select a Drive

Click Create & select RAID Partition

Select a Drive2

Create a RAID partition on both drives. (I created a 500mb Boot partition & what ever is remaining is my second partition for the CentOS install etc)

Select a Drive3

Once you have what you see in the picture Click Create again but this time select RAID Device

Select a Drive4

The first RAID Device I will create will be for /boot  (you select the 2 500mb partitions & set the mount point to /boot)

Select a Drive5

The next RAID Device I will create will be the Physical Volume (LVM)

Select a Drive6

Once this is done you need to Create the LVM Volume Group (click create again to get this option)

Select a Drive7

Click Add & create a small volume for SWAP & then add a volume for / & /home

Select a Drive8

Once that is done you should have something looking like this

Select a Drive9

& there you go a complete Software MIRROR RAID solution for CentOS 6.4

Click next & it will give you the usual prompts asking if you are sure you want to format the drives. Continue as per normal install after this.

 

If at anytime you want to check how the RAID ARRAY is going use terminal & the following command

cat /proc/mdstat