diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-12-12 17:22:06 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-12-12 17:22:06 +0000 |
commit | 702eb8bf57b076e15e074f6a0c6fd04fb62546d9 (patch) | |
tree | e356c38fbe7b86af13593f321fa0da09a991e76f /tests/05r1-re-add-nosuper | |
parent | Adding upstream version 4.3+20241108. (diff) | |
download | mdadm-upstream.tar.xz mdadm-upstream.zip |
Adding upstream version 4.3+20241202.upstream/4.3+20241202upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/05r1-re-add-nosuper')
-rw-r--r-- | tests/05r1-re-add-nosuper | 32 |
1 files changed, 6 insertions, 26 deletions
diff --git a/tests/05r1-re-add-nosuper b/tests/05r1-re-add-nosuper index 7d41fd7..750d7c1 100644 --- a/tests/05r1-re-add-nosuper +++ b/tests/05r1-re-add-nosuper @@ -1,12 +1,8 @@ - # -# create a raid1, remove a drive, and readd it. -# resync should be instant. -# Then do some IO first. Resync should still be very fast +# create a raid1 without superblock, remove a drive, and readd it. +# readd should fail. # -bmf=$targetdir/bitmap2 -rm -f $bmf -yes | mdadm -B $md0 -l1 -n2 -b$bmf -d1 $dev1 $dev2 +mdadm -B $md0 -l1 -n2 -d1 $dev1 $dev2 check resync check wait testdev $md0 1 $size 1 @@ -15,24 +11,8 @@ sleep 4 mdadm $md0 -f $dev2 sleep 1 mdadm $md0 -r $dev2 -mdadm $md0 --re-add $dev2 -check nosync +if mdadm $md0 --re-add $dev2; then + err "re-add should fail" +fi -mdadm $md0 -f $dev2 -sleep 1 -mdadm $md0 -r $dev2 -testdev $md0 1 $size 1 -mdadm $md0 --re-add $dev2 -check wait -cmp --bytes=$[$mdsize0*1024] $dev1 $dev2 - -mdadm $md0 -f $dev2; sleep 1 -mdadm $md0 -r $dev2 -if dd if=/dev/zero of=$md0 ; then : ; fi -blockdev --flushbufs $md0 # make sure writes have been sent -mdadm $md0 --re-add $dev2 -check recovery -check wait -# should BLKFLSBUF and then read $dev1/$dev2... -cmp --bytes=$[$mdsize0*1024] $file1 $file2 mdadm -S $md0 |