diff options
author | NeilBrown <neilb@suse.de> | 2010-04-09 09:18:53 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2010-04-09 09:19:19 +1000 |
commit | 0f9ce65ed03f69c50ca506c2ef68d739db722971 (patch) | |
tree | 2f16c2b6d64b0857e6b31b5f44ac42f45ca8622f /mdadm.8 | |
parent | 7a5090d2247936d7cf7d9067c960317ad009940d (diff) | |
download | mdadm-0f9ce65ed03f69c50ca506c2ef68d739db722971.tar.gz |
Add -fail support to --incremental
This can be used for hot-unplug. When a device has been remove,
udev can call
mdadm --incremental --fail sda
and mdadm will find the array holding sda and remove sda from
the array.
Based on code from Doug Ledford <dledford@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'mdadm.8')
-rw-r--r-- | mdadm.8 | 24 |
1 files changed, 23 insertions, 1 deletions
@@ -136,6 +136,10 @@ This provides a convenient interface to a system. As each device is detected, .I mdadm has a chance to include it in some array as appropriate. +Optionally, when the +.I \-\-fail +flag is passed in we will remove the device from any active array +instead of adding it. If a .B CONTAINER @@ -189,7 +193,7 @@ Change the size or shape of an active array. .TP .BR \-I ", " \-\-incremental -Add a single device into an appropriate array, and possibly start the array. +Add/remove a single device to/from an appropriate array, and possibly start the array. .TP .B \-\-auto-detect @@ -1235,6 +1239,15 @@ in .B mdadm.conf as requiring an external bitmap, that bitmap will be attached first. +.TP +.BR \-\-fail ", " \-f +This allows the hot-plug system to remove devices that have fully disappeared +from the kernel. It will first fail and then remove the device from any +array it belongs to. +The device name given should be a kernel device name such as "sda", +not a name in +.IR /dev . + .SH For Monitor mode: .TP .BR \-m ", " \-\-mail @@ -2141,6 +2154,10 @@ Usage: .I component-device .HP 12 Usage: +.B mdadm \-\-incremental \-\-fail +.I component-device +.HP 12 +Usage: .B mdadm \-\-incremental \-\-rebuild .HP 12 Usage: @@ -2153,6 +2170,11 @@ passed to .B "mdadm \-\-incremental" to be conditionally added to an appropriate array. +Conversely, it can also be used with the +.B \-\-fail +flag to do just the opposite and find whatever array a particular device +is part of and remove the device from that array. + If the device passed is a .B CONTAINER device created by a previous call to |