Bug 5083 - initscripts-4.16-1 (Lorax): enableing raid does not work
initscripts-4.16-1 (Lorax): enableing raid does not work
Status: CLOSED NEXTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: initscripts (Show other bugs)
6.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-09-12 03:32 EDT by Manfred Spraul
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 1999-09-17 18:27:38 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Manfred Spraul 1999-09-12 03:32:02 EDT
/etc/rc.d/rc.sysinit seems buggy:

1) The if/else clauses for raid startup are wrong, they
always fails.
2) the line "grep 'raiddev' /etc/raidtab ..."
line ignores commented out lines.
(e.g "# sample raiddev" is accepted)

This change fixes the startup problem:

# Add raid devices
if [ -f /proc/mdstat -a -f /etc/raidtab ]; then
        echo -n "Starting up RAID devices: "

        rc=0

        for i in `grep "raiddev" /etc/raidtab | awk '{print
$2}'`
        do
                RAIDDEV=`basename $i`
                RAIDSTAT=`grep "^$RAIDDEV : active"
/proc/mdstat`
                if [ -z "$RAIDSTAT" ]; then
                        # Try raidstart first...if that
fails then
                        # fall back to raidadd, raidrun.  If
that
                        # also fails, then we drop to a
shell
                        RESULT=1
                        if [ -x /sbin/raidstart ]; then
                                /sbin/raidstart $i
                                RESULT=$?
                        fi
                        if [ $RESULT -gt 0 -a -x
/sbin/raid0run ]; then
                                /sbin/raid0run $i
                                RESULT=$?
                        fi
                        if [ $RESULT -gt 0 -a -x
/sbin/raidadd -a -x /sbin/raidrun ]; then
                                /sbin/raidadd $i
                                /sbin/raidrun $i
                                RESULT=$?
                        fi
                        if [ $RESULT -gt 0 ]; then
                                rc=1
                        fi
                        echo -n "$RAIDDEV "
                else
                        echo -n "$RAIDDEV "
                fi
        done

        # A non-zero return means there were problems.
        if [ $rc -gt 0 ]; then
                echo
                echo
                echo "*** An error occurred during the RAID
startup"
                echo "*** Dropping you to a shell; the
system will reboot"
                echo "*** when you leave the shell."

                PS1="(RAID Repair) \#"; export PS1
                sulogin

                echo "Unmounting file systems"
                umount -a
                mount -n -o remount,ro /
                echo "Automatic reboot in progress."
                reboot
        fi
fi
Comment 1 Bill Nottingham 1999-09-17 18:27:59 EDT
This should be fixed in the latest initscripts in Raw Hide (4.42).

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