diff options
author | David Teigland <teigland@redhat.com> | 2014-12-08 16:18:41 -0600 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2014-12-10 14:04:15 -0600 |
commit | 91e677cdab22f056f1541829517d6f234c775a53 (patch) | |
tree | d4080b775982188608b45af473ec76ba22631b07 | |
parent | a4fedaa023be265d829f0d2ed28dacdbb47c0eaa (diff) | |
download | lvm2-91e677cdab22f056f1541829517d6f234c775a53.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); |