summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2014-12-08 16:18:41 -0600
committerDavid Teigland <teigland@redhat.com>2015-01-21 17:00:51 -0600
commit6a02a9bd9e0405e0fbecc76c58f323083b86efaa (patch)
tree1e46697e31878b2673e9a74afcee6c765a595bda
parentc5e2f496074b413b6d94b822c910445471bed424 (diff)
downloadlvm2-6a02a9bd9e0405e0fbecc76c58f323083b86efaa.tar.gz
lvconvert: prevent splitmirror in lockd VGs
To handle this, a new LV lock needs to be created for the newly split LV name.
-rw-r--r--lib/metadata/raid_manip.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c
index d50237926..edb630e81 100644
--- a/lib/metadata/raid_manip.c
+++ b/lib/metadata/raid_manip.c
@@ -21,6 +21,7 @@
#include "activate.h"
#include "lv_alloc.h"
#include "lvm-string.h"
+#include "lvmlockd.h"
static int _lv_is_raid_with_tracking(const struct logical_volume *lv,
struct logical_volume **tracking)
@@ -1066,6 +1067,12 @@ int lv_raid_split(struct logical_volume *lv, const char *split_name,
dm_list_init(&removal_list);
dm_list_init(&data_list);
+ if (is_lockd_type(lv->vg->lock_type)) {
+ log_error("Splitting raid image is not allowed with lock_type %s",
+ lv->vg->lock_type);
+ return 0;
+ }
+
if ((old_count - new_count) != 1) {
log_error("Unable to split more than one image from %s/%s",
lv->vg->name, lv->name);