#!/bin/sh # # OCF resource agent for mapping and unmapping # RADOS Block Devices (RBDs) # # License: GNU Lesser General Public License (LGPL) 2.1 # (c) 2012 Florian Haas, hastexo # # Initialization: : ${OCF_FUNCTIONS_DIR=${OCF_ROOT}/lib/heartbeat} . ${OCF_FUNCTIONS_DIR}/ocf-shellfuncs # Convenience variables # When sysconfdir isn't passed in as a configure flag, # it's defined in terms of prefix prefix=@prefix@ # Defaults OCF_RESKEY_pool_default="rbd" OCF_RESKEY_cephconf_default="@sysconfdir@/@PACKAGE_TARNAME@/@PACKAGE_TARNAME@.conf" : ${OCF_RESKEY_pool=${OCF_RESKEY_pool_default}} : ${OCF_RESKEY_cephconf=${OCF_RESKEY_cephconf_default}} rbd_meta_data() { cat < 0.1 Manages RADOS Block Devices (RBDs) as a highly available resource. Maps and unmaps RBDs as needed. Maps and unmaps RADOS Block Devices Name of the RBD device. RBD device name Name of the RADOS pool namespace where the RBD has been created RADOS pool namespace name Name of the RADOS pool where the RBD has been created RADOS pool name Name of the device snapshot to map. Snapshot name Location of the Ceph configuration file Ceph configuration file Address (or comma-separated list of addresses) of monitor servers to connect to. Overrides values from configuration file. Monitor address(es) Username to use when mapping the device. Required if Ceph authentication is enabled on the monitor. Authentication username File containing an authentication secret. Required if Ceph authentication is enabled on the monitor. Authentication secret file EOF } rbd_usage() { cat <