Improve --re-add documentation

and add the fact that --test can now be used with --manage
operations.

Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
NeilBrown 2010-07-07 13:35:07 +10:00
parent 0ad6835c98
commit 3d5279b053
1 changed files with 38 additions and 14 deletions

View File

@ -1010,26 +1010,50 @@ homehost to match the current host.
.SH For Manage mode: .SH For Manage mode:
.TP
.BR \-t ", " \-\-test
Unless a more serious error occurred,
.I mdadm
will exit with a status of 2 if no changes were made to the array and
0 if at least one change was made.
This can be useful when an indirect specifier such as
.BR missing ,
.B detached
or
.B faulty
is used in requesting an operation on the array.
.B \-\-test
will report failure if these specifiers didn't find any match.
.TP .TP
.BR \-a ", " \-\-add .BR \-a ", " \-\-add
hot-add listed devices. For arrays with redundancy, the listed hot-add listed devices.
devices become available as spares. If the array is degraded, it will If a device appears to have recently been part of the array
immediately start recovering data on to one of these spares. (possibly it failed or was removed) the device is re-added as describe
in the next point.
If that fails or the device was never part of the array, the device is
added as a hot-spare.
If the array is degraded, it will immediately start to rebuild data
onto that spare.
Note that this and the following options are only meaningful on array
with redundancy. They don't apply to RAID0 or Linear.
.TP .TP
.BR \-\-re\-add .BR \-\-re\-add
re\-add a device that was recently removed from an array. This is re\-add a device that was previous removed from an array.
normally only needed for arrays that have be built (i.e. with If the metadata on the device reports that it is a member of the
.BR --build ). array, and the slot that it used is still vacant, then the device will
For created arrays, devices are always re\-added if that is possible, be added back to the array in the same position. This will normally
however using \-\-re\-add will ensure the device isn't made into a cause the data for that device to be recovered. However based on the
spare if the \-\-re\-add failed. event count on the device, the recovery may only require sections that
are flagged a write-intent bitmap to be recovered or may not require
any recovery at all.
When re\-adding a device, if nothing has changed on the array since the When used on an array that has no metadata (i.e. it was built with
device was removed, no recovery is performed. Also, if the array has .BR \-\-build)
a write-intent bitmap, then the recovery performed after a re\-add will it will be assumed that bitmap-based recovery is enough to make the
be limited to those blocks which, according to the bitmap, might have device fully consistent with the array.
changed since the device was removed.
If the device name given is If the device name given is
.B missing .B missing