Bug 78467

Summary: rc.sysinit tries to initialize RAID arrays that lack /etc/fstab entries
Product: [Retired] Red Hat Linux Reporter: A.J. Aranyosi <aja>
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED RAWHIDE QA Contact: Brock Organ <borgan>
Severity: low Docs Contact:
Priority: medium    
Version: 7.3CC: rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-01-14 04:18:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description A.J. Aranyosi 2002-11-23 19:04:50 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2b) Gecko/20021016

Description of problem:
rc.sysinit looks through /etc/raidtab for RAID arrays, and attempts to
initialize each one unless its /etc/fstab entry has the "noauto" option. 
However, if the array lacks an /etc/fstab entry, rc.sysinit tries to initialize
it anyway, dropping to console if it can't.  This causes problems if (for
example) you physically remove an array, but keep the /etc/raidtab around in
case you want to add it back in later, or if the script finds spurious
nonexistent arrays in /etc/raidtab (e.g., bug #71087).  The correct approach
would be to skip arrays that lack /etc/fstab entries.

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

How reproducible:

Steps to Reproduce:
1. Make an entry for a nonexistent (or removed) array in /etc/raidtab, without a
corresponding /etc/fstab entry.
2. Reboot.
3. Just like setting up an iMac, there is no step 3!

Additional info:

Fortunately, this bug is easy to fix.  You can:

1. Remove the offending entry from /etc/raidtab (which is inconvenient if you
want to add it back in later);
2. Add an entry for the offending device to /etc/fstab with the noauto option
(which is ugly if the device isn't physically on the system); or
3. Modify /etc/rc.d/rc.sysinit in the following way:
after the "RESULT=1" line, add these lines:
INFSTAB=`grep -c "^$i" /etc/fstab`
if [ $INFSTAB -eq 0 ]; then

This last fix is the cleanest, and has the side effect of also solving bug #71087.

Comment 1 Bill Nottingham 2003-01-14 04:18:25 UTC
Added in 7.03-1, although I'm a little leery of skipping the setup entirely. I
should really rewrite it to try to activate them, and make it a nonfatal error.

Comment 2 Michael Schwendt 2003-03-13 10:55:13 UTC
Good tweak. This also fixes the case of an fstab raid entry being commented out.