1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
lvm2/lib
Jonathan Brassow 970dfbcd69 RAID: Limit replacement of devices when array is not in-sync.
If a RAID array is not in-sync, replacing devices should not be allowed
as a general rule.  This is because the contents used to populate the
incoming device may be undefined because the devices being read where
not in-sync.  The kernel enforces this rule unless overridden by not
allowing the creation of an array that is not in-sync and includes a
devices that needs to be rebuilt.

Since we cannot know the sync state of an LV if it is inactive, we must
also enforce the rule that an array must be active to replace devices.

That leaves us with the following conditions:
1) never allow replacement or repair of devices if the LV is in-active
2) never allow replacement if the LV is not in-sync
3) allow repair if the LV is not in-sync, but warn that contents may
   not be recoverable.

In the case where a user is performing the repair on the command line via
'lvconvert --repair', the warning is printed before the user is prompted
if they would like to replace the device(s).  If the repair is automated
(i.e. via dmeventd and policy is "allocate"), then the device is replaced
if possible and the warning is printed.
2012-12-18 14:40:42 -06:00
..
activate mirrors: fix leak in device_is_usable mirror check 2012-12-11 11:15:22 +01:00
cache lvmetad: check id_read_format error status 2012-12-15 17:23:27 +01:00
commands udev: add a warning message if DM_DISABLE_UDEV set and udev running 2012-11-29 15:57:43 +01:00
config thin: support configurable thin pool defaults 2012-11-26 12:16:47 +01:00
datastruct Switch to return void 2012-02-08 12:52:58 +00:00
device cleanup: switch log_error to log_warn 2012-10-17 15:41:35 +02:00
display buffering: use unbuffered silent mode for liblvm 2012-08-26 00:15:45 +01:00
error cleanup: drop unneeded included header files 2012-08-23 14:37:20 +02:00
filters filters: Add STEC skd and Violin vtms devices 2012-11-26 14:55:17 +00:00
format1 cleanup: format1 test whether PV was found 2012-08-23 14:37:52 +02:00
format_pool cleanup: uint64_t casts 2012-08-23 14:37:21 +02:00
format_text format-text: check for _text_create_text_instance 2012-12-15 17:23:23 +01:00
freeseg cleanup: drop unneeded included header files 2012-08-23 14:37:20 +02:00
label The lvmetad client-side integration. Only active when use_lvmetad = 1 is set in 2012-02-23 13:11:07 +00:00
locking locking: clarify read-only locking error message v2 2012-07-25 14:37:22 +02:00
log log: move abort past syslog 2012-12-15 17:22:48 +01:00
metadata RAID: Limit replacement of devices when array is not in-sync. 2012-12-18 14:40:42 -06:00
mirror cleanup: drop unneeded included header files 2012-08-23 14:37:20 +02:00
misc cleanup: use proper const in apply_lvname_restrictions 2012-12-15 14:57:40 +01:00
mm mm: skip mlocking [vectors] 2012-11-20 10:02:51 +01:00
raid RAID: Add support for RAID10 2012-08-24 15:34:19 -05:00
replicator cleanup: drop unneeded included header files 2012-08-23 14:37:20 +02:00
report lvm2api: fix size reporting 2012-12-02 17:55:08 +01:00
snapshot Differentiate between snapshot status of "Invalid" and "Merge failed". 2012-01-20 22:02:04 +00:00
striped Add activation/use_linear_target enabled by default. (prajnoha) 2011-11-28 20:37:51 +00:00
thin thin: fix test for dicards ignore settings 2012-12-11 11:26:19 +01:00
unknown cleanup: drop unneeded included header files 2012-08-23 14:37:20 +02:00
uuid Revert the #include changes. Need to fix this at the #include site for now, and 2011-07-18 14:34:33 +00:00
zero cleanup: drop unneeded included header files 2012-08-23 14:37:20 +02:00
Makefile.in cleanup: drop unneeded included header files 2012-08-23 14:37:20 +02:00