Bug 78467 - rc.sysinit tries to initialize RAID arrays that lack /etc/fstab entries
Summary: rc.sysinit tries to initialize RAID arrays that lack /etc/fstab entries
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: initscripts
Version: 7.3
Hardware: All
OS: Linux
medium
low
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-11-23 19:04 UTC by A.J. Aranyosi
Modified: 2014-03-17 02:32 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-01-14 04:18:25 UTC


Attachments (Terms of Use)

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:
Always

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
     RESULT=0
     RAIDDEV="$RAIDDEV(skipped)"
fi

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.


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