diff options
author | NeilBrown <neilb@suse.de> | 2013-10-31 10:41:50 +1100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2013-10-31 10:41:50 +1100 |
commit | f33a71f107a5ad35345215ee8ebf9920a00099b0 (patch) | |
tree | d2625c5e474630c8c283db18263384a89cc22570 /mdadm.c | |
parent | 422da715d933f61c55ca50defc8b7c969af2237f (diff) |
Add support for --add-spare
--add-spare is like --add, but a --re-add is never attempted.
So it is equivalent to two separate commands:
--zero-metadata
--add
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'mdadm.c')
-rw-r--r-- | mdadm.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -187,6 +187,7 @@ int main(int argc, char *argv[]) break; case 'a': case Add: + case AddSpare: case 'r': case Remove: case Replace: @@ -915,6 +916,9 @@ int main(int argc, char *argv[]) case O(MANAGE,Add): /* add a drive */ devmode = 'a'; continue; + case O(MANAGE,AddSpare): /* add drive - never re-add */ + devmode = 'S'; + continue; case O(MANAGE,ReAdd): devmode = 'A'; continue; |