LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-14-2021, 01:26 PM   #1
furface
Member
 
Registered: Dec 2009
Posts: 40

Rep: Reputation: 1
Boot from either RAID 1 drive in Centos 8


Hello, I installed a new Centos 8 distribution with 2 RAID1 mirrors. I want to be able to boot to either of the disks in case one fails. One boots, but not the other. Is there a way to enable this functionality? In previous distributions, either disk seemed to be able to boot. This is some info on my setup. Thanks.

[root@localhost ~]# cat /proc/mdstat
Personalities : [raid1]
md125 : active raid1 sdb2[1] sda3[0]
1047552 blocks super 1.2 [2/2] [UU]
bitmap: 0/1 pages [0KB], 65536KB chunk

md126 : active raid1 sdb1[1] sda2[0]
31246336 blocks super 1.2 [2/2] [UU]

md127 : active raid1 sdb3[1] sda4[0]
3874570240 blocks super 1.2 [2/2] [UU]
bitmap: 4/29 pages [16KB], 65536KB chunk

unused devices: <none>
[root@localhost ~]# cat /etc/fstab

#
# /etc/fstab
# Created by anaconda on Wed Jan 13 19:41:53 2021
#
# Accessible filesystems, by reference, are maintained under '/dev/disk/'.
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info.
#
# After editing this file, run 'systemctl daemon-reload' to update systemd
# units generated from this file.
#
UUID=ef06be6d-d895-4da5-b597-c69cace09da4 / xfs defaults 0 0
[root@localhost ~]#
0 0
UUID=a3077ef9-f8c1-4807-acf9-86b501fb9490 none swap defaults 0 0
[root@localhost ~]# df
Filesystem 1K-blocks Used Available Use% Mounted on
devtmpfs 16309916 0 16309916 0% /dev
tmpfs 16329824 0 16329824 0% /dev/shm
tmpfs 16329824 9060 16320764 1% /run
tmpfs 16329824 0 16329824 0% /sys/fs/cgroup
/dev/md127 3872678360 28960048 3843718312 1% /
/dev/md125 1041288 202008 839280 20% /boot
tmpfs 3265964 0 3265964 0% /run/user/0
[root@localhost ~]#
 
Old 01-14-2021, 03:29 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,157

Rep: Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125
Should be as simple as "grub-install /dev/sdb" all things being equal. Mind you, I haven't done this on a UEFI/systemd setup; never had the need. The fact that booting with just one disk works shows the initrd is setup to handle degraded (as it should), so hopefully the above should be a simple fix.
 
1 members found this post helpful.
Old 01-19-2021, 11:36 AM   #3
furface
Member
 
Registered: Dec 2009
Posts: 40

Original Poster
Rep: Reputation: 1
Hello, thank you. It's a little confusing to me. I tried grub2-install and got this:

[root@localhost /]# grub2-install /dev/sdb
Installing for i386-pc platform.
grub2-install: warning: ../grub-core/partmap/gpt.c:192:this GPT partition label contains no BIOS Boot Partition; embedding won't be possible.
grub2-install: error: embedding is not possible, but this is required for RAID and LVM install.

It seems like it needs a BIOS boot partition. When we set RAID up there was 1 BIOS boot partition that Centos Stream (8) demanded. It was only on 1 partition, and it wouldn't let us mirror it. I wonder if it doesn't like the UEFI setup on our somewhat old motherboard. However, it won't boot on a BIOS-only mobo. I think I'm going to try the install again with a newer motherboard, and hopefully it won't put the BIOS boot partition in.

Thanks.
 
Old 01-19-2021, 02:07 PM   #4
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,400

Rep: Reputation: 1595Reputation: 1595Reputation: 1595Reputation: 1595Reputation: 1595Reputation: 1595Reputation: 1595Reputation: 1595Reputation: 1595Reputation: 1595Reputation: 1595
for grub to install to a gpt disk a 1M partition cleared/unformatted flagged bios-boot/bios-grub is required. On a few distros, don't remember which, adding --force will force grub to install to a gpt disk without the biosgrub partition.
 
Old 01-25-2021, 01:44 PM   #5
furface
Member
 
Registered: Dec 2009
Posts: 40

Original Poster
Rep: Reputation: 1
Thanks. I think what my main problem was is that I didn't boot the USB flash drive installer into UEFI mode. Doing that allowed me to create RAID1 partitions for /boot/efi. It booted fine with both disks, but then when I tried to run single disk experiments, it didn't boot from either disk. At least BIOS boot booted from one of the disks.

I'll look into suggestions here about trying to get BIOS boot working with RAID1. However, Censos Stream seems a bit dicey to me at this point. I may do a Centos 7 install and wait for Rocky Linux.

Thank you.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows 10 Not listed in Grub, can't boot from drive either Streblo Linux - Software 8 11-09-2016 08:12 AM
RAID 10 or RAID 5 - boot with RAID 1 - looked everywhere cognizance Linux - Newbie 8 06-11-2009 05:25 PM
Either bad raid card or bad drives... mcd Linux - Hardware 4 09-12-2008 06:26 PM
dual boot w/ XP & mandrake 10.2: won't boot either dandelvec33 Mandriva 12 04-12-2005 08:40 AM
Can't Boot off of either RAID drive HELP!! rootking Linux - Hardware 1 11-03-2004 08:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration