]> git.ipfire.org Git - thirdparty/mdadm.git/commit
Assemble: start dirty and degraded array.
authorMariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Wed, 21 Jul 2021 15:47:54 +0000 (17:47 +0200)
committerJes Sorensen <jsorensen@fb.com>
Tue, 27 Jul 2021 21:35:33 +0000 (17:35 -0400)
commit92a647c8a0ea26697967174fe24bc5cc47ce8f30
treea87b6ed5f7e58b381e5d918b5eabb0a747f6103f
parent1c275381c92941d74daf840c495ef6f840fcd6b7
Assemble: start dirty and degraded array.

The case when array is already degraded has been omitted
by commit 7b99edab2834 ("Assemble.c: respect force flag.").
Appropriative support has been added now.

Handlers for "run" and "force" have been divided into independent
routines. Especially force has to be as meaningless as possible.
It respects following rules:
    - user agrees to start array as degraded (by --run) or is already
      degraded
    - raid456 module is in use
    - some drives are missing (to limit potential abuses)

It doesn't allow to skip resync on dirty, but not degraded array.

This patch cleans up message generation for external array and makes it
consistent. Following code could be reused also for native.

In current implementation assemble_container_content is called once, in
both Incremental or Assembly mode. Thus makes that partial assembly is
not likely to happen. It is possible, but requires user input.
Partial assembly during reshape fails (sysfs_set_array
error - not yet investigated). For now I put FIXME to mark current
logic as known to be buggy because preexist_cnt contains both exp_cnt
and new_cnt which may produce an incorrect message.

Check for new disks and runstop is unnecessary, so has been removed.
This allows to print assemble status in every case, even if nothing new
happens.

Reported-by: Devon Beets <devon@sigmalabsinc.com>
Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Assemble.c
mdadm.8.in
super-intel.c