linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luca Berra <bluca@comedia.it>
To: linux-raid@vger.kernel.org
Subject: Re: question on how to (correctly) build an initrd for a root disk on a RAID1
Date: Tue, 28 Oct 2008 07:43:54 +0100	[thread overview]
Message-ID: <20081028064354.GD7764@percy.comedia.it> (raw)
In-Reply-To: <9f5edc120810270534j3d969d2s18c1017755990c30@mail.gmail.com>

On Mon, Oct 27, 2008 at 08:34:01AM -0400, Joe Landman wrote:
>> unfortunately the kernel panic is a consequence of a previous error,
>> someone willing to help you would need to know everithing that was
>> spitted between the 'starting red-hat nash' message and the kernel
>> panic.
>
>I looked and this was actually the earliest error.  I will try to
>capture the rest of this and post it for download (it is long).
it should at least spit out the modules it is loading and some of the
action it is doing. comparing this with a running one might help in
understanding what the difference is.

>>> Do I need to create a specialized init script?  Is there an
>>
>> usually no, redhat/centos initrd should be able to boot from a raid1
>
>The baseline provided kernel can.  This is a custom kernel, and I am
>attempting to find the right mkinitrd parameters.  One of the nicer
>things in the Ubuntu/Debian process is that they have the ability to
>add most/all modules in to an initrd.  Somehow this is my current
>thought, that we are missing something critical.
is md modular (CONFIG_MD)?

>>
>>> example of this somewhere?  I did look at the Documentation/md.txt and
>>> tried the
>>>
>>>    md=0,sda1,sdb1 md=1,sda2,sdb2  md=2,sda3,sdb3
>>
>> if you are using the centos kernel, raid is modular and this parameter
>> has no effect.
>> mkinitrd should use your /etc/mdadm.conf to discover how the array
>> should be laid out.
>
>Ok.  This is where it gets interesting.  If the /etc/mdadm.conf is on
>the RAID, you have a bit of a "chicken and egg" problem to deal with
>here.  How does the system find /etc/mdadm.conf to make the RAID when
>/etc/mdadm.conf is on the RAID?
>
>This implies that /etc/mdadm.conf is in the initrd.  Peeking inside
>the default centos one, I can see that this is not true.  Which
>implies that it doesn't see /etc/mdadm.conf before it assembles the
>array, as the /etc/mdadm.conf is on the array, and not in the initrd
>image.
>
>Is there a way to include the /etc/mdadm.conf into the initrd?
mkinitrd should include mdadm and /etc/mdadm.conf if it decides your
root is on md

>>
>>>  kernel boot time option, to no avail.  Persistent superblocks are
>>> on, and the devices have the right partition types.
>>
>> partition types do not matter anymore.
>
>Autoassembly is depracated?
yes
>
>>>  Any suggestions?  More things to read?
>>
>> is your fstab correct?
>
>Yes.  Boots fine with older kernel.  fstab doesn't change between the two.

i mean, mkinitrd reads /etc/fstab to decide what your root device is,
sometimes it fails and creates a wrong initrd

>> is your mdadm.conf correct?
>
>
>Yes.  Boots fine with older kernel.  mdadm.conf doesn't change between the two.
>
>> are you loading the correct drivers for your hd controller?
>
>I believe so:  looked at the list from lsmod and replicated this in
>the mkinitrd.  However, I have seen drivers change markedly release to
>release.  Hence my interest in building an initrd with the maximum
>number of modules (specific to SATA/SCSI)
>
>>
>> mkinitrd is a shell script, if all else fails, run it with sh -x and
>> read the output.
>
>Already done.  Even instrumented the code so I could see what the
>handleraid function was in fact doing.  It looks correct, figures out
>the right modules, and makes sure they are in there.

post it and the content of both initrds on pastebin or such,
you seem to have drawn enough interest that someone will look at it.

>So I am wondering if it is a module load order, or something else like
>that., apart from just a missing module.  Which could be a depmod
>issue.
>

-- 
Luca Berra -- bluca@comedia.it
        Communication Media & Services S.r.l.
 /"\
 \ /     ASCII RIBBON CAMPAIGN
  X        AGAINST HTML MAIL
 / \

  parent reply	other threads:[~2008-10-28  6:43 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-27  2:37 question on how to (correctly) build an initrd for a root disk on a RAID1 Joe Landman
2008-10-27  3:22 ` Steve Cousins
2008-10-27  3:26   ` Joe Landman
2008-10-27  7:16 ` Luca Berra
2008-10-27 12:34   ` Joe Landman
2008-10-27 16:36     ` Brendan Conoboy
2008-10-27 17:56       ` Doug Ledford
2008-10-27 18:08         ` Joe Landman
2008-10-27 18:02       ` Joe Landman
2008-10-28  6:43     ` Luca Berra [this message]
2008-10-28 12:20       ` Joe Landman
2008-10-29  1:42         ` Joe Landman
2008-10-29  2:03           ` Joe Landman
2008-10-29  2:49             ` Joe Landman
2008-10-29 12:13               ` Tru Huynh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081028064354.GD7764@percy.comedia.it \
    --to=bluca@comedia.it \
    --cc=linux-raid@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).