ALT Linux Bugzilla
– Attachment 802 Details for
Bug 6397
rc.sysinit script should try not only raidtools but also mdadm for mounting md devices
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
Use /sbin/mdassemble when /usr/sbin/mdadm is not accessible
rc.sysinit-mdassemble.patch (text/plain), 1.53 KB, created by
evseev
on 2005-04-10 04:59:12 MSD
(
hide
)
Description:
Use /sbin/mdassemble when /usr/sbin/mdadm is not accessible
Filename:
MIME Type:
Creator:
evseev
Created:
2005-04-10 04:59:12 MSD
Size:
1.53 KB
patch
obsolete
>--- rc.sysinit.orig 2005-04-01 19:36:49 +0400 >+++ rc.sysinit 2005-04-10 04:44:10 +0400 >@@ -285,11 +285,42 @@ > fi > > # Add raid devices >-if [ -z "$EVMS_ACTIVE" ] && [ -f /proc/mdstat -a -s /etc/raidtab ] && ! grep -iwqs noraidtab /proc/cmdline; then >- echo -n "Starting up RAID devices: " > >- rc=0 >- >+mdadm_found() { >+ [ -s /etc/mdadm.conf ] || return 1 >+ for f in /sbin/mdadm /usr/sbin/mdadm /sbin/mdassemble /usr/sbin/mdassemble; do >+ [ -x "$f" ] && return 0 >+ done >+ return 1 >+} >+ >+raid_helpers_found() { >+ mdadm_found && return 0 >+ [ -s /etc/raidtab ] && return 0 >+ return 1 >+} >+ >+mount_raid_using_mdadm() { >+ [ -s /etc/mdadm.conf ] || return 1 >+ for f in /sbin/mdadm /usr/sbin/mdadm; do >+ [ -x "$f" ] || continue >+ echo -n "(using mdadm) " >+ "$f" --assemble --scan >+ return $? >+ done >+ for f in /sbin/mdassemble /usr/sbin/mdassemble; do >+ [ -x "$f" ] || continue >+ echo -n "(using mdassemble) " >+ "$f" >+ return $? >+ done >+ return 1 >+} >+ >+mount_raid_using_raidtools() { >+ local rc=0 >+ [ -s /etc/raidtab ] || return 1 >+ echo -n "(using raidtools) " > for i in `grep -s "^raiddev" /etc/raidtab | awk '{print $2}'`; do > RAIDDEV="${i##*/}" > RAIDSTAT=`grep -s "^$RAIDDEV : active" /proc/mdstat` >@@ -315,6 +346,14 @@ > fi > echo -n "$RAIDDEV " > done >+ return $rc >+} >+ >+if [ -z "$EVMS_ACTIVE" ] && [ -f /proc/mdstat ] && raid_helpers_found && ! grep -iwqs noraidtab /proc/cmdline; then >+ >+ echo -n "Starting up RAID devices: " >+ rc=0 >+ mount_raid_using_mdadm || mount_raid_using_raidtools || rc=1 > echo > > # A non-zero return means there were problems.
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 6397
:
795
|
796
| 802 |
836