summaryrefslogtreecommitdiff
path: root/mdadm.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2013-10-31 10:41:50 +1100
committerNeilBrown <neilb@suse.de>2013-10-31 10:41:50 +1100
commitf33a71f107a5ad35345215ee8ebf9920a00099b0 (patch)
treed2625c5e474630c8c283db18263384a89cc22570 /mdadm.c
parent422da715d933f61c55ca50defc8b7c969af2237f (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.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mdadm.c b/mdadm.c
index d3cf0fad..359e9f91 100644
--- a/mdadm.c
+++ b/mdadm.c
@@ -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;