Sophie

Sophie

distrib > * > 2010.0 > * > by-pkgid > 2acd34fd833ce754a3cc56ff5df10f83 > files > 31

heartbeat-2.1.3-7.3mdv2010.0.x86_64.rpm

#!/bin/sh
#
# 
# Description:	wrapper of OCF RA Raid1, based on original heartbeat RA.
#		See OCF RA Raid1 for more information.
#
# Author:	Xun Sun <xunsun@cn.ibm.com> 
# Support:      linux-ha@lists.linux-ha.org
# License:      GNU General Public License (GPL)
# Copyright:	(C) 2005 International Business Machines
#
# usage: $0 <raidtab_config_file> <md_dev_name> {start|stop|status}
#
# in /etc/ha.d/haresources, use a line such as:
# nodea  10.0.0.170 Raid1::/etc/raidtab.md0::/dev/md0 Filesystem::/dev/md0::/data1::ext2
#
# The "start" arg starts up the raid device
# The "stop" arg stops it.  NOTE: all filesystems must be unmounted
#  and no processes should be accessing the device.
# The "status" arg just prints out whether the device is running or not
# 

# Source function library.
. /etc/ha.d/resource.d//hto-mapfuncs

usage() {
    echo "usage: $0 <raidtab_config_file> <md_dev_name> $LEGAL_ACTIONS"
}

if [ $# != 3 ]; then
    usage
    exit 1
fi

OCF_TYPE=Raid1
OCF_RESOURCE_INSTANCE=${OCF_TYPE}_$1
export OCF_TYPE OCF_RESOURCE_INSTANCE

OCF_RESKEY_raidconf=$1
OCF_RESKEY_raiddev=$2
export OCF_RESKEY_raiddev OCF_RESKEY_raidconf
ra_execocf $3