EDIT: See the third post in this thread and read this other thread for a much simpler and easy to execute solution.
I installed Debian 8 amd64 with mdadm RAID 1 with two hard disk drives. There are two raid volumes, one for /boot and one for everything else. Beneath the RAID 1 volume for everything else lies a LUKS volume and beneath the LUKS volumes lies an LVM volume and within the LVM an ex4 "/" and swap partitions exist.
This works fine and dandy when both drives are present but when only one exists, this happens:
And after over a minute of "No volume groups found" I crash to the BusyBox (is there any way to get to the BusyBox more quickly?).
Bleh isn't the point of RAID 1 to reduce down time?
[THINKING]Hhmm, maybe grub's boot menu isn't set up to expect only one drive present?
I'll boot to
Debian Live and see if the RAID 1 volume is messed up in any way before messing with grub.[/THINKING]
*Boots Debian live*
Code:
user@debian:~$ sudo -i
root@debian:~# apt-get -y install mdadm lvm2 cryptsetup
I select "ok"
"ls /dev | grep md" reveals that raid volumes are enabled.
Code:
root@debian:~# ls /dev | grep md
md
md0
md1
"cryptsetup -v isLuks /dev/md1" reveals md1 to be the LUKS volume.
Code:
root@debian:~# cryptsetup -v isLuks /dev/md1
Command successful.
root@debian:~# cryptsetup -v luksOpen /dev/md1 md1_crypt
Enter passphrase for /dev/md1:
Key slot 0 unlocked.
Command successful.
root@debian:~# vgscan
Found volume group vg-sys using metadata type lvm2
root@debian:~# vgchange -a y vg-sys
2 logical volume(s) in volume group vg-sys now active
root@debian:~# lvscan
ACTIVE '/dev/vg-sys/c-swap'
ACTIVE '/dev/vg-sys/c-root'
root@debian:~# mount /dev/vg-sys/c-root /mnt
mount: /dev/mapper/vg--sys-c--root mounted on /mnt.
root@debian:~# ls /mnt
bin dev home lib lost+found mnt proc run srv tmp var
boot etc initrd.img lib64 media opt root sbin sys usr vmlinuz
root@debian:~# shutdown -r now
Now this happens on reboot!
And yes, there is still only one disk!
But then this happens
:
I enter root's password and issue "shutdown -h now"
I boot to Debian Live again:
Code:
user@debian:~$ sudo -i
root@debian:~# apt-get -y install mdadm
##COMMENT: Select okay at the mdadm configuration prompt.
root@debian:~# mount /dev/md0 /mnt
root@debian:~# ls /mnt
config-3.16.0-4-amd64 initrd.img-3.16.0-4-amd64 System.map-3.16.0-4-amd64
grub lost+found vmlinuz-3.16.0-4-amd64
root@debian:~# shutdown -r now
And somehow this fixed the issue!
Now why in the world did this fix anything? Why is mounting all RAID 1 volumes in Debian Live the solution to booting Debian into a RAID 1 array with missing disks?