diff options
author | NeilBrown <neilb@suse.de> | 2010-07-06 11:46:04 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2010-07-06 12:07:07 +1000 |
commit | 7d2e6486e34180215e4859c3b342246dfc6c07a0 (patch) | |
tree | 9ec3ec035088063fa72d2f148b5951fc9ddc9738 /mdadm.c | |
parent | a4e13010df574a1ce597efe9cb15ed6d6003b8bb (diff) | |
download | mdadm-7d2e6486e34180215e4859c3b342246dfc6c07a0.tar.gz |
Add --test option to --re-add and similar
--test can be given in Manage mode.
This can be used when there is an attempt to fail or remove 'faulty',
'failed' or 'detached' devices, or to re-add 'missing' devices.
If no devices were failed, removed, or re-added, then mdadm will
exit with status '2'.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'mdadm.c')
-rw-r--r-- | mdadm.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -796,6 +796,9 @@ int main(int argc, char *argv[]) } runstop = -1; continue; + case O(MANAGE,'t'): + test = 1; + continue; case O(MISC,'Q'): case O(MISC,'D'): @@ -1064,7 +1067,7 @@ int main(int argc, char *argv[]) rv = Manage_ro(devlist->devname, mdfd, readonly); if (!rv && devs_found>1) rv = Manage_subdevs(devlist->devname, mdfd, - devlist->next, verbose-quiet); + devlist->next, verbose-quiet, test); if (!rv && readonly < 0) rv = Manage_ro(devlist->devname, mdfd, readonly); if (!rv && runstop) |