Bug 527726 - failed to stat() /dev/mapper/{no,raid,disks}
Summary: failed to stat() /dev/mapper/{no,raid,disks}
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 527553 528098 530657 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-10-07 14:10 UTC by Michal Schmidt
Modified: 2014-03-17 03:20 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-10-09 20:19:13 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
do not initialize dmraid if no raid disks are found (945 bytes, patch)
2009-10-07 14:10 UTC, Michal Schmidt
no flags Details | Diff
slightly different patch (463 bytes, patch)
2009-10-07 18:12 UTC, Bill Nottingham
no flags Details | Diff

Description Michal Schmidt 2009-10-07 14:10:36 UTC
Created attachment 363970 [details]
do not initialize dmraid if no raid disks are found

Description of problem:
During boot I get these messages (from boot.log):
failed to stat() /dev/mapper/no
failed to stat() /dev/mapper/raid
failed to stat() /dev/mapper/disks

I found the cause in /etc/rc.d/rc.sysinit in dmraid setup. I do not have any dmraid partitions on my system.

It was probably caused by the recent fix for bug 524355.

Version-Release number of selected component (if applicable):
initscripts-9.00-1.x86_64

How reproducible:
always

Steps to Reproduce:
1. boot on a system where dmraid is not used
2. look at /var/log/boot.log
  
Actual results:
the above mentioned errors

Expected results:
no errors

Additional info:
I am attaching a proposed patch.

Comment 1 Hans de Goede 2009-10-07 14:31:01 UTC
Good one, ack

Comment 2 Bill Nottingham 2009-10-07 15:34:27 UTC
*** Bug 527553 has been marked as a duplicate of this bug. ***

Comment 3 Bill Nottingham 2009-10-07 18:12:26 UTC
Created attachment 364016 [details]
slightly different patch

Relying on dmraid to consistently have that exact error message seems like a bad idea.

Here's a slightly different approach - this works for me on a non-dmraid box. Hans - does this work for you with dmraid?

Comment 4 Michal Schmidt 2009-10-07 22:00:40 UTC
(In reply to comment #3)
> Relying on dmraid to consistently have that exact error message seems like a
> bad idea.

Perhaps. Notice that dracut relies on the exact error message too. In /usr/share/dracut/modules.d/90dmraid/dmraid.sh:

SETS=$(dmraid -c -s)

if [ "$SETS" = "no raid disks" ]; then
    return
fi

Comment 5 Hans de Goede 2009-10-08 06:00:39 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > Relying on dmraid to consistently have that exact error message seems like a
> > bad idea.
> 
> Perhaps. Notice that dracut relies on the exact error message too. In
> /usr/share/dracut/modules.d/90dmraid/dmraid.sh:
> 

And does F-11 rc.sysinit (it pipes the output of dmraid through:
egrep -iv "^no "
As said this is my bad, I introduced this with the patch from bug 524355. I agree
this is not pretty though.

Comment 6 Hans de Goede 2009-10-08 06:02:05 UTC
Note I filed a bug with part of the same patch for RHEL-5 too (but cannot find it atm), that has this issue too.

Comment 7 Hans de Goede 2009-10-09 10:36:18 UTC
I've tested the patch from comment #3, and it works fine on a system with
raidsets.

Note that it is safe to simply rely on the "no raid disks" string though, dmraid does not come with any translations, I don't even think it uses gettext at all.

This would safe us forking of and execing awk, I know things like this are not
really the bottle neck when booting, but small things like this do add up over the overall boot.

Comment 8 Bill Nottingham 2009-10-09 15:51:12 UTC
*** Bug 528098 has been marked as a duplicate of this bug. ***

Comment 10 Michal Schmidt 2009-10-18 15:34:15 UTC
This is marked CLOSED RAWHIDE, but Rawhide has still only 9.00. The fix is in 9.01.
Bill, are you going to ask rel-eng to tag 9.01 for dist-f12?

Comment 11 Bill Nottingham 2009-10-19 16:49:57 UTC
Either that or 9.02 (not yet released) in the next couple of days.

Comment 12 Daniel Qarras 2009-10-24 12:34:50 UTC
*** Bug 530657 has been marked as a duplicate of this bug. ***

Comment 13 Bill Nottingham 2010-02-26 18:36:15 UTC
*** Bug 568790 has been marked as a duplicate of this bug. ***


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