Some raid_disks that are used for expansion, are not configured yet. This is due to earlier set raid_disks limitation. Set raid_disks to new (bigger) value and finish disks slot configuration. Signed-off-by: Adam Kwolek <adam.kwolek@xxxxxxxxx> --- Assemble.c | 15 ++++++++++++++- 1 files changed, 14 insertions(+), 1 deletions(-) diff --git a/Assemble.c b/Assemble.c index 6aff049..fa3a0a6 100644 --- a/Assemble.c +++ b/Assemble.c @@ -1586,9 +1586,22 @@ int assemble_container_content(struct supertype *st, int mdfd, chosen_name, working + preexist); if (preexist) fprintf(stderr, " (%d new)", working); - if (expansion) + if (expansion) { fprintf(stderr, " ( + %d for expansion)", expansion); + sysfs_set_num(content, NULL, "raid_disks", + content->array.raid_disks + expansion); + for (dev = content->devs; dev; dev = dev->next) + if (dev->disk.raid_disk >= + content->array.raid_disks) { + int rv; + dprintf("\n\tExpansion: configure slot:" + "%i", dev->disk.raid_disk); + rv = sysfs_set_num(content, dev, "slot", + dev->disk.raid_disk); + dprintf(" (status = %i)\n", rv); + } + } fprintf(stderr, "\n"); } if (!err) -- 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