Bug 78467 - rc.sysinit tries to initialize RAID arrays that lack /etc/fstab entries
rc.sysinit tries to initialize RAID arrays that lack /etc/fstab entries
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
All Linux
medium Severity low
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
Depends On:
  Show dependency treegraph
Reported: 2002-11-23 14:04 EST by A.J. Aranyosi
Modified: 2014-03-16 22:32 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-01-13 23:18:25 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description A.J. Aranyosi 2002-11-23 14:04:50 EST
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-13 23:18:25 EST
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 05:55:13 EST
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.