X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fmdadm.git;a=blobdiff_plain;f=Assemble.c;fp=Assemble.c;h=420c7b3943eabc4cca8611867f77dc67c5b5b953;hp=9f050c1fd53bd212f709d969b5e0f5450f0e5395;hb=2b57e4fe041d52ae29866c93a878a11c07223cff;hpb=d2e11da4b7fd0453e942f43e4196dc63b3dbd708 diff --git a/Assemble.c b/Assemble.c index 9f050c1f..420c7b39 100644 --- a/Assemble.c +++ b/Assemble.c @@ -2061,8 +2061,22 @@ int assemble_container_content(struct supertype *st, int mdfd, spare, &c->backup_file, c->verbose) == 1) return 1; - err = sysfs_set_str(content, NULL, - "array_state", "readonly"); + if (content->reshape_progress == 0) { + /* If reshape progress is 0 - we are assembling the + * array that was stopped, before reshape has started. + * Array needs to be started as active, Grow_continue() + * will start the reshape. + */ + sysfs_set_num(content, NULL, "reshape_position", + MaxSector); + err = sysfs_set_str(content, NULL, + "array_state", "active"); + sysfs_set_num(content, NULL, "reshape_position", 0); + } else { + err = sysfs_set_str(content, NULL, + "array_state", "readonly"); + } + if (err) return 1;