From: Marian Csontos Date: Tue, 26 Nov 2019 08:11:05 +0000 (+0100) Subject: tests: Find md name using lsblk X-Git-Tag: v2_03_07~24 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Fdev-mcsontos-md-stop-scan;p=lvm2.git tests: Find md name using lsblk After stopping MD device and rescanning the leg, it is created with different name. --- 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 diff --git a/test/shell/duplicate-pvs-md1.sh b/test/shell/duplicate-pvs-md1.sh index 64d9b98ef..0e1b83cca 100644 --- a/test/shell/duplicate-pvs-md1.sh +++ b/test/shell/duplicate-pvs-md1.sh @@ -415,8 +415,7 @@ aux enable_dev "$dev2" 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 @@ -480,8 +479,7 @@ aux enable_dev "$dev2" 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 @@ -619,8 +617,7 @@ aux enable_dev "$dev4" 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