diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-11-01 04:09:40 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-11-01 04:09:40 +0000 |
commit | 256f011d2f256c8c2c05c37a518401199fa423bf (patch) | |
tree | 8dc9f04b281a2a8d080f0f327d11f33846be8e33 /tests/25raid456-reshape-corrupt-data | |
parent | Releasing debian version 4.2+20230508-7. (diff) | |
download | mdadm-256f011d2f256c8c2c05c37a518401199fa423bf.tar.xz mdadm-256f011d2f256c8c2c05c37a518401199fa423bf.zip |
Merging upstream version 4.2+20231026.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/25raid456-reshape-corrupt-data')
-rw-r--r-- | tests/25raid456-reshape-corrupt-data | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/25raid456-reshape-corrupt-data b/tests/25raid456-reshape-corrupt-data new file mode 100644 index 0000000..fdb875f --- /dev/null +++ b/tests/25raid456-reshape-corrupt-data @@ -0,0 +1,35 @@ +devs="$dev0 $dev1 $dev2" + +set_up_test() +{ + mdadm -Cv -R -n 3 -l5 $md0 $devs --size=50M || die "create array failed" + mdadm -a $md0 $dev3 || die "failed to bind new disk to array" + mkfs.xfs -f $md0 || die "mkfs failed" + xfs_ncheck $md0 || die "check fs failed" +} + +clean_up_test() +{ + mdadm -S $md0 +} + +trap 'clean_up_test' EXIT + +set_up_test || die "set up test failed" + +# trigger reshape +echo 1000 > /sys/block/md0/md/sync_speed_max +mdadm --grow -l 6 $md0 +sleep 1 + +# stop and start reshape +echo frozen > /sys/block/md0/md/sync_action +echo system > /sys/block/md0/md/sync_speed_max +echo reshape > /sys/block/md0/md/sync_action + +mdadm -W $md0 + +# check if data is corrupted +xfs_ncheck $md0 || die "data is corrupted after reshape" + +exit 0 |