Bug 213586

Summary: RFE: Need to update mkinitrd to use mdadm instead of raidautorun to assemble arrays
Product: [Fedora] Fedora Reporter: Doug Ledford <dledford>
Component: mkinitrdAssignee: Peter Jones <pjones>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: clydekunkel7734, oliva, wwoods
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-05-21 17:14:05 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 221696, 236666    
Attachments:
Description Flags
mkinitrd patch to fix issue - tested and working
none
mkinitrd-6.0.9-mdadm.patch none

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]
mkinitrd-6.0.9-mdadm.patch

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.