* main - tests: add aux mdadm_assemble
@ 2021-03-26 19:50 Zdenek Kabelac
0 siblings, 0 replies; only message in thread
From: Zdenek Kabelac @ 2021-03-26 19:50 UTC (permalink / raw)
To: lvm-devel
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=4c59b2aa216cb5649fe5e3f54230e85ee994869b
Commit: 4c59b2aa216cb5649fe5e3f54230e85ee994869b
Parent: 5ef8d845694c79683ebdbdeec69eb2e534f4b1d2
Author: Zdenek Kabelac <zkabelac@redhat.com>
AuthorDate: Fri Mar 26 16:05:42 2021 +0100
Committer: Zdenek Kabelac <zkabelac@redhat.com>
CommitterDate: Fri Mar 26 20:39:41 2021 +0100
tests: add aux mdadm_assemble
Wrapper for slowed version of mdadm --assemble
---
test/lib/aux.sh | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/test/lib/aux.sh b/test/lib/aux.sh
index 6cf86bc38..0ce2b8b07 100644
--- a/test/lib/aux.sh
+++ b/test/lib/aux.sh
@@ -780,6 +780,22 @@ mdadm_create() {
done
}
+mdadm_assemble() {
+ STRACE=
+ [ "$DM_DEV_DIR" = "/dev" ] && mdadm -V 2>&1 | grep " v3.2" && {
+ # use this 'trick' to slow down mdadm which otherwise
+ # is racing with udev rule since mdadm internally
+ # opens and closes raid leg devices in RW mode and then
+ # tries to get exlusive access to the leg device during
+ # insertion to kernel and fails during assembly
+ # There can be some other affected version of mdadm.
+ STRACE="strace -f -o /dev/null"
+ }
+
+ $STRACE mdadm --assemble "$@"
+ udev_wait
+}
+
cleanup_md_dev() {
local IFS=$IFS_NL
local i
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-03-26 19:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-26 19:50 main - tests: add aux mdadm_assemble Zdenek Kabelac
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.