diff options
author | David Teigland <teigland@redhat.com> | 2014-12-08 16:18:41 -0600 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2015-03-11 13:31:15 -0500 |
commit | 57155cc4c97639f06be0c8ce06c83e68dca3c0ef (patch) | |
tree | b0746160abc50b6574eefb31a17c321b7dabcdf2 | |
parent | b27a09cb40b7c374a09c80b30beedff683de2652 (diff) | |
download | lvm2-57155cc4c97639f06be0c8ce06c83e68dca3c0ef.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 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); |