summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2016-01-18 16:53:14 -0600
committerDavid Teigland <teigland@redhat.com>2016-01-18 16:53:14 -0600
commit48f270970fc526f9f0ac7d074639e8ed90346586 (patch)
treec2a470adcd2560fb4fe9852ee79b8b79f5d389e7
parent6b3e402298080a4b3e352ecee3a33cd916d18b6b (diff)
downloadlvm2-48f270970fc526f9f0ac7d074639e8ed90346586.tar.gz
lvconvert: disallow test mode in shared VG
until test mode can be checked in all the necessary locations related to lvmlockd to prevent making actual changes.
-rw-r--r--tools/lvconvert.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
index d480f6ac9..13fe6e855 100644
--- a/tools/lvconvert.c
+++ b/tools/lvconvert.c
@@ -3434,6 +3434,13 @@ static int lvconvert_single(struct cmd_context *cmd, struct lvconvert_params *lp
goto_out;
}
+ if (test_mode() && is_lockd_type(vg->lock_type)) {
+ log_error("Test mode is not yet supported with lock type %s",
+ vg->lock_type);
+ unlock_and_release_vg(cmd, vg, lp->vg_name);
+ goto_out;
+ }
+
if (!(lv = find_lv(vg, lp->lv_name))) {
log_error("Can't find LV %s in VG %s", lp->lv_name, lp->vg_name);
unlock_and_release_vg(cmd, vg, lp->vg_name);