Bug 527726

Summary: failed to stat() /dev/mapper/{no,raid,disks}
Product: [Fedora] Fedora Reporter: Michal Schmidt <mschmidt>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: bmj001, dqarras, fedora, hdegoede, iarlyy, nicolas.mailhot, notting, rvokal, svene
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: 2009-10-09 20:19:13 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:
Attachments:
Description Flags
do not initialize dmraid if no raid disks are found
none
slightly different patch none

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. ***