Bug 213586 - RFE: Need to update mkinitrd to use mdadm instead of raidautorun to assemble arrays
Summary: RFE: Need to update mkinitrd to use mdadm instead of raidautorun to assemble ...
Alias: None
Product: Fedora
Classification: Fedora
Component: mkinitrd
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Peter Jones
QA Contact: David Lawrence
Depends On:
Blocks: 221696 236666
TreeView+ depends on / blocked
Reported: 2006-11-02 03:27 UTC by Doug Ledford
Modified: 2007-11-30 22:11 UTC (History)
3 users (show)

Clone Of:
Last Closed: 2007-05-21 17:14:05 UTC

Attachments (Terms of Use)
mkinitrd patch to fix issue - tested and working (815 bytes, patch)
2006-11-02 03:27 UTC, Doug Ledford
no flags Details | Diff
mkinitrd-6.0.9-mdadm.patch (775 bytes, patch)
2007-05-09 22:28 UTC, Will Woods
no flags Details | Diff

Description Doug Ledford 2006-11-02 03:27:07 UTC
In order to support updating anaconda to create mdadm raid arrays that use
version 1.0 or later superblocks, we have to quit use raid autorun from the
kernel.  The kernel does not support autorun on raid arrays with a superblock
version of 1 or higher.  Anaconda already writes out the information needed to
uniquely identify each array by UUID to /etc/mdadm.conf at startup, so the
following changes should be sufficient: any time we have $raiddevices to start,
install mdadm.static as mdadm and /etc/mdadm.conf as itself on the initrd image,
then when we loop through the $raiddevices list, instead of creating nodes and
calling raid autorun, create the node then call mdadm -A --scan /dev/$dev in the
rc.linux script.  The attached patch implements this behavior.

Comment 1 Doug Ledford 2006-11-02 03:27:07 UTC
Created attachment 140076 [details]
mkinitrd patch to fix issue - tested and working

Comment 2 Alexandre Oliva 2007-01-22 17:34:09 UTC
I'd suggest adding --run and --auto-update-homehost to the mdadm command line,
such that it will start degraded arrays (wouldn't it suck to be completely
unable to boot because your / went degraded?) and to enable other
failure-recovery scenarios after bringing disks from other machines.

Comment 3 Doug Ledford 2007-04-17 01:52:22 UTC
--auto-update-homehost defeats the purpose of having a homehost in the first
place when on  a NAS/SAN.  You need to be required to do that manually,
especially since you should never be changing the home host of your boot or /
partitions unless you change them together.  If you do want to change them
separately, then rescue mode on the CD is fine.  However, the --run parameter is
perfectly fine. 

I will note that this bug has been languishing, and I'm pretty sure that the
combination of this and the total lack of a few sanity rules in the anaconda
installer has resulted in bug 230860.  If at all possible, this needs fixed
prior to F7 going gold.  I'll open a separate bug (or two) against anaconda.

Note: without fixing this, it's possible for users to create an installation
that is guaranteed to never run their raid arrays properly at bootup.  Raid
autorun is dying, and will be totally dead in the future.  This is needed to
start raid arrays without raid autorun.

Comment 4 Will Woods 2007-05-09 22:28:13 UTC
Created attachment 154438 [details]

Okay, this is an updated version of the previous patch which adds the --run
flag and applies cleanly against mkinitrd-6.0.9.

As I understand it, if we don't apply this patch, anyone with mdraid who
upgrades from FC6 may have serious trouble on first boot.

Peter, can you please look this over and consider adding it?

Comment 5 Will Woods 2007-05-09 22:30:06 UTC
Possible dups: bug #238926, bug #238353

Comment 6 Will Woods 2007-05-15 21:33:08 UTC
Okay, we've got patched packages built in koji. Doug, do you have some way to
test these out and see if they Do The Right Thing?

http://koji.fedoraproject.org/koji/buildinfo?buildID=6450 has the updated
mkinitrd packages.

Comment 7 Jeremy Katz 2007-05-21 17:14:05 UTC
Verified with local version of -5 that I'm building now

Comment 8 Doug Ledford 2007-05-23 14:49:07 UTC
Changes are verified from my end.

Note You need to log in before you can comment on or make changes to this bug.