Specifying chunksize for raid 1 is forbidden. Add test for blocking raid 1 creation with chunksize. Signed-off-by: Mateusz Kusiak <mateusz.kusiak@xxxxxxxxx> --- tests/01r1create-chunk | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/01r1create-chunk diff --git a/tests/01r1create-chunk b/tests/01r1create-chunk new file mode 100644 index 00000000..717a5e5a --- /dev/null +++ b/tests/01r1create-chunk @@ -0,0 +1,15 @@ +# RAID 1 volume, 2 disks, chunk 64 +# NEGATIVE test - creating raid 1 with chunksize specified is forbidden + +num_disks=2 +level=1 +device_list="$dev0 $dev1" +chunk=64 + +# Create raid 1 with chunk 64k and fail +if ! mdadm --create --run $md0 --auto=md --level=$level --chunk=$chunk --raid-disks=$num_disks $device_list +then + exit 0 +fi + +exit 1 -- 2.26.2