Software RAID And GRUB On CentOS 7

Home » CentOS » Software RAID And GRUB On CentOS 7
CentOS 5 Comments


When I perform a software RAID 1 or RAID 5 installation on a LAN server with several hard disks, I wonder if GRUB already gets installed on each individual MBR, or if I have to do that manually. On CentOS 5.x and 6.x, this had to be done like this:

# grub grub> device (hd0) /dev/sda grub> device (hd1) /dev/sdb grub> root (hd0,0)
grub> setup (hd0)
grub> root (hd1,0)
grub> setup (hd1)
grub> quit

I’d like my server to be able to boot a degraded software RAID after an eventual hard disk failure.

Any suggestions?

Niki Kovacs

Microlinux – Solutions informatiques durables
7, place de l’église – 30730 Montpezat Web : Mail : Tél. : 04 66 63 10 32

5 thoughts on - Software RAID And GRUB On CentOS 7

  • I have an aging FC14 (!!!!) system, w/ mdadm RAID partitions. I have
    /boot setup as mdadm RAID1’s, 2 drives (actually partitions). Machine boots AOK, & I believe it does (& maintains) that setup automatically. I
    got that recommendation from a mailing list ages ago, can’t remember where, sorry. $0.02, no more, no less ….

    [root@Q6600:/etc, Thu Aug 11, 08:25 AM] 1018 # df -h Filesystem Type Size Used Avail Use% Mounted on
    /dev/md1 ext4 917G 8.0G 863G 1% /
    tmpfs tmpfs 4.0G 0 4.0G 0% /dev/shm
    /dev/md0 ext4 186M 60M 117M 34% /boot
    /dev/md3 ext4 1.8T 1.4T 333G 81% /home
    [root@Q6600:/etc, Thu Aug 11, 08:26 AM] 1019 # uname -a Linux Q6600 #1 SMP Wed Nov 23 13:07:52 UTC
    2011 x86_64 x86_64 x86_64 GNU/Linux
    [root@Q6600:/etc, Thu Aug 11, 08:26 AM] 1020 #

  • I too use this kind of set up. however I do not believe that anything on the MBR is updated automatically by any yum/rpm updates. Thus in this kind of a setup, one needs to take manual steps. HTH

  • Anaconda will install grub2 to each component device for BIOS boot on RAID levels 0, 1, 4, 5, 6, and 10. Under EFI, only RAID1 is supported.

  • $ sudo grep grub2 /var/log/anaconda/program.log

    This will get you the commands the installer used for installing the bootloader.

    Chris Murphy