Sophie

Sophie

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

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

#!/bin/sh
#
# 
# Description:	wrapper of OCF RA ICP, based on original heartbeat RA.
#		See OCF RA ICP 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
#
# An example usage in /etc/ha.d/haresources: 
#       node1  10.0.0.170 LinuxSCSI::0:0 ICP::c0h1::/dev/sdb1 LVM::myvolname
#
# Notice that you will need to get the utility "icpclucon" from the ICP
# support to use this.
#
# See usage() function below for more details...
#

. /etc/ha.d/resource.d//hto-mapfuncs

usage() {
    echo "usage: $0 <ICP cluster drive ID> <device> $LEGAL_ACTIONS"
    exit 1
}

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

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

OCF_RESKEY_driveid=$1 
OCF_RESKEY_device=$2
export OCF_RESKEY_device OCF_RESKEY_driveid

ra_execocf $3