[CentOS] Centos 7 how to make second disk of RAID1 bootable

Jeff Boyce

jboyce at meridianenv.com
Fri Dec 12 21:46:02 UTC 2014


Greetings -

Ok, I have my CentOS 7 KVM host system installed and I want to be able to 
boot the system from either installed drive if one of them fails.  My 
objective is to have the following layout for the two 3 TB disks.

sda1  /boot/efi
sda2  /boot
sda3  RAID1 with sdb3

sdb1  /boot/efi
sdb2  /boot
sdb3  RAID1 with sda3

The system is installed and boots from sda[1,2] and md127 (sda3 and sdb3). 
sdb[1,2] were untouched during the installation, and had been partitioned as 
FAT32 prior to the installation exactly the same as sda[1,2] using GParted. 
A GPT partition table was added to both disks before partitioning.  The 
current partition information for my two drives is:

Disk /dev/sda: 5860533168 sectors, 2.7 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): 0C26A36C-3857-4E97-85CC-2D4E57F4015A
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 5860533134
Partitions will be aligned on 2048-sector boundaries
Total free space is 2925 sectors (1.4 MiB)
Number Start (sector) End (sector) Size Code Name
1 2048 1026047 500.0 MiB EF00 EFI System Partition
2 1026048 2050047 500.0 MiB 0700
3 2050048 5860532223 2.7 TiB FD00

Disk /dev/sdb: 5860533168 sectors, 2.7 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): A3F0F6C1-A395-4A24-8940-BDE803E5D073
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 5860533134
Partitions will be aligned on 2048-sector boundaries
Total free space is 2925 sectors (1.4 MiB)
Number Start (sector) End (sector) Size Code Name
1 2048 1026047 500.0 MiB 0700
2 1026048 2050047 500.0 MiB 0700
3 2050048 5860532223 2.7 TiB FD00

sda1 and sda2 were reformatted during installation; with sda1 showing in 
GParted now as FAT16 and a boot flag, and sda2 showing as XFS without a boot 
flag.  sdb[1,2] still show as FAT32 and have no files on them.

What is the simplest and least error-prone way to make my second drive (sdb) 
bootable if the first drive (sda) were to fail?  I have done a lot of 
Googling over the last few days to try and understand what needs to be done, 
and almost everything I find is outdated in that it does not reference using 
grub2, and does not reference UEFI booting.  I am open to reading more 
how-to's if someone knows of a good one that I may have missed in the 50 
plus guides I have looked at.  I suspect that this is really not that 
difficult, but the detail that I need seems to be missing in what I have 
read.

Any responses may cc me directly as I only get the daily digest.  Thanks.

Jeff Boyce
Meridian Environmental




More information about the CentOS mailing list