Blame SOURCES/lvm2-2_02_181-reject-conversions-trackchanges-LVs.patch

5e29a5
 WHATS_NEW                                        | 1 +
5e29a5
 test/shell/lvconvert-raid1-split-trackchanges.sh | 7 +++++++
5e29a5
 tools/lvconvert.c                                | 6 ++++++
5e29a5
 3 files changed, 14 insertions(+)
5e29a5
5e29a5
diff --git a/WHATS_NEW b/WHATS_NEW
5e29a5
index 7c74c50..3b15325 100644
5e29a5
--- a/WHATS_NEW
5e29a5
+++ b/WHATS_NEW
5e29a5
@@ -1,5 +1,6 @@
5e29a5
 Version 2.02.181 - 
5e29a5
 =================================
5e29a5
+  lvconvert: reject conversions on raid1 LVs with split tracked SubLVs
5e29a5
   lvconvert: reject conversions on raid1 split tracked SubLVs
5e29a5
 
5e29a5
 Version 2.02.180 - 19th July 2018
5e29a5
diff --git a/test/shell/lvconvert-raid1-split-trackchanges.sh b/test/shell/lvconvert-raid1-split-trackchanges.sh
5e29a5
index e25a632..718c254 100644
5e29a5
--- a/test/shell/lvconvert-raid1-split-trackchanges.sh
5e29a5
+++ b/test/shell/lvconvert-raid1-split-trackchanges.sh
5e29a5
@@ -27,6 +27,13 @@ vgcreate $SHARED -s 512k "$vg" "${DEVICES[@]}"
5e29a5
 lvcreate -y --ty raid1 -m 2 -n $lv1 -l 1 $vg
5e29a5
 lvconvert -y --splitmirrors 1 --trackchanges $vg/$lv1
5e29a5
 
5e29a5
+not lvconvert -y --ty linear $vg/$lv1
5e29a5
+not lvconvert -y --ty striped -i 3 $vg/$lv1
5e29a5
+not lvconvert -y --ty mirror $vg/$lv1
5e29a5
+not lvconvert -y --ty raid4 $vg/$lv1
5e29a5
+not lvconvert -y --ty raid5 $vg/$lv1
5e29a5
+not lvconvert -y --ty raid6 $vg/$lv1
5e29a5
+not lvconvert -y --ty raid10 $vg/$lv1
5e29a5
 not lvconvert -y --ty striped -m 1 $vg/${lv1}_rimage_2
5e29a5
 not lvconvert -y --ty raid1 -m 1 $vg/${lv1}_rimage_2
5e29a5
 not lvconvert -y --ty mirror -m 1 $vg/${lv1}_rimage_2
5e29a5
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
5e29a5
index 079c3cd..731a210 100644
5e29a5
--- a/tools/lvconvert.c
5e29a5
+++ b/tools/lvconvert.c
5e29a5
@@ -1170,6 +1170,12 @@ static int _raid_split_image_conversion(struct logical_volume *lv)
5e29a5
 {
5e29a5
 	const char *s;
5e29a5
 
5e29a5
+	if (lv_is_raid_with_tracking(lv)) {
5e29a5
+		log_error("Conversion of tracking raid1 LV %s is not supported.",
5e29a5
+			  display_lvname(lv));
5e29a5
+		return 1;
5e29a5
+	}
5e29a5
+
5e29a5
 	if (lv_is_raid_image(lv) &&
5e29a5
 	    (s = strstr(lv->name, "_rimage_"))) {
5e29a5
 		size_t len = s - lv->name;