LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Trouble booting up to LVM partition on Raid1. (http://www.linuxquestions.org/questions/linux-general-1/trouble-booting-up-to-lvm-partition-on-raid1-819147/)

gammahermit 07-10-2010 08:24 PM

Trouble booting up to LVM partition on Raid1.
 
I been trying all day to boot debian on a lvm partition on a raid1. I have found some howtos but they only show how to do it for one or the other not both at the same time. Using those howtos I think I have grub2 setup right the problem is my kernel. It has support for both LVM and Raid built-in. I setup the raid and lvm partitions while running that kernel. But when I use it to boot up the system on the lvm/raid it gives a kernel panic.

VFS: Cannot open root device "mapper/vg-root" or unknown-block(0,0)

The OS is by itself on an old disk sda1. The raid1 is on two other disks sdb1 & sdc1. It is divided into 2 logical partition vg-root & vg-media. I just copied the OS onto vg-root. Then tolled grub to boot to it. The grub entry is like so

menuentry "Debian with kernel 2.6.34" {
insmod lvm
insmod raid
set root='(vg-root)'
linux /boot/bzImage-2.6.34 root=/dev/mapper/vg-root ro vga=795
}

I tried setting root=(md0) but that didn't work either. I'm pretty sure the problem is with the kernel but I don't see why since it can it can see the raid and lvm partitions once it is booted up and both the raid & lvm options are built into the kernel so it should be able to see them at boot time.

phil.d.g 07-11-2010 07:55 AM

Have you compiled the kernel yourself? Debian kernels have the raid components compiled as modules, not compiled in.

If the raid system is compiled into modules, you need to state your RAID partitions in /etc/mdadm/mdadm.conf and rebuild your initramfs. If they are compiled directly in then the RAID partitions should be automatically detected, but the partition type needs to be set to FD (Linux RAID autodetect)

example mdadm.conf:

Code:

# mdadm.conf
#
# Please refer to mdadm.conf(5) for information about this file.
#

ARRAY /dev/md3 level=raid10 num-devices=4 UUID=ffffffff:ffffffff:ffffffff:ffffffff

ARRAY /dev/md1 level=raid1 num-devices=2 UUID=ffffffff:ffffffff:ffffffff:ffffffff
ARRAY /dev/md0 level=raid1 num-devices=2 UUID=ffffffff:ffffffff:ffffffff:ffffffff

# This file was auto-generated on Wed, 22 Apr 2009 18:03:38 +0100
# by mkconf $Id$


gammahermit 07-11-2010 11:37 AM

Yes I compiled the kernel myself and the raid and device mapper modules have been built into the kernel. And the partitions are of type FD


All times are GMT -5. The time now is 09:27 AM.