Target number of data disk depends on source raid level not on working raid level. if transition is from raid0 to raid5 with working level== 5, this means that we add one disk (delta_disks == 1) but data disks number doesn't change. Signed-off-by: Adam Kwolek <adam.kwolek@xxxxxxxxx> --- Grow.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Grow.c b/Grow.c index b04faf1..baa493a 100644 --- a/Grow.c +++ b/Grow.c @@ -1174,7 +1174,7 @@ char *analyse_change(struct mdinfo *info, struct reshape *re) return "Cannot convert to RAID5 from this level"; if (info->delta_disks == UnSet) re->after.data_disks = re->before.data_disks; - else if (re->level == 5) + else if (info->array.level == 5) re->after.data_disks = re->before.data_disks + info->delta_disks; else -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html