diff options
author | David Teigland <teigland@redhat.com> | 2014-12-08 16:18:41 -0600 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2014-12-19 16:29:58 -0600 |
commit | e8cd749873011283464b1766b4743f53764aa853 (patch) | |
tree | 49cf46a8ad8d42106bef9576b8d6b875a8d1021b | |
parent | a4d7c846ce21fa45834b3015f29b8e1bc0feab7c (diff) | |
download | lvm2-e8cd749873011283464b1766b4743f53764aa853.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.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c index 59d3adb88..f94031053 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); |