modify mdadm-raid script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Along the same lines as above:

Should I simply modify the init script
/etc/init.d/mdadm-raid

script to  add in 
--run to the line which starts the raid??

ie. change the line

               $MDADM -A -s 
to
               $MDADM -A -s --run

so that even if the array is degraded it will start??


Mitchell

Please tell me if I am really doing something really dangerous and dumb
...

Thanks!
Mitchell Laks
 

#!/bin/sh
#
# Start any arrays which are described in /etc/mdadm/mdadm.conf and which are
# not running already.
#
# Copyright (c) 2001-2004 Mario Jou/3en <joussen@xxxxxxxxxx>
# Distributable under the terms of the GNU GPL version 2.

MDADM=/sbin/mdadm
MDRUN=/sbin/mdrun
CONFIG=/etc/mdadm/mdadm.conf
DEBIANCONFIG=/etc/default/mdadm

test -x $MDADM || exit 0

AUTOSTART=true
test -f $DEBIANCONFIG && . $DEBIANCONFIG

case "$1" in
    start)
        if [ "x$AUTOSTART" = "xtrue" ] ; then
            if [ ! -f /proc/mdstat ] && [ -x /sbin/modprobe ] ; then
                /sbin/modprobe -k md > /dev/null 2>&1
            fi
            test -f /proc/mdstat || exit 0
            echo "Starting raid devices: "
            if [ -f $CONFIG ] && [ -x $MDADM ] ; then
                $MDADM -A -s
            elif [ -x $MDRUN ] ; then
                $MDRUN
            fi
            echo "done."
        fi
        ;;
    stop|restart|reload|force-reload)
        ;;
    *)
        echo "Usage: $0 {start|stop|restart|reload|force-reload}"
        exit 1
        ;;
esac

exit 0
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux