diff options
author | Xiao Ni <xni@redhat.com> | 2024-05-22 10:50:44 +0200 |
---|---|---|
committer | Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com> | 2024-05-24 10:05:19 +0200 |
commit | 23f45965a0abe3506885c8e8005ee79473a66422 (patch) | |
tree | 6af51d8cfd6aee8d7acf8f493c60b20a38301f86 /tests | |
parent | mdadm/tests: names_template enhance (diff) | |
download | mdadm-23f45965a0abe3506885c8e8005ee79473a66422.tar.xz mdadm-23f45965a0abe3506885c8e8005ee79473a66422.zip |
mdadm/tests: 03assem-incr enhance
It fails when hostname lenght > 32. Because the super1 metadata name
doesn't include hostname when hostname length > 32. Then mdadm thinks
the array is a foreign array if no device link is specified when
assembling the array. It chooses a minor number from 127.
Signed-off-by: Xiao Ni <xni@redhat.com>
Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/03assem-incr | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/tests/03assem-incr b/tests/03assem-incr index 38880a7f..21215a34 100644 --- a/tests/03assem-incr +++ b/tests/03assem-incr @@ -9,15 +9,21 @@ set -x -e levels=(raid0 raid1 raid5) if [ "$LINEAR" == "yes" ]; then - levels+=( linear ) + levels+=( linear ) fi 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 |