Bug 5083
| Summary: | initscripts-4.16-1 (Lorax): enableing raid does not work | ||
|---|---|---|---|
| Product: | [Retired] Red Hat Linux | Reporter: | Manfred Spraul <manfred> |
| Component: | initscripts | Assignee: | David Lawrence <dkl> |
| Status: | CLOSED NEXTRELEASE | QA Contact: | |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 6.0 | ||
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 1999-09-17 22:27:38 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
This should be fixed in the latest initscripts in Raw Hide (4.42). |
/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