Fix --incremental handling on cluster array.
Commit 06bd679317
("Skip clustered devices in incremental")
disabled incremental completely on clustered arrays.
What we really want is that mdadm should not start or create
a clustered array but still be able to add or readd to an existing
device. This would enable udev scripts to automatically add
or re-add a device after transient errors.
Signed-off-by: NeilBrown <neilb@suse.com>
This commit is contained in:
parent
86a406c226
commit
9d9202e301
|
@ -231,11 +231,6 @@ int Incremental(struct mddev_dev *devlist, struct context *c,
|
||||||
devname);
|
devname);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
/* Skip the clustered ones. This should be started by
|
|
||||||
* clustering resource agents
|
|
||||||
*/
|
|
||||||
if (info.array.state & (1 << MD_SB_CLUSTERED))
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
/* 3a/ if not, check for homehost match. If no match, continue
|
/* 3a/ if not, check for homehost match. If no match, continue
|
||||||
* but don't trust the 'name' in the array. Thus a 'random' minor
|
* but don't trust the 'name' in the array. Thus a 'random' minor
|
||||||
|
@ -317,6 +312,12 @@ int Incremental(struct mddev_dev *devlist, struct context *c,
|
||||||
|
|
||||||
if (mdfd < 0) {
|
if (mdfd < 0) {
|
||||||
|
|
||||||
|
/* Skip the clustered ones. This should be started by
|
||||||
|
* clustering resource agents
|
||||||
|
*/
|
||||||
|
if (info.array.state & (1 << MD_SB_CLUSTERED))
|
||||||
|
goto out;
|
||||||
|
|
||||||
/* Couldn't find an existing array, maybe make a new one */
|
/* Couldn't find an existing array, maybe make a new one */
|
||||||
mdfd = create_mddev(match ? match->devname : NULL,
|
mdfd = create_mddev(match ? match->devname : NULL,
|
||||||
name_to_use, c->autof, trustworthy, chosen_name);
|
name_to_use, c->autof, trustworthy, chosen_name);
|
||||||
|
|
Loading…
Reference in New Issue