diff options
author | Goldwyn Rodrigues <rgoldwyn@suse.com> | 2015-08-26 11:35:21 -0500 |
---|---|---|
committer | NeilBrown <neilb@suse.com> | 2015-09-28 14:42:55 +1000 |
commit | 9d9202e301f0fd1b6d4021f11f3d3f9bcfb053dd (patch) | |
tree | 19c45fefcc9da0fc263f768f746ef18f920625da /Incremental.c | |
parent | 86a406c2262e1db3309623413992eecbb9ee1ce3 (diff) | |
download | mdadm-9d9202e301f0fd1b6d4021f11f3d3f9bcfb053dd.tar.gz |
Fix --incremental handling on cluster array.
Commit 06bd679317a2 ("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>
Diffstat (limited to 'Incremental.c')
-rw-r--r-- | Incremental.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Incremental.c b/Incremental.c index 304cc6d..43fddfd 100644 --- a/Incremental.c +++ b/Incremental.c @@ -231,11 +231,6 @@ int Incremental(struct mddev_dev *devlist, struct context *c, devname); 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 * 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) { + /* 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 */ mdfd = create_mddev(match ? match->devname : NULL, name_to_use, c->autof, trustworthy, chosen_name); |