From c52c9a1e316b6a92a2475dfe3ad2aac92edc80c0 Mon Sep 17 00:00:00 2001 From: Peter Rajnoha Date: Thu, 7 Aug 2014 16:44:09 +0200 Subject: [PATCH] activation: if LV inactive and non-clustered, do not issue "Cannot deactivate" on -aln The message "Cannot deactivate remotely exclusive device locally." makes sense only for clustered LV. If the LV is non-clustered, then it's always exclusive by definition and if it's already deactivated, this message pops up inappropriately as those two conditions are met. So issue the message only if the conditions are met AND we have clustered VG. --- WHATS_NEW | 1 + lib/metadata/lv.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/WHATS_NEW b/WHATS_NEW index 028758efb..96ce8cb05 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.110 - ================================== + If LV inactive and non-clustered, do not issue "Cannot deactivate" on -aln. Remove spurious "Skipping mirror LV" message on pvmove of clustered mirror. Version 2.02.109 - 5th August 2014 diff --git a/lib/metadata/lv.c b/lib/metadata/lv.c index f2c9b1262..953936966 100644 --- a/lib/metadata/lv.c +++ b/lib/metadata/lv.c @@ -859,7 +859,7 @@ deactivate: return_0; break; case CHANGE_ALN: - if (_lv_is_exclusive(lv)) { + if (vg_is_clustered(lv->vg) && _lv_is_exclusive(lv)) { if (!lv_is_active_locally(lv)) { log_error("Cannot deactivate remotely exclusive device locally."); return 0;