diff options
author | NeilBrown <neilb@suse.de> | 2011-12-22 18:17:51 -0500 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-12-22 18:17:51 -0500 |
commit | 2d78f8c451785f030ac1676a18691896b59c69d8 (patch) | |
tree | 4dfe69115b2ca2fb8be2a671e7c8399c3925fcb9 /Documentation | |
parent | b8321b68d1445f308324517e45fb0a5c2b48e271 (diff) |
md: create externally visible flags for supporting hot-replace.
hot-replace is a feature being added to md which will allow a
device to be replaced without removing it from the array first.
With hot-replace a spare can be activated and recovery can start while
the original device is still in place, thus allowing a transition from
an unreliable device to a reliable device without leaving the array
degraded during the transition. It can also be use when the original
device is still reliable but it not wanted for some reason.
This will eventually be supported in RAID4/5/6 and RAID10.
This patch adds a super-block flag to distinguish the replacement
device. If an old kernel sees this flag it will reject the device.
It also adds two per-device flags which are viewable and settable via
sysfs.
"want_replacement" can be set to request that a device be replaced.
"replacement" is set to show that this device is replacing another
device.
The "rd%d" links in /sys/block/mdXx/md only apply to the original
device, not the replacement. We currently don't make links for the
replacement - there doesn't seem to be a need.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/md.txt | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/Documentation/md.txt b/Documentation/md.txt index fc94770f44ab..993fba37b7d1 100644 --- a/Documentation/md.txt +++ b/Documentation/md.txt | |||
@@ -357,14 +357,14 @@ Each directory contains: | |||
357 | written to, that device. | 357 | written to, that device. |
358 | 358 | ||
359 | state | 359 | state |
360 | A file recording the current state of the device in the array | 360 | A file recording the current state of the device in the array |
361 | which can be a comma separated list of | 361 | which can be a comma separated list of |
362 | faulty - device has been kicked from active use due to | 362 | faulty - device has been kicked from active use due to |
363 | a detected fault or it has unacknowledged bad | 363 | a detected fault, or it has unacknowledged bad |
364 | blocks | 364 | blocks |
365 | in_sync - device is a fully in-sync member of the array | 365 | in_sync - device is a fully in-sync member of the array |
366 | writemostly - device will only be subject to read | 366 | writemostly - device will only be subject to read |
367 | requests if there are no other options. | 367 | requests if there are no other options. |
368 | This applies only to raid1 arrays. | 368 | This applies only to raid1 arrays. |
369 | blocked - device has failed, and the failure hasn't been | 369 | blocked - device has failed, and the failure hasn't been |
370 | acknowledged yet by the metadata handler. | 370 | acknowledged yet by the metadata handler. |
@@ -374,6 +374,13 @@ Each directory contains: | |||
374 | This includes spares that are in the process | 374 | This includes spares that are in the process |
375 | of being recovered to | 375 | of being recovered to |
376 | write_error - device has ever seen a write error. | 376 | write_error - device has ever seen a write error. |
377 | want_replacement - device is (mostly) working but probably | ||
378 | should be replaced, either due to errors or | ||
379 | due to user request. | ||
380 | replacement - device is a replacement for another active | ||
381 | device with same raid_disk. | ||
382 | |||
383 | |||
377 | This list may grow in future. | 384 | This list may grow in future. |
378 | This can be written to. | 385 | This can be written to. |
379 | Writing "faulty" simulates a failure on the device. | 386 | Writing "faulty" simulates a failure on the device. |
@@ -386,6 +393,13 @@ Each directory contains: | |||
386 | Writing "in_sync" sets the in_sync flag. | 393 | Writing "in_sync" sets the in_sync flag. |
387 | Writing "write_error" sets writeerrorseen flag. | 394 | Writing "write_error" sets writeerrorseen flag. |
388 | Writing "-write_error" clears writeerrorseen flag. | 395 | Writing "-write_error" clears writeerrorseen flag. |
396 | Writing "want_replacement" is allowed at any time except to a | ||
397 | replacement device or a spare. It sets the flag. | ||
398 | Writing "-want_replacement" is allowed at any time. It clears | ||
399 | the flag. | ||
400 | Writing "replacement" or "-replacement" is only allowed before | ||
401 | starting the array. It sets or clears the flag. | ||
402 | |||
389 | 403 | ||
390 | This file responds to select/poll. Any change to 'faulty' | 404 | This file responds to select/poll. Any change to 'faulty' |
391 | or 'blocked' causes an event. | 405 | or 'blocked' causes an event. |