cluster/rgmanager/src/resources lvm.sh
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: jbrassow at sourceware.org 2008-02-06 16:40:27
Modified files:
rgmanager/src/resources: lvm.sh
Log message:
- better checking for improper setup
-- this time for presence of fail-over VG in the volume_list
rgmanager/src/resources/lvm.sh +17 -4
@@ -56,11 +56,24 @@ { ## # Machine's cluster node name must be present as - # a tag in lvm.conf:activation/volume_list + # a tag in lvm.conf:activation/volume_list and the volume group + # to be failed over must NOT be there. ## - if ! lvm dumpconfig activation/volume_list >& /dev/null || - ! lvm dumpconfig activation/volume_list | grep $(local_node_name); then - ocf_log err "lvm.conf improperly configured for HA LVM." + if ! lvm dumpconfig activation/volume_list >& /dev/null; then + ocf_log err "HA LVM: Improper setup detected" + ocf_log err "- \"volume_list\" not specified in lvm.conf." + return $OCF_ERR_GENERIC + fi + + if ! lvm dumpconfig activation/volume_list | grep $(local_node_name); then + ocf_log err "HA LVM: Improper setup detected" + ocf_log err "- @$(local_node_name) missing from \"volume_list\" in lvm.conf" + return $OCF_ERR_GENERIC + fi + + if lvm dumpconfig activation/volume_list | grep $OCF_RESKEY_vg_name; then + ocf_log err "HA LVM: Improper setup detected" + ocf_log err "- $OCF_RESKEY_vg_name found in \"volume_list\" in lvm.conf" return $OCF_ERR_GENERIC fi