LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-15-2014, 12:12 PM   #1
jeffboyce
LQ Newbie
 
Registered: Dec 2014
Posts: 2

Rep: Reputation: Disabled
CentOS 7, Make second disk of RAID1 bootable


Greetings -

I have a CentOS 7 KVM host system recently 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, does not reference UEFI booting, discusses dual booting situations, or puts /boot within the RAID. None of those solutions directly apply to my situation. I am not a Linux newbie, but am a novice Linux administrator for a small company without a mentor. 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.

Thanks.
Jeff
 
Old 12-16-2014, 06:17 AM   #2
Soadyheid
Senior Member
 
Registered: Aug 2010
Location: Near Edinburgh, Scotland
Distribution: Cinnamon Mint 20.1 (Laptop) and 20.2 (Desktop)
Posts: 1,669

Rep: Reputation: 485Reputation: 485Reputation: 485Reputation: 485Reputation: 485
Welcome to LinuxQuestions!

I reckon the mere fact that you have set the two discs up as RAID 1 means that the system would automatically boot from the good disk should the other fail. I don't think you have to do anything manually, though I'll wait for somebody to correct me. (However, you should be able to pick which one to boot from if required as they're mirrored and therefore identical)

Play Bonny!


Last edited by Soadyheid; 12-16-2014 at 06:18 AM. Reason: Added a bit...
 
Old 12-16-2014, 09:46 AM   #3
jeffboyce
LQ Newbie
 
Registered: Dec 2014
Posts: 2

Original Poster
Rep: Reputation: Disabled
No the disks are not set up as RAID1. The partitions sda3 and sdb3 are set up as RAID1, with sda1 as /boot/efi and sda2 as /boot. According to the documentation /boot/efi can not be on software RAID, and the RH/Centos installer does not put /boot on a RAID. Therefore I have both /boot/efi and /boot outside the RAID1. The first two partitions on the second disk are the exact same layout as the first disk so that I can have a copy of the /boot/efi and /boot mount points and directories on the second disk. That is the objective of my question; how to properly get /boot/efi and /boot onto the second disk partitions without messing up my system, and in such a way that the system boots from the second disk if the fist one fails. Thanks.

Jeff
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make USB Flash drive bootable in Centos sols2008 Linux - Server 3 09-09-2010 12:48 PM
Need to make the primary complex of an ntfs raid1 array bootable again. oskar Linux - General 3 07-26-2010 10:02 PM
How to make Linux Bootable Disk gardenair Linux - Newbie 6 07-11-2005 04:42 PM
How do you make red hat bootable disk? randon Linux - General 2 09-20-2003 05:40 PM
how to make Redhat7.3 a bootable disk jeffy240 Linux - Newbie 2 10-16-2002 09:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:16 PM.

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