Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 220473 - sraid.i - /etc/mdadm.conf not parsed correctly
sraid.i - /etc/mdadm.conf not parsed correctly
Product: Fedora
Classification: Fedora
Component: initng-ifiles (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Malmgren
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2006-12-21 11:19 EST by Jason Farrell
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-12-22 03:23:56 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
patch (872 bytes, patch)
2006-12-21 11:19 EST, Jason Farrell
no flags Details | Diff

  None (edit)
Description Jason Farrell 2006-12-21 11:19:13 EST
Description of problem:
mdadm software raid arrays aren't not assembled because /etc/mdadm.conf is not
parsed correctly (into a list of devices).

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. have a mdadm raid array in /etc/mdadm.conf to be assembled
2. ng-update add sraid
3. reboot
Actual results:
No arrays are assembled. Boot fails miserably.

Expected results:
All arrays assembled.

Additional info:
The reason why this happens is because the same line is being used to extract
raid device names from /etc/mdadm.conf as the old /etc/raidtab, but they have a
different number of fields.

Example mdadm.conf entry:
ARRAY /dev/md2 level=raid0 num-devices=2 UUID=943af5fe:15ae3b82:aa7ad701:0828875b

Example raidtab entry:
raiddev /dev/md0

So, this doesn't work:
[ -f /etc/mdadm.conf ] && mdadm_devices=`/bin/grep '^[[:space:]]*ARRAY'
/etc/mdadm.conf | /bin/sed
But this will (for both):
[ -f /etc/mdadm.conf ] && mdadm_devices=`/bin/awk '/^[:space:]*ARRAY/ {print
$2}' /etc/mdadm.conf`

Simple patch:
Comment 1 Jason Farrell 2006-12-21 11:19:13 EST
Created attachment 144197 [details]
Comment 2 Daniel Malmgren 2006-12-22 03:23:56 EST
Hmmm... Looks like deac beat me to it on this one as well. It's fixed in svn.

(Deac, could you please leave a note in bz when you fix stuff. It would save me
time trying to fix what's already fixed ;-)

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