Hi,
The CentOS wiki sports a page about setting up software RAID1 on CentOS 5.x. There's a section about making both members of the RAID1 bootable by setting up GRUB on both disks.
Now I wonder how this should be done on CentOS 6.x and 7. I have two sandbox machines in my office, one running a minimal CentOS 6.6, the other one with a CentOS 7 installation.
Correct me if I'm wrong, but I guess the setup on CentOS 6.6 is similar to the one described on the wiki page for CentOS 5.x, something like:
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
Now how would that work with the new GRUB2 under CentOS 7? Or maybe it's already installed on both disks, but how would I know that?
Cheers,
Niki
On Sun, Mar 29, 2015 at 3:43 AM, Niki Kovacs info@microlinux.fr wrote:
Now how would that work with the new GRUB2 under CentOS 7? Or maybe it's already installed on both disks, but how would I know that?
grep grub2-install /path/to/anaconda/logs/program.log
I forget if it accepts two devices on a line, or if it takes separate commands. But
grub2-install /dev/sdX grub2-install /dev/sdY
That will work on BIOS.
On UEFI this is totally fakaked right now as neither GRUB upstream nor distros have a proper user friendly solution for this at all. CentOS 7's installer offers an improper user friendly solution which allows you to RAID 1 the EFI System partitions with md raid.
On UEFI, I do a post-install alteration to make it something more standard with the way upstream ought to be doing it. That means two grub.cfg's: a generic one on the ESPs that merely forwards to /boot/grub2/grub.cfg. That makes the ESP contents generic and never modified again. And then the real grub.cfg is /boot/grub2/grub.cfg which can of course then be on raid1 or raid 5 or whatever, and this is the file that gets updated when there are kernel updates.