mdadm ignores size parameter during creation if is less than chunk size

Bug #1897232 reported by Mariusz Tkaczyk
16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mdadm
New
Undecided
Unassigned

Bug Description

There was a bug in mdadm which causes rounding size to max if passed size was less than chunk.

Steps:

1. Create RAID container.
# mdadm --create /dev/md/imsm0 --metadata=imsm --raid-devices=2 /dev/sdi /dev/sdj --run
2. Create RAID volume with volume size less than chunk size.
# mdadm --create /dev/md/vol --level=0 --chunk=128 --size=127 --raid-devices=2 /dev/md/imsm0 --run

Expected result:
RAID volume was not created, error is thrown.
Actual result:
Size is rounded to max and full available space is used.

Fixed in upstream by:
https://git.kernel.org/pub/scm/utils/mdadm/mdadm.git/commit/?id=22dc741f63e6403d59c2c14f56fd4791265f9bbb

Tags: vroc
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.