summaryrefslogtreecommitdiffstats
path: root/test/shell/lvconvert-repair.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/shell/lvconvert-repair.sh')
-rw-r--r--test/shell/lvconvert-repair.sh44
1 files changed, 23 insertions, 21 deletions
diff --git a/test/shell/lvconvert-repair.sh b/test/shell/lvconvert-repair.sh
index 0aeeffa0..51bc9dea 100644
--- a/test/shell/lvconvert-repair.sh
+++ b/test/shell/lvconvert-repair.sh
@@ -113,26 +113,28 @@ aux enable_dev "$dev3"
vgextend $vg "$dev3"
lvremove -ff $vg
-# RAID5 single replace
-lvcreate --type raid5 -i 2 -l 2 -n $lv1 $vg "$dev1" "$dev2" "$dev3"
-aux wait_for_sync $vg $lv1
-aux disable_dev "$dev3"
-lvconvert -y --repair $vg/$lv1
-vgreduce --removemissing $vg
-aux enable_dev "$dev3"
-vgextend $vg "$dev3"
-lvremove -ff $vg
-
-# RAID6 double replace
-lvcreate --type raid5 -i 3 -l 2 -n $lv1 $vg \
- "$dev1" "$dev2" "$dev3" "$dev4" "$dev5"
-aux wait_for_sync $vg $lv1
-aux disable_dev "$dev4" "$dev5"
-lvconvert -y --repair $vg/$lv1
-vgreduce --removemissing $vg
-aux enable_dev "$dev4"
-aux enable_dev "$dev5"
-vgextend $vg "$dev4" "$dev5"
-lvremove -ff $vg
+if aux target_at_least dm-raid 1 1 0; then
+ # RAID5 single replace
+ lvcreate --type raid5 -i 2 -l 2 -n $lv1 $vg "$dev1" "$dev2" "$dev3"
+ aux wait_for_sync $vg $lv1
+ aux disable_dev "$dev3"
+ lvconvert -y --repair $vg/$lv1
+ vgreduce --removemissing $vg
+ aux enable_dev "$dev3"
+ vgextend $vg "$dev3"
+ lvremove -ff $vg
+
+ # RAID6 double replace
+ lvcreate --type raid5 -i 3 -l 2 -n $lv1 $vg \
+ "$dev1" "$dev2" "$dev3" "$dev4" "$dev5"
+ aux wait_for_sync $vg $lv1
+ aux disable_dev "$dev4" "$dev5"
+ lvconvert -y --repair $vg/$lv1
+ vgreduce --removemissing $vg
+ aux enable_dev "$dev4"
+ aux enable_dev "$dev5"
+ vgextend $vg "$dev4" "$dev5"
+ lvremove -ff $vg
+fi
vgremove -ff $vg