Skip to content

Commit 6073546

Browse files
authored
Merge pull request #921 from oalbrigt/LVM-fix-partial-activation
LVM: fix partial activation
2 parents fb16175 + 42d2981 commit 6073546

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

heartbeat/LVM

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,8 @@ LVM_validate_all() {
548548
# "unknown device" then another node may have marked a device missing
549549
# where we have access to all of them and can start without issue.
550550
if vgs -o pv_attr --noheadings $OCF_RESKEY_volgrpname 2>/dev/null | grep 'm' > /dev/null 2>&1; then
551-
if vgs -o pv_name --noheadings $OCF_RESKEY_volgrpname 2>/dev/null | grep -E "unknown device|Couldn't find device|Device mismatch detected" > /dev/null 2>&1; then
551+
case $(vgs -o attr --noheadings $OCF_RESKEY_volgrpname | tr -d ' ') in
552+
???p??*)
552553
if ! ocf_is_true "$OCF_RESKEY_partial_activation" ; then
553554
# We are missing devices and cannot activate partially
554555
ocf_exit_reason "Volume group [$VOLUME] has devices missing. Consider partial_activation=true to attempt to activate partially"
@@ -558,7 +559,8 @@ LVM_validate_all() {
558559
# Assume that caused the vgck failure and carry on
559560
ocf_log warn "Volume group inconsistency detected with missing device(s) and partial_activation enabled. Proceeding with requested action."
560561
fi
561-
fi
562+
;;
563+
esac
562564
# else the vg is partial but all devices are accounted for, so another
563565
# node must have marked the device missing. Proceed.
564566
else

0 commit comments

Comments
 (0)