Package: mdadm Version: 3.3.2-5+deb8u1 Severity: normal On a raid5 array with 4 components (array size 5778520512KiB, used dev size 1932563136KiB):
------ # mdadm --grow --size 11557041024 /dev/md/entrepot mdadm: component size of /dev/md/entrepot unchanged at 1932563136K unfreeze # mdadm --grow --size 5778520512 /dev/md/entrepot ## BUG mdadm: component size of /dev/md/entrepot has been set to 1483553216K unfreeze # mdadm --grow --size 1932563136K /dev/md/entrepot mdadm: component size of /dev/md/entrepot has been set to 1932563136K unfreeze # mdadm -G --size 3500G /dev/md/entrepot mdadm: component size of /dev/md/entrepot unchanged at 1932563136K unfreeze ------ In the second case the size of ~5,3TiB is truncated to 1,3TiB (-4TiB). In the first case the value given of 10,6TiB is too large; it could be seen as 2,6TiB but not 0,6TiB (<=1932563136KiB) so we could presume that a size below 4TiB would not be truncated which the 4th example confirms. I do not know what is the maximum size accepted by md for a component, but if the truncation happens outside mdadm (e.g. in the kernel), at least a check should be added to mdadm. The limit of 4TiB is the one of a 32bit address of sectors of 1KiB; I cannot test this bug on a 64 bit platform. -- System Information: Debian Release: 8.7 bug reported on another computer; here is some manual info: kernel debian linux-image-3.16.0-4-686-pae 3.16.36-1+deb8u2 processor AMD Athlon 32bit mono core