Today I ran into an issue with mdadm-3.1.1, that prevented me from growing my raid6 array (s. http://marc.info/?l=linux-raid&m=125920566107815&w=2 ) According to the developer of mdadm, this is caused by a missing typecast to 'long long', which has been fixed in git. I patched the ebuild accordingly to make it work for 3.1.1 (s. attachments). Reproducible: Always Steps to Reproduce: 1. Create a n-Disk level5 or level6 raid array with mdadm. 2. Add a spare disk. 3. Try mdadm --grow -n (n+1) Actual Results: mdadm erraneously assumes that the array size will be reduced instead of grown and warns you about it. Expected Results: The array size should be extended by the size of one component device.
Created attachment 216811 [details, diff] mdadm-3.1.1.ebuild.diff This is a diff to the current sys-fs/mdadm-3.1.1.ebuild that incorporates the grow fix and reinstates the udev rules that got deleted completely on my system before (not duplicated as in bug #295158)
Created attachment 216812 [details, diff] mdadm-3.1.1-grow-arraysize-fix.patch This is the actual fix. Works perfectly for me.
Fixed in mdadm-3.1.2, bump bug #322055
3.1.2 is in the tree now