Bug 5083 - initscripts-4.16-1 (Lorax): enableing raid does not work
Summary: initscripts-4.16-1 (Lorax): enableing raid does not work
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: initscripts
Version: 6.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: David Lawrence
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-09-12 07:32 UTC by Manfred Spraul
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 1999-09-17 22:27:38 UTC


Attachments (Terms of Use)

Description Manfred Spraul 1999-09-12 07:32:02 UTC
/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 22:27:59 UTC
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.