#!/bin/sh # by hxinwei@gmail.com # License: GNU General Public License 2 (GPL2) if [ -n "$OCF_DEBUG_LIBRARY" ]; then . $OCF_DEBUG_LIBRARY else : ${OCF_FUNCTIONS_DIR=${OCF_ROOT}/lib/heartbeat} . ${OCF_FUNCTIONS_DIR}/ocf-shellfuncs fi # Parameter defaults OCF_RESKEY_scsi_reserve_default="/usr/sbin/scsi_reserve" OCF_RESKEY_sharedisk_default="/dev/sdb" OCF_RESKEY_start_loop_default="10" : ${OCF_RESKEY_scsi_reserve=${OCF_RESKEY_scsi_reserve_default}} : ${OCF_RESKEY_sharedisk=${OCF_RESKEY_sharedisk_default}} : ${OCF_RESKEY_start_loop=${OCF_RESKEY_start_loop_default}} scsi2reserve_meta_data() { cat < 1.0 The scsi-2-reserve resource agent is a place holder for SCSI-2 reservation. A healthy instance of scsi-2-reserve resource, indicates the own of the specified SCSI device. This resource agent depends on the scsi_reserve from scsires package, which is Linux specific. scsi-2 reservation The scsi_reserve is a command from scsires package. It helps one to issue SCSI-2 reservation on SCSI devices. Manages exclusive access to shared storage media thrugh SCSI-2 reservations The shared disk that can be reserved. Shared disk. We are going to try several times before giving up. Start_loop indicates how many times we are going to re-try. Times to re-try before giving up. END return $OCF_SUCCESS } scsi2reserve_usage() { cat <