I'm going to install CentOS 6.4 on HP ProLiant ML310e Gen8 server. This server has fakeraid controller so i decided to use software raid. The problem is that i don't know how to correctly install GRUB and/or boot sector with software RAID 1 to get system which boot successfully in case of failure of one HDD. CentOS wiki have 2 topics concerning this question:

1) http://wiki.centos.org/HowTos/SoftwareRAIDonCentOS5

This topic describes manual installing GRUB on both HDDs and as i understood this is the most common solution, but this topic have such warning:

This article addresses an approach for setting up of software (mdraid) RAID1 at install time on systems without a true hardware RAID* controller. It is NOT supported by the CentOS project; it is NOT a recommended approach for non-hobby users

2) http://wiki.centos.org/HowTos/Install_On_Partitionable_RAID1

If you are installing a system on a partitionable RAID you can use the whole hard drive as a RAID component device, and since RAID1 is a mirror, you will be able to boot your system from any of the drives in case of failure without any additional tricks required to preserve bootloader configuration, etc.

Looks like exactly that i need, but i searched internets about Partitionable RAID and found that there are a lot of bugs with it. I even found information that this way is not supported by upstream (can't find there i saw this).

So what is the correct way to install CentOS 6.4 on software RAID 1? I would like system to boot in case of failure of one of the disks.

3 Answers 3


You should try one of this (in case you have /dev/sda and /dev/sdb in your RAID 1):

# grub-install /dev/sda
# grub-install /dev/sdb


# grub
grub> root (hd0,0)
grub> setup (hd0)
grub> root (hd1,0)
grub> setup (hd1)

After this yo can try to load system with only one drive in test purposes.


Using grub-install /dev/sdX is probably how it is intended to be done. However, I just had to rescue a CentOS 6.4 server that had that setup, but now froze at boot after its other bootable RAID 1 disk was replaced some months earlier (the server had stayed on during the meantime).

What solved the issue in my case was grub-install /dev/md0, where md0 is the RAID 1 device created from bootable disks sda & sdb.

This seems like an unreliable solution, though. My gut says that in case one disk fails, booting from md0 will fail as well.


What I have found is this: /dev/md0 is in reality the /boot partition and does not contain the MBR which stops the boot.

On my machine I can choose which hard drive to boot from via the BIOS. I do the grub install on both drives (/dev/sda and /dev/sdb) and when one of them fails I boot from the other and correct the grub.conf. You will notice that when a failure happens to hd1, the system will still boot - not so when the failure is on hd0. Looking at the grub.conf you will see the it uses hd0 normally and you have to alter it to use hd1. The MBR is not a part of th hard disk that includes /dev/sda1. The bootloader helps to 'see' locations like /dev/sda1 etc. I learned this from running OS/2 - the OS/2 fdisk had a parm that reinstalled the MBR and the documentation did a good job of explaining all of this.


  • Of course you should be using UEFI, in which case it will boot from either mirror if one is unavailable. Mar 14, 2017 at 22:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.