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

Re: Debian + LVM + RAID1



Damon L. Chesser wrote:
> Ivan Glushkov wrote:
>> Damon L. Chesser wrote:
>>  
>>> snip
>>>    
>>>> I taught I have to install the grub on the raid array, thus the grub
>>>> will put a copy of itself on the first partition on both hard drives,
>>>> used for the raid1, right?
>>>>         
>>> Wrong  AFAIK.  You can do that IF you have a boot loader on the MBR
>>> pointing to grub.
>>>     
>>
>> Now I am confused. Isn't grub a boot loader? Why would I need another
>> boot loader pointing to grub? I want to put grub on the MBR of both hard
>> drives from which my raid1 array consist of.
>>
>> BIOS does not read software raid and knows nothing
>>  
>>> about software raid.
>>>     
>>
>> Indeed, but I do not expect from the bios to read my raid array. I
>> merely want it to look for boot record in the MBR of one of the two hard
>> drives on which I have my raid arrays.
>>
>>   Software raid does not come into play until the
>>  
>>> kernel via initrd is loaded.  Install to the MBR of the first HD of the
>>> array, then use grub to install into the MBR of the other members.
>>>     
>>
>> What I meant with the paragraph you are referring to is exactly that:
>> issuing:
>>
>> grub-install /dev/md0
>>
>> should install (as fas as I understand it) a copy of grub in each hdd
>> from which the raid1 consist of (note: the partitions from both hard
>> drives included in md0 are both 512 MB and starting from the beginning
>> of the hard drives).
>>   
> 
> Truly, I don't know if you install grub onto a raid1 if it will install
> it onto the MBR of both physical HDs.  I just always made partitions for
> the /boot, installed to one, moved the data around and made a mdX out of
> it and installed grub onto the other member.  Re-inventing the wheel? 
> Probably.
>> If I
>>  
>>> am wrong, then it is news to me, but hey, I will learn new things!  See
>>> my old "howto" on Linux, grub and raid at damtek.com for the exact
>>> commands.  It is not pretty, but it will work.
>>>     
>>
>> I tried that. Thanks.
>>
>> Basically the problem was easily solved. I had to tag both partitions to
>> be used for my /boot raid1 array as primary and bootable (stupid of me,
>> I know). But there is now another problem:
>>
>> I see already the grub initial screen, but when I hit enter, I get the
>> following:
>>
>> Booting 'Debian GNU/Linux, kernel 2.6.24-1-amd64'
>>
>> root (hd5,0)
>>  Filesystem type unknown, partition type 0x7
>> kernel //vmlinuz-2.6.24-1-amd64 root=/dev/mapper/vg00-root ro linux26
>> quiet
>>
>> Error 17: Cannot mount selected partition
>>
>> Press any key to continue...
>>
>> I suppose grub does not know anything about LVM and the partitions on
>> that. If I am right, I have to rebuild initrd, right? But how do I tell
>> it to enable the lvm?
>>   
> 
> You have me there, it should have done it automagicaly when it
> installed.  Use rescue mode, but I am not sure what command you should
> use to re-generate it.  Perhaps chroot to your /, then try to run mkinitrd.
> 
> do you have a line in grub like this?
> 
> title        Debian GNU/Linux, kernel 2.6.25-1-amd64
> root        (hd0,5)
> kernel        /boot/vmlinuz-2.6.25-1-amd64 root=/dev/hda6 ro quiet
> ------->>>>>>> initrd        /boot/initrd.img-2.6.25-1-amd64
> <<<<<<<<<<<-------

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?!

> 
> If not, that would seem to mean you don't have an intrd.
> 
> 



Reply to: