summaryrefslogtreecommitdiffstats
path: root/tests/03assem-incr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-07-25 06:14:23 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-07-25 06:14:23 +0000
commit201d885cf454e026cf59e18961f025bcfa8a3142 (patch)
treebaf91f410e825f7768de9be51fe5e8556333bc7b /tests/03assem-incr
parentReleasing debian version 4.3+20240412-1. (diff)
downloadmdadm-201d885cf454e026cf59e18961f025bcfa8a3142.tar.xz
mdadm-201d885cf454e026cf59e18961f025bcfa8a3142.zip
Merging upstream version 4.3+20240723.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/03assem-incr')
-rw-r--r--tests/03assem-incr22
1 files changed, 15 insertions, 7 deletions
diff --git a/tests/03assem-incr b/tests/03assem-incr
index 38880a7..56afbf2 100644
--- a/tests/03assem-incr
+++ b/tests/03assem-incr
@@ -9,15 +9,23 @@ set -x -e
levels=(raid0 raid1 raid5)
if [ "$LINEAR" == "yes" ]; then
- levels+=( linear )
+ levels+=( linear )
fi
+is_raid_foreign $md0
+
for l in ${levels[@]}
do
- mdadm -CR $md0 -l $l -n5 $dev0 $dev1 $dev2 $dev3 $dev4 --assume-clean
- mdadm -S md0
- mdadm -I $dev1
- mdadm -I $dev3
- mdadm -A /dev/md0 $dev0 $dev1 $dev2 $dev3 $dev4
- mdadm -S /dev/md0
+ mdadm -CR $md0 -l $l -n5 $dev0 $dev1 $dev2 $dev3 $dev4 --assume-clean
+ mdadm -S $md0
+ mdadm -I $dev1
+ mdadm -I $dev3
+ mdadm -A $md0 $dev0 $dev1 $dev2 $dev3 $dev4
+ # If one array is foreign (metadata name doesn't have the machine's
+ # hostname), mdadm chooses a minor number automatically from 127
+ if [ $is_foreign == "no" ]; then
+ mdadm -S $md0
+ else
+ mdadm -S $md127
+ fi
done