summaryrefslogtreecommitdiff
path: root/test/shell/duplicate-pvs-md0.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/shell/duplicate-pvs-md0.sh')
-rw-r--r--test/shell/duplicate-pvs-md0.sh6
1 files changed, 2 insertions, 4 deletions
diff --git a/test/shell/duplicate-pvs-md0.sh b/test/shell/duplicate-pvs-md0.sh
index 036f5707c..6ff9ba245 100644
--- a/test/shell/duplicate-pvs-md0.sh
+++ b/test/shell/duplicate-pvs-md0.sh
@@ -368,8 +368,7 @@ aux enable_dev "$dev2"
aux aux udev_wait
cat /proc/mdstat
# for some reason enabling dev2 starts an odd md dev
-mdadm --stop "$mddev" || true
-mdadm --stop --scan
+mdadm --stop $(lsblk -al -o NAME --noheadings "$dev2" | grep '^md') || true
cat /proc/mdstat
aux wipefs_a "$dev1" || true
aux wipefs_a "$dev2" || true
@@ -434,8 +433,7 @@ aux enable_dev "$dev2"
aux aux udev_wait
cat /proc/mdstat
# for some reason enabling dev2 starts an odd md dev
-mdadm --stop "$mddev" || true
-mdadm --stop --scan
+mdadm --stop $(lsblk -al -o NAME --noheadings "$dev2" | grep '^md') || true
cat /proc/mdstat
aux wipefs_a "$dev1" || true
aux wipefs_a "$dev2" || true