[CentOS] Booting Software RAID

Ljubomir Ljubojevic centos at plnet.rs
Fri Jan 24 23:47:17 UTC 2014


On 01/25/2014 12:20 AM, Les Mikesell wrote:
> On Fri, Jan 24, 2014 at 4:17 PM, Ljubomir Ljubojevic <centos at plnet.rs> wrote:
>>>>
>>> Doesn't grub need to know the bios disk id for subsequent stages of
>>> the boot and where to find the root filesystem?  I think it matters
>>> whether or not bios remaps your 2nd drive to the first id.
>>
>> GRUB boots first partition on a given disk, and then kernel boots file
>> systems from RAID's. Once /boot RAID is mounted, any changes are written
>> to all disks.
>
> What is the hd number you give in the setup command?   And what if
> bios doesn't call the remaining live disk that number after a failure?
>

I myself use InstallCD or LiveCD to create RAID partitions I want, and 
then Anaconda offers to create GRUB on /dev/mdX and creates /boot and 
GRUB on all disks (I had 3 and even 4 in mirror).

I am not talking about seamless hardware boot, but on software one. If 
one HDD is totally dead, then /dev/sdb becomes /dev/sda and so on, but 
that does not matter since RAID is assembles from metadata on partitions 
(I use separate RAID partitions, 500MB RAID1 then the rest of the disk 
is RAID10,f2 or RAID10,f3 partition) so kernel line says:

title CentOS (2.6.32-431.el6.centos.plus.x86_64)
         root (hd0,0)
         kernel /vmlinuz-2.6.32-431.el6.centos.plus.x86_64 ro 
root=/dev/mapper/vg_kancelarija-LV_C6_ROOT 
rd_LVM_LV=vg_kancelarija/LV_C6_ROOT 
rd_MD_UUID=38669557:34ca61eb:3c6e8827:d562f15d 
rd_LVM_LV=vg_kancelarija/LV_C6_SWAP rd_NO_LUKS rd_NO_DM LANG=en_US.UTF-8 
SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=p
c KEYTABLE=us crashkernel=128M rhgb quiet nouveau.modeset=0 
rdblacklist=nouveau
         initrd /initramfs-2.6.32-431.el6.centos.plus.x86_64.img

and device.map:

# this device map was generated by anaconda
(hd0)     /dev/sda
(hd2)     /dev/sdb
(hd1)     /dev/sdc

(From system with 3 disks)

I can not claim for sure this works, at this point, because my last 
problem was long time ago, but as far as I remember I just disconnected 
failed disk and booted system on single disk until I got new one as 
replacement.


-- 
Ljubomir Ljubojevic
(Love is in the Air)
PL Computers
Serbia, Europe

StarOS, Mikrotik and CentOS/RHEL/Linux consultant



More information about the CentOS mailing list