[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debian + LVM + RAID1



SNIP

I have this line in /boot/grub/menu.lst

I tried in the following sequence to:

0. boot resque
1. mount /boot from raid1 and the other directories from the lvm volumes

1. enter lvm into /etc/modules,
2. rebuild initrd with:

 mkinitramfs -o /boot/grub/initrd.img-2.6.24-1-amd64

3. install grub into the MBR of both disk with

grub-install /dev/sdc
grub-install /dev/sdd

but still the same message appears when I try to boot :(

How can I check if the lvm support is really seen by grub?
I find this (http://grub.enbug.org/LVMandRAID) article claiming that I
have to enter "insmod lvm" in a file named grub.cfg. But I don't have a
file like this in my system?!

Ivan,

As for LVM support for grub: the MBR has files pointing to your "root" which in this term means place where the grub files are which is NOT in an LVM. In your case this should be /dev/md0 or however GRUB reads that (I confess, I don't know). I just installed, in a vm, debian using this image: http://ftp.nl.debian.org/debian/dists/etch/main/installer-amd64/current/images/netboot/mini.iso which should be current snapshot of testing, net install mini.iso. I did that to make sure we had the same OS.

I partitioned two 8G drives thusly: 1 120MB primary, 1 6.5GB extended. I made the 1st partition into a raid1 (md0) and made the 2nd into a raid1 (md1)

I put an a swap file on each drive (1.5G each, why run raid on a swap? double your swap file space and you can ping between the two if you need them)

I put LVM (System) on top of md1 and divided that into two logical volumes (root 4.5G and home 2G or so)

I then was asked to install Grub into MBR of (hd0,0) which I agreed to.

rebooted.  works just fine.

Cut your losses, if you have a network install, just do it again (unless you are metered) and this time install grub on the physical HD. Then use the grub command to mirror it to the raid1 member.

HTH.

--
Damon L. Chesser
damon@damtek.com
http://www.linkedin.com/in/dchesser


Reply to: