linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Doug Ledford <dledford@redhat.com>
To: Brendan Conoboy <blc@redhat.com>
Cc: Joe Landman <joe.landman@gmail.com>,
	linux-raid list <linux-raid@vger.kernel.org>
Subject: Re: question on how to (correctly) build an initrd for a root disk on a RAID1
Date: Mon, 27 Oct 2008 13:56:16 -0400	[thread overview]
Message-ID: <1225130177.26510.3.camel@firewall.xsintricity.com> (raw)
In-Reply-To: <4905EE05.9070108@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 2049 bytes --]

On Mon, 2008-10-27 at 10:36 -0600, Brendan Conoboy wrote:
> Joe Landman wrote:
> > 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?
> 
> This is almost certainly your problem.  If / is a RAID volume, the 
> initrd itself needs to have an /etc/mdadm.conf that reflects how it is 
> constructed.  This is something that mkinitrd should be doing for you. 
> I'll second the suggestion of running mkinitrd with sh's -x option to 
> see why it's not doing this for you.  Good luck.

Keep in mind that mkinitrd senses what it needs to boot the machine from
the currently running setup.  So, if you run mkinitrd with a root raid
array, it should detect that it needs to start the md raid device, copy
mdadm.static and mdadm.conf to the initrd, and add the appropriate lines
to the initrd script.  If you aren't running the md raid array (maybe
it's a raid1 and you just mounted a bare member long enough to create an
initrd for instance), then it won't.  But, since the system works with a
centos provided kernel, and not with the custom kernel, I'm guessing
that this isn't the issue, that mkinitrd is just fine, and instead the
custom kernel's config is somehow fubar'ed and that's what's causing all
the problems.

-- 
Doug Ledford <dledford@redhat.com>
              GPG KeyID: CFBFF194
              http://people.redhat.com/dledford

Infiniband specific RPMs available at
              http://people.redhat.com/dledford/Infiniband


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

  reply	other threads:[~2008-10-27 17:56 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 [this message]
2008-10-27 18:08         ` Joe Landman
2008-10-27 18:02       ` Joe Landman
2008-10-28  6:43     ` Luca Berra
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=1225130177.26510.3.camel@firewall.xsintricity.com \
    --to=dledford@redhat.com \
    --cc=blc@redhat.com \
    --cc=joe.landman@gmail.com \
    --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).