[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: booting from a raid1
From: |
Tom H |
Subject: |
Re: booting from a raid1 |
Date: |
Fri, 8 Oct 2010 23:46:26 -0400 |
On Fri, Oct 8, 2010 at 12:34 PM, lee <address@hidden> wrote:
> On Fri, Oct 08, 2010 at 10:30:23AM -0500, Chris Weber wrote:
>> >> Now I can boot from /dev/sdd, but the kernel panics because it can't
>> >> mount the root filesystem (/dev/md0p2). Entries in /etc/fstab on md0p2
>> >> are correct. I take it the md-devices aren't up/accessible in time.
>> >>
>> >> Any idea what's missing? Like there's no RAID support in grub?
>> >
>> > Have you made a new initrd that has md and/or raid support? I ran
>>
>> I'm guessing that you might need an extra module for raid support and
>> maybe some extra lines in init, but maybe this will help get you
>> started.
>
> All that's needed for booting is compiled into the kernel, I'm not
> using initrd at all. Not using initrd makes things a lot easier ...
>
> The question probably is why the kernel doesn't seem to know about the
> RAID devices. If I understand things correctly, those might be started
> only after the root partition has been mounted. If that is true,
> having the root partition on a software RAID device would be generally
> impossible --- unless grub (or whatever else) does something to make
> them available to the kernel so that the root partition can be
> mounted.
>
> Now I can speculate that when having a root partition on a software
> RAID device that is not partitioned, the boot process is cheating in
> that the kernel first mounts the root partition from one of the
> physical disks the RAID device is made from and later somehow changes
> to the actual RAID device. That might explain why it's not possible to
> boot from a RAID5.
>
> Does anyone know how this works?
>
> There have been Debian installers that asked the user who created RAID
> devices during the installation which devices would have to be brought
> up at boot time. Recent installers don't seem to ask that
> anymore. This leads to wondering why the partition type "raid
> autodetect" is deprecated and wheather it is nevertheless required
> when the root partition is on a RAID device or not.
>
> In any case, before the root partition is mounted,
> /etc/mdadm/mdadm.conf cannot be read. So how can the software RAID
> devices be brought up before the root partition is mounted?
>
> How does one tell grub to bring up the software RAID devices? It seems
> that the modules "raid" and "mdraid" are required, and I've put them
> into the grub.cnf. Perhaps I also need to put some information into
> grub.cnf about what physical devices/partitions to use to bring up the
> RAID devices. But how do I do that?
A few answers in random order:
1. Why do you think that "raid autodetect" is deprecated? If you allow
d-i to create an array, it formats the partitions "raid autodetect".
2. mdadm.conf isn't needed for an array to be assembled. mdadm can
consult/scan /proc/partitions.
3. You need an initrd to have an mdraid'd /boot with 1.x metadata, see
"/usr/share/doc/mdadm/md.txt.gz".
4. I've tried installing grub2 on a partitioned mdraid'd disk from d-i
and from a chroot and both methods failed so I doubt (but would be
happy to be proven wrong) that grub2 can recognize partitioned md
devices with or without "insmod raid" and insmod mdraid". Your latest
setup with /boot on a single disk would boot easily with an initrd;
without an initrd, adding "md=d<md device no.>,dev0,dev1" (see
document in point 3) to the linux line might assemble the array.
- Re: booting from a raid1, (continued)
- Re: booting from a raid1, Tom H, 2010/10/03
- Re: booting from a raid1, lee, 2010/10/04
- Re: booting from a raid1, Tom H, 2010/10/05
- Re: booting from a raid1, lee, 2010/10/08
- Re: booting from a raid1, Jordan Uggla, 2010/10/08
- Re: booting from a raid1, lee, 2010/10/08
- Re: booting from a raid1, Chris Weber, 2010/10/08
- Re: booting from a raid1, Chris Weber, 2010/10/08
- Re: booting from a raid1, lee, 2010/10/08
- Re: booting from a raid1, Michael Evans, 2010/10/08
- Re: booting from a raid1,
Tom H <=
- Re: booting from a raid1, lee, 2010/10/09
- Re: booting from a raid1, Tom H, 2010/10/08