Re: question on how to (correctly) build an initrd for a root disk on a RAID1

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

 



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@xxxxxxxxxx>
              GPG KeyID: CFBFF194
              http://people.redhat.com/dledford

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

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux