jeudi 5 mars 2015

What is the correct way to set up sw RAID1 so either drive boots?


I've set up a non-UEFI CentOS 6.6 "blank" install with /boot and / each in a separate RAID 1 (3 drives/1 spare). If I remove one of the two non-spare drives, it will hit grub and begin to boot, but stall and KP. If I remove the other drive, it boots just fine. I was thinking there there's some UUID matching that's failing. Assuming this has something to do with it, how should I correct this so that the system sees the (degraded) RAID /dev/mdx instead of the missing UUID? Thanks in advance.


/etc/fstab, /etc/mdadm.conf, /boot/grub/grub.conf:



[root@localhost ~]# cat /etc/fstab

#
# /etc/fstab
# Created by anaconda on Thu Mar 5 08:30:44 2015
#
# 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
#
UUID=875d9c47-8f70-4545-8d11-16264e0dfe01 / ext4 defaults 1 1
UUID=a41ea1b5-6155-46b5-baac-395d5f9f06bc /boot ext4 defaults 1 2
UUID=67724b5c-3bf7-43c2-af68-d165a72c7919 swap swap defaults 0 0
UUID=6803812c-7478-4586-91bf-aca1d93b117a swap swap defaults 0 0
UUID=2f7c37b5-8e2a-4acb-9310-8f1841338383 swap swap defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
LABEL=BACKUP /backup xfs defaults 0 0
[root@localhost ~]# cat /etc/mdadm.conf
# mdadm.conf written out by anaconda
MAILADDR root
AUTO +imsm +1.x -all
ARRAY /dev/md0 level=raid1 num-devices=2 UUID=abd0217f:a277c9ed:fe406fe9:fda616f3
ARRAY /dev/md1 level=raid1 num-devices=2 UUID=e8bb6fca:e7b00a8d:1b9331b8:9dde9ce4
[root@localhost ~]# cat /boot/grub/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/md1
# initrd /initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.32-504.8.1.el6.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.32-504.8.1.el6.x86_64 ro root=UUID=875d9c47-8f70-4545-8d11-16264e0dfe01 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_MD_UUID=e8bb6fca:e7b00a8d:1b9331b8:9dde9ce4 SYSFONT=latarcyrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
initrd /initramfs-2.6.32-504.8.1.el6.x86_64.img
title CentOS 6 (2.6.32-504.el6.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.32-504.el6.x86_64 ro root=UUID=875d9c47-8f70-4545-8d11-16264e0dfe01 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_MD_UUID=e8bb6fca:e7b00a8d:1b9331b8:9dde9ce4 SYSFONT=latarcyrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
initrd /initramfs-2.6.32-504.el6.x86_64.img


Aucun commentaire:

Enregistrer un commentaire