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

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