When growing a raid0 device, if the new component disk size is not big enough, the grow operation may fail due to lack of backup space. The minimum backup space should be larger than LCM(old, new) * chunk-size * 2 Here LCM stands for Least Common Multiple calculation, old and new are devices' numbers before and after the grow operation, "* 2" comes from the fact that mdadm refuses to use more than half of a spare device for backup space. There are users reporting such failure when they grew a raid0 array with small component disk. Neil Brown points out this is not a bug and how the failure comes. This patch adds note information into mdadm(8) man page in the Notes part of GROW MODE section, to explain the minimum size requirement of new component disk size or external backup size. Signed-off-by: Coly Li <colyli@xxxxxxx> Cc: NeilBrown <neilb@xxxxxxx> Cc: Paul Menzel <pmenzel@xxxxxxxxxxxxx> Cc: Wols Lists <antlists@xxxxxxxxxxxxxxx> Cc: Nix <nix@xxxxxxxxxxxxx> --- mdadm.8.in | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mdadm.8.in b/mdadm.8.in index 9aec9f4..e5074c0 100644 --- a/mdadm.8.in +++ b/mdadm.8.in @@ -2727,6 +2727,14 @@ option and it is transparent for assembly feature. .IP \(bu 4 Roaming between Windows(R) and Linux systems for IMSM metadata is not supported during grow process. +.IP \(bu 4 +When growing a raid0 device, the new component disk size (or external +backup size) should be larger than LCM(old, new) * chunk-size * 2. Here +LCM stands for Least Common Multiple calculation, old and new are +devices' numbers before and after the grow operation, "* 2" comes from +the fact that mdadm refuses to use more than half of a spare device for +backup space. + .SS SIZE CHANGES Normally when an array is built the "size" is taken from the smallest -- 2.16.4