2e35d7583b
- Update for latest mdadm-4.1+ patches, this is required by jsc#SLE-10078 and jsc#SLE-9348. Mostly the purpose is for latest Intel IMSM raid support. The following patches also include previous patches with new re-ordered prefix numbers. - Makefile: install mdadm_env.sh to /usr/lib/mdadm (bsc#1111960) 0000-Makefile-install-mdadm_env.sh-to-usr-lib-mdadm.patch - Assemble: keep MD_DISK_FAILFAST and MD_DISK_WRITEMOSTLY flag (jsc#SLE-10078, jsc#SLE-9348) 0001-Assemble-keep-MD_DISK_FAILFAST-and-MD_DISK_WRITEMOST.patch - Document PART-POLICY lines (jsc#SLE-10078, jsc#SLE-9348) 0002-Document-PART-POLICY-lines.patc - policy: support devices with multiple paths. (jsc#SLE-10078, jsc#SLE-9348) 0003-policy-support-devices-with-multiple-paths.patch - mdcheck: add systemd unit files to run mdcheck. (bsc#1115407) 0004-mdcheck-add-systemd-unit-files-to-run-mdcheck.patch - Monitor: add system timer to run --oneshot periodically (bsc#1115407) 0005-Monitor-add-system-timer-to-run-oneshot-periodically.patch - imsm: update metadata correctly while raid10 double (jsc#SLE-10078, jsc#SLE-9348) 0006-imsm-update-metadata-correctly-while-raid10-double-d.patch - Assemble: mask FAILFAST and WRITEMOSTLY flags when finding (jsc#SLE-10078, jsc#SLE-9348) 0007-Assemble-mask-FAILFAST-and-WRITEMOSTLY-flags-when-fi.patch - Grow: avoid overflow in compute_backup_blocks() (jsc#SLE-10078, jsc#SLE-9348) 0008-Grow-avoid-overflow-in-compute_backup_blocks.patch - Grow: report correct new chunk size. (jsc#SLE-10078, jsc#SLE-9348) 0009-Grow-report-correct-new-chunk-size.patch OBS-URL: https://build.opensuse.org/request/show/781064 OBS-URL: https://build.opensuse.org/package/show/Base:System/mdadm?expand=0&rev=181
105 lines
2.6 KiB
Diff
105 lines
2.6 KiB
Diff
From 76b906d2406cdf136f64de77e881eb2d180108d9 Mon Sep 17 00:00:00 2001
|
|
From: Gioh Kim <gi-oh.kim@cloud.ionos.com>
|
|
Date: Fri, 7 Dec 2018 14:30:09 +0100
|
|
Subject: [PATCH] mdadm/tests: add one test case for failfast of raid1
|
|
Git-commit: 76b906d2406cdf136f64de77e881eb2d180108d9
|
|
Patch-mainline: mdadm-4.1+
|
|
References: jsc#SLE-10078, jsc#SLE-9348
|
|
|
|
This creates raid1 device with the failfast option and check all
|
|
slaves have the failfast flag. And it does assembling and growing
|
|
the raid1 device and check the failfast works fine.
|
|
|
|
Signed-off-by: Gioh Kim <gi-oh.kim@cloud.ionos.com>
|
|
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
|
|
Signed-off-by: Coly Li <colyli@suse.de>
|
|
|
|
---
|
|
tests/05r1-failfast | 74 +++++++++++++++++++++++++++++++++++++++++++++
|
|
1 file changed, 74 insertions(+)
|
|
create mode 100644 tests/05r1-failfast
|
|
|
|
diff --git a/tests/05r1-failfast b/tests/05r1-failfast
|
|
new file mode 100644
|
|
index 0000000..823dd6f
|
|
--- /dev/null
|
|
+++ b/tests/05r1-failfast
|
|
@@ -0,0 +1,74 @@
|
|
+
|
|
+# create a simple mirror and check failfast flag works
|
|
+mdadm -CR $md0 -e1.2 --level=raid1 --failfast -n2 $dev0 $dev1
|
|
+check raid1
|
|
+if grep -v failfast /sys/block/md0/md/rd*/state > /dev/null
|
|
+then
|
|
+ die "failfast missing"
|
|
+fi
|
|
+
|
|
+# Removing works with the failfast flag
|
|
+mdadm $md0 -f $dev0
|
|
+mdadm $md0 -r $dev0
|
|
+if grep -v failfast /sys/block/md0/md/rd1/state > /dev/null
|
|
+then
|
|
+ die "failfast missing"
|
|
+fi
|
|
+
|
|
+# Adding works with the failfast flag
|
|
+mdadm $md0 -a --failfast $dev0
|
|
+check wait
|
|
+if grep -v failfast /sys/block/md0/md/rd0/state > /dev/null
|
|
+then
|
|
+ die "failfast missing"
|
|
+fi
|
|
+
|
|
+mdadm -S $md0
|
|
+
|
|
+# Assembling works with the failfast flag
|
|
+mdadm -A $md0 $dev0 $dev1
|
|
+check raid1
|
|
+if grep -v failfast /sys/block/md0/md/rd*/state > /dev/null
|
|
+then
|
|
+ die "failfast missing"
|
|
+fi
|
|
+
|
|
+# Adding works with the nofailfast flag
|
|
+mdadm $md0 -f $dev0
|
|
+mdadm $md0 -r $dev0
|
|
+mdadm $md0 -a --nofailfast $dev0
|
|
+check wait
|
|
+if grep failfast /sys/block/md0/md/rd0/state > /dev/null
|
|
+then
|
|
+ die "failfast should be missing"
|
|
+fi
|
|
+
|
|
+# Assembling with one faulty slave works with the failfast flag
|
|
+mdadm $md0 -f $dev0
|
|
+mdadm $md0 -r $dev0
|
|
+mdadm -S $md0
|
|
+mdadm -A $md0 $dev0 $dev1
|
|
+check raid1
|
|
+mdadm -S $md0
|
|
+
|
|
+# Spare works with the failfast flag
|
|
+mdadm -CR $md0 -e1.2 --level=raid1 --failfast -n2 $dev0 $dev1
|
|
+check raid1
|
|
+mdadm $md0 -a --failfast $dev2
|
|
+check wait
|
|
+check spares 1
|
|
+if grep -v failfast /sys/block/md0/md/rd*/state > /dev/null
|
|
+then
|
|
+ die "failfast missing"
|
|
+fi
|
|
+
|
|
+# Grow works with the failfast flag
|
|
+mdadm -G $md0 --raid-devices=3
|
|
+check wait
|
|
+if grep -v failfast /sys/block/md0/md/rd*/state > /dev/null
|
|
+then
|
|
+ die "failfast missing"
|
|
+fi
|
|
+mdadm -S $md0
|
|
+
|
|
+exit 0
|
|
--
|
|
2.25.0
|
|
|