summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2015-07-10 11:46:24 -0500
committerDavid Teigland <teigland@redhat.com>2015-07-10 15:53:21 -0500
commitc4fdcb04be174dd3ec68eb0c3f17dd8a08314b59 (patch)
treee6451b812511c462e982c68db055bb41e5f60c3d
parent0823511262bd52bb14b150a180fcd23ea35fc8fb (diff)
downloadlvm2-c4fdcb04be174dd3ec68eb0c3f17dd8a08314b59.tar.gz
lvconvert: disallow splitting in lockd VGs
A new lockd lock needs to be created for the new LV created by split mirror and split snapshot. Disallow these options in lockd VGs until that is implemented.
-rw-r--r--tools/lvconvert.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
index b10798e77..c543a1e29 100644
--- a/tools/lvconvert.c
+++ b/tools/lvconvert.c
@@ -1130,6 +1130,12 @@ static int _lvconvert_mirrors_parse_params(struct cmd_context *cmd,
*old_mimage_count = lv_mirror_count(lv);
*old_log_count = _get_log_count(lv);
+ if (is_lockd_type(lv->vg->lock_type) && arg_count(cmd, splitmirrors_ARG)) {
+ /* FIXME: we need to create a lock for the new LV. */
+ log_error("Unable to split mirrors in VG with lock_type %s", lv->vg->lock_type);
+ return 0;
+ }
+
/*
* Collapsing a stack of mirrors:
*
@@ -1838,6 +1844,12 @@ static int _lvconvert_splitsnapshot(struct cmd_context *cmd, struct logical_volu
return 0;
}
+ if (is_lockd_type(vg->lock_type)) {
+ /* FIXME: we need to create a lock for the new LV. */
+ log_error("Unable to split snapshots in VG with lock_type %s", vg->lock_type);
+ return 0;
+ }
+
if (!vg_check_status(vg, LVM_WRITE))
return_0;