Bug 213586 - RFE: Need to update mkinitrd to use mdadm instead of raidautorun to assemble arrays
RFE: Need to update mkinitrd to use mdadm instead of raidautorun to assemble ...
Product: Fedora
Classification: Fedora
Component: mkinitrd (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Peter Jones
David Lawrence
Depends On:
Blocks: 221696 236666
  Show dependency treegraph
Reported: 2006-11-01 22:27 EST by Doug Ledford
Modified: 2007-11-30 17:11 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-05-21 13:14:05 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Doug Ledford 2006-11-01 22:27:07 EST
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-01 22:27:07 EST
Created attachment 140076 [details]
mkinitrd patch to fix issue - tested and working
Comment 2 Alexandre Oliva 2007-01-22 12:34:09 EST
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-16 21:52:22 EDT
--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 18:28:13 EDT
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 18:30:06 EDT
Possible dups: bug #238926, bug #238353
Comment 6 Will Woods 2007-05-15 17:33:08 EDT
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 13:14:05 EDT
Verified with local version of -5 that I'm building now
Comment 8 Doug Ledford 2007-05-23 10:49:07 EDT
Changes are verified from my end.

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