cluster/rgmanager/src/resources lvm_by_lv.sh
CVSROOT: /cvs/cluster
Module name: cluster
Changes by: jbrassow at sourceware.org 2008-01-04 20:02:20
Modified files:
rgmanager/src/resources: lvm_by_lv.sh
Log message:
- a regression... When tagging at the LV-level, the script should complain if there is more than one LV / VG.
rgmanager/src/resources/lvm_by_lv.sh +12 -0
@@ -314,6 +314,18 @@ function lv_start { + if ! lvs $OCF_RESKEY_vg_name >& /dev/null; then + lv_count=0 + else + lv_count=`lvs --noheadings -o name $OCF_RESKEY_vg_name | grep -v _mlog | grep -v _mimage | grep -v nconsistent | wc -l` + fi + if [ $lv_count -gt 1 ]; then + ocf_log err "HA LVM requires Only one logical volume per volume group." + ocf_log err "There are currently $lv_count logical volumes in $OCF_RESKEY_vg_name" + ocf_log err "Failing HA LVM start of $OCF_RESKEY_vg_name/$OCF_RESKEY_lv_name" + exit $OCF_ERR_GENERIC + fi + if ! lv_activate start; then return 1 fi