Bug 221696
Summary: | mkinitrd "forgets" raid modules | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Nicolas Mailhot <nicolas.mailhot> | ||||
Component: | mkinitrd | Assignee: | Peter Jones <pjones> | ||||
Status: | CLOSED RAWHIDE | QA Contact: | Will Woods <wwoods> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | rawhide | CC: | clydekunkel7734, katzj | ||||
Target Milestone: | --- | Keywords: | Reopened | ||||
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:41:28 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: | 213586 | ||||||
Bug Blocks: | 150226 | ||||||
Attachments: |
|
Description
Nicolas Mailhot
2007-01-06 10:05:46 UTC
Looking at it a bit more, the test for md devices is wrong. It should look like: if [[ "$device" =~ ^md[0-9]+$ ]]; then vecho "Found RAID component $device" (note no "" around the second term so bash recognizes it as a regexp and does not return 2) (tested with the patch in bug #213586 & the resulting initrd worked) mkinitrd-6.0.6-1 #2 not clear to me...if it is saying that the patch resulted in mkinitrd-6.0.6-1, then it does not work. My software raid device is detected as such, but the raidautorun command is not included in init, nor are the raid modules. You need 1. to change the expression detecting raid devices (as in comment #1) or initrd won't include raid modules 2. (maybe, didn't test without it) do the change documented in bug #213586 to get mdadm in the initrd The result is something like this: --- /sbin/mkinitrd 2006-12-19 22:54:08.000000000 +0100 +++ /tmp/mkinitrd 2007-01-11 08:57:57.000000000 +0100 @@ -438,7 +438,7 @@ continue ;; *) handleddevices="$handleddevices $device" ;; esac - if [[ "$device" =~ "md[0-9]+" ]]; then + if [[ "$device" =~ ^md[0-9]+$ ]]; then vecho "Found RAID component $device" handleraid "$device" continue @@ -1222,6 +1222,13 @@ mknod $MNTIMAGE/dev/efirtc c 10 136 fi +if [ -n "$raiddevices" ] ; then + inst /sbin/mdadm.static "$MNTIMAGE" /bin/mdadm + if [ -f /etc/mdadm.conf ]; then + cp $verbose --parents /etc/mdadm.conf $MNTIMAGE/ + fi +fi + # FIXME -- this can really go poorly with clvm or duplicate vg names. # nash should do lvm probing for us and write its own configs. if [ -n "$vg_list" ]; then @@ -1364,8 +1371,7 @@ if [ -n "$raiddevices" ]; then for dev in $raiddevices; do - cp -a /dev/${dev} $MNTIMAGE/dev - emit "raidautorun /dev/${dev}" + emit "mdadm -As --auto=yes /dev/${dev}" done fi (In reply to comment #3) > #2 not clear to me...if it is saying that the patch resulted in > mkinitrd-6.0.6-1, then it does not work. Nah, it's saying mkinitrd-6.0.6-1 needs the patch to work Actually, all the double quotes ("") following =~ should be removed for mkinitrd to work correctly with bash-3.2 See new feature f. for bash-3.2 in /usr/share/doc/bash-3.2/NEWS mkinitrd-6.0.6-2.x86_64 includes the double quotes changes but not the bug #213586 changes It seems both are necessary to get a working setup. At least the raidautorun thing does nothing there Does anyone know when mkinitrd will recognize software raid / again? And why isn't this bz assigned? Latest mkinitrd seems to work, but is not using mdadm We now have a mkinitrd that uses mdadm. Could you try the updated packages from koji: http://koji.fedoraproject.org/koji/buildinfo?buildID=6450 You'll probably need both mkinitrd and nash to test. Created attachment 154801 [details]
Crash
Does not work. I'm surprised as the original patch worked perfectly
Reopening based on Nicholas's comment for more investigation It failed to exec /sbin/mdadm with "permission denied"? Weird. I think the system is still in the initrd at that point.. maybe we're not creating the initrd quite right, and mdadm isn't executable? Could you check? 'gzip -dc [initrd] | cpio -tv | grep mdadm' should do it. Reproduced and on the fix... give me a few minutes to test and then I'll have a fixed build going (In reply to comment #15) > And built. > http://koji.fedoraproject.org/koji/buildinfo?buildID=6916 I can confirm this one works on my system |