summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2014-12-08 16:18:41 -0600
committerDavid Teigland <teigland@redhat.com>2015-03-03 15:43:22 -0600
commitc013d2fbf2435dbe54a0d9ffc03e3e4e89a542a6 (patch)
treef576f3cb5a692c445d56e8f0323bc2e7a2f7b75a
parent4cecf0bd2e68cc5a1033188990546bf2e97986b8 (diff)
downloadlvm2-c013d2fbf2435dbe54a0d9ffc03e3e4e89a542a6.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 c786e8992..9aad3ddbe 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);