m.roth at 5-cent.us
2017-Jan-24 22:14 UTC
[CentOS] CentOS 7 install on one RAID 1 [not-so-SOLVED]
So, it installed happily. Then wouldn't boot. No problem, I'll bring it up with pxe, then chroot and grub2-install. Um, nope. I edited the device map from hd0 and hd1 being the RAID to /dev/sda and /dev/sdb, then ran grup2-install. It now tells me can't identify the filesystem on hd0, and can't perform a safety check, and gives up. What am I missing? Google is not giving me any answers.... mark
Valeri Galtsev
2017-Jan-24 22:52 UTC
[CentOS] CentOS 7 install on one RAID 1 [not-so-SOLVED]
On Tue, January 24, 2017 4:14 pm, m.roth at 5-cent.us wrote:> So, it installed happily. > > Then wouldn't boot. No problem, I'll bring it up with pxe, then chroot and > grub2-install. > > Um, nope. I edited the device map from hd0 and hd1 being the RAID to > /dev/sda and /dev/sdb, then ran grup2-install. It now tells me can't > identify the filesystem on hd0, and can't perform a safety check, and > gives up.This is an interesting logical contradiction (unless things progressed much farther than what I last read): If you want to boot off your RAID1 device you need software RAID piece of code already running, i.e. kernel already loaded, to load which which in the first place you needed md0 or whichever device to exist to load it from... The only way around that I remember people were using was: cutting small partition off the drive to keep it as a regular partition, and have /boot on it. The rest of the drive can be different partition which can participate in software RAID. For mirror (RAID-1) I remember people were cutting the same piece off the beginning of both drives, one is always active /boot (another can be maintained as a copy of it, but if you loose first drive, you will need to install grub bootsector to second drive pointing to /boot copy on that drive for loading initramdrive). Anyway, good luck. Getting hardware RAID controller will be waaay less hassle at all stages of your machine's life. Valeri> > What am I missing? Google is not giving me any answers.... > > mark > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > https://lists.centos.org/mailman/listinfo/centos >++++++++++++++++++++++++++++++++++++++++ Valeri Galtsev Sr System Administrator Department of Astronomy and Astrophysics Kavli Institute for Cosmological Physics University of Chicago Phone: 773-702-4247 ++++++++++++++++++++++++++++++++++++++++
Gordon Messmer
2017-Jan-25 00:00 UTC
[CentOS] CentOS 7 install on one RAID 1 [not-so-SOLVED]
On 01/24/2017 02:14 PM, m.roth at 5-cent.us wrote:> So, it installed happily. > Then wouldn't boot.What did the storage configuration look like, exactly? I'd guess that you put one partition on each disk, combined those in a RAID1 MD array, made than an LVM physical volume, and then created filesystems and swap on LVs. But that's a lot of guesses. Did you use MBR partitions or GPT? Are you booting under BIOS or UEFI? Where do your partitions start? Did you create a standard MD RAID volume and LVM or a partitionable RAID volume and partitions?
On Tue, 2017-01-24 at 17:14 -0500, m.roth at 5-cent.us wrote:> So, it installed happily. > > Then wouldn't boot. No problem, I'll bring it up with pxe, then chroot and > grub2-install. > > Um, nope. I edited the device map from hd0 and hd1 being the RAID to > /dev/sda and /dev/sdb, then ran grup2-install. It now tells me can't > identify the filesystem on hd0, and can't perform a safety check, and > gives up. > > What am I missing? Google is not giving me any answers.... >Surely, if you are using software RAID, then you should configure that RAID in anaconda, that will then cope with setting up the partitions to allow booting. Basically it needs a small non-RAID partition to hold /boot on the boot disk. Remember that the boot sequence is generally: BIOS reads MBR and executes it; MBR code reads kernel from /boot and executes it (yes, it's more complicated than that). If the MBR code doesn't know how to read a RAID partition, then it's going to fail, that's why you have a small non-RAID partition to hold /boot. Hardware RAID is different because it interfaces at the BIOS level so the MBR code doesn't need to know how to specifically read it. P.
On 01/24/17 19:00, Gordon Messmer wrote:> On 01/24/2017 02:14 PM, m.roth at 5-cent.us wrote: >> So, it installed happily. >> Then wouldn't boot. > > What did the storage configuration look like, exactly? I'd guess that you put > one partition on each disk, combined those in a RAID1 MD array, made than an > LVM physical volume, and then created filesystems and swap on LVs. But that's > a lot of guesses. Did you use MBR partitions or GPT? Are you booting under > BIOS or UEFI? Where do your partitions start? Did you create a standard MD > RAID volume and LVM or a partitionable RAID volume and partitions?No. Brand new machine, pulled it out of the box and racked it. NOTHING on the internal SSDs. Made an md RAID 0 on the raw disks - /dev/sda /dev/sdb. No partitions, nothing. However, when I bring it up, fdisk shows an MBR with no partitions. I can, however, mount /dev/md127p3 as /mnt/sysimage, and all is there. Did I need to make a single partition, on each drive, and then make the RAID 1 out of *those*? I don't think I need to have /boot not on a RAID. mark
Tony Mountifield
2017-Jan-25 16:46 UTC
[CentOS] CentOS 7 install on one RAID 1 [not-so-SOLVED]
In article <1485342377.3072.6.camel at biggs.org.uk>, Pete Biggs <pete at biggs.org.uk> wrote:> On Tue, 2017-01-24 at 17:14 -0500, m.roth at 5-cent.us wrote: > > So, it installed happily. > > > > Then wouldn't boot. No problem, I'll bring it up with pxe, then chroot and > > grub2-install. > > > > Um, nope. I edited the device map from hd0 and hd1 being the RAID to > > /dev/sda and /dev/sdb, then ran grup2-install. It now tells me can't > > identify the filesystem on hd0, and can't perform a safety check, and > > gives up. > > > > What am I missing? Google is not giving me any answers.... > > > > Surely, if you are using software RAID, then you should configure that > RAID in anaconda, that will then cope with setting up the partitions to > allow booting. Basically it needs a small non-RAID partition to hold > /boot on the boot disk. > > Remember that the boot sequence is generally: BIOS reads MBR and > executes it; MBR code reads kernel from /boot and executes it (yes, > it's more complicated than that). If the MBR code doesn't know how to > read a RAID partition, then it's going to fail, that's why you have a > small non-RAID partition to hold /boot. > > Hardware RAID is different because it interfaces at the BIOS level so > the MBR code doesn't need to know how to specifically read it.If you are using RAID 1 kernel mirroring, you can do that with /boot too, and Grub finds the kernel just fine. I've done it many times: 1. Primary partition 1 type FD, size 200M. /dev/sda1 and /dev/sdb1. 2. Create /dev/md0 as RAID 1 from /dev/sda1 and /dev/sdb1. 3. Assign /dev/md0 to /boot, ext3 format (presumably ext4 would work too?) 4. Make sure to setup both drives separately in grub. Typically I then go on to have /dev/sda2+/dev/sdb2 => /dev/md1 => swap, and /dev/sda3+/dev/sdb3 => /dev/md2 => / Cheers Tony -- Tony Mountifield Work: tony at softins.co.uk - http://www.softins.co.uk Play: tony at mountifield.org - http://tony.mountifield.org
Seemingly Similar Threads
- CentOS 7 install on one RAID 1 [not-so-SOLVED]
- CentOS 7 install on one RAID 1 [not-so-SOLVED]
- systemctl behaves like it is being piped to less in centos 8?
- systemctl behaves like it is being piped to less in centos 8?
- Dialing a call back out on same SIP trunk as it came in