case $1 in
start) ....................
;;
stop) ..........................
;;
monitor) ocf_log debug "at `/bin/date +%H:%M:%S`, launching monitor"
check_conf
check_status
check_md_state
if [ $? -eq 33 ]; then
repair
fi
;;
meta-data) cat `echo $0 | sed 's/^\(.*\)\.sh$/\1.metadata/'`
exit $OCF_SUCCESS
;;
*) echo "usage: $0 {start|stop|monitor|meta-data}"
;;
esac
---------------------------------------->8------------------------------------------------
<?xml version="1.0"?> <resource-agent name="mdmonitor" version="rgmanager 2.0"> <version>1.0</version> <longdesc lang="en"> Resource for activating, deactivating and monitoring MD devices </longdesc> <shortdesc lang="en"> Resource for activating, deactivating and monitoring MD devices </shortdesc> <parameters> <parameter name="raidconf" required="1"> <longdesc lang="en"> Name of the file containing the description of the array(s) Format is strict, must be "servicename"-raid.conf It will be placed in /etc/cluster/"servicename" </longdesc> <shortdesc lang="en"> raid.conf filename </shortdesc> <content type="string"/> </parameter> <parameter name="policy" required="0"> <longdesc lang="en"> Policy to adopt at start, strict will prevent assembling any array partially thus causing the resource to fail. Quorum will allow partial start. If not defined, defaults to quorum </longdesc> <shortdesc lang="en"> Assembly Policy </shortdesc> <content type="string"/> </parameter> </parameters> <actions> <action name="start" timeout="5"/> <action name="stop" timeout="5"/> <action name="monitor" interval="10" timeout="5" /> <action name="meta-data" timeout="5"/> </actions> <special tag="rgmanager"> <attributes maxinstances="1"/> </special> </resource-agent>
-- Linux-cluster mailing list Linux-cluster@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/linux-cluster