1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
lvm2/lib
David Teigland 8b7a78c728 lvmcache: improve duplicate PV handling
Wait to compare and choose alternate duplicate devices until
after all devices are scanned.  During scanning, the first
duplicate dev is kept in lvmcache, and others are kept in a
new list (_found_duplicate_devs).

After all devices are scanned, compare all the duplicates
available for a given PVID and decide which is best.

If the dev used in lvmcache is changed, drop the old dev
from lvmcache entirely and rescan the replacement dev.
Previously the VG metadata from the old dev was kept in
lvmcache and only the dev was replaced.

A new config setting devices/allow_changes_with_duplicate_pvs
can be set to 0 which disallows modifying a VG or activating
LVs in it when the VG contains PVs with duplicate devices.
Set to 1 is the old behavior which allowed the VG to be
changed.

The logic for which of two devs is preferred has changed.
The primary goal is to choose a device that is currently
in use if the other isn't, e.g. by an active LV.

. prefer dev with fs mounted if the other doesn't, else
. prefer dev that is dm if the other isn't, else
. prefer dev in subsystem if the other isn't

If neither device is preferred by these rules, then don't
change devices in lvmcache, leaving the one that was found
first.

The previous logic for preferring a device was:

. prefer dev in subsystem if the other isn't, else
. prefer dev without holders if the other has holders, else
. prefer dev that is dm if the other isn't
2016-05-06 09:00:00 -05:00
..
activate cleanup: gather version info with single check 2016-05-05 23:34:30 +02:00
cache lvmcache: improve duplicate PV handling 2016-05-06 09:00:00 -05:00
cache_segtype debug: enhance debug msg for cache 2016-05-05 23:34:35 +02:00
commands lvmetad: warn about making changes while not using lvmetad 2016-04-21 10:28:01 -05:00
config lvmcache: improve duplicate PV handling 2016-05-06 09:00:00 -05:00
datastruct datastruct: Add str_list_wipe. 2016-04-29 19:47:15 +01:00
device coverity: use wider type for whole expression 2016-04-22 01:12:34 +02:00
display display: Avoid internal snapshot LV names in msgs. 2016-04-21 00:30:17 +01:00
error activate: Use macros for target and module names. 2016-03-22 17:46:15 +00:00
filters dev-cache: also index VGIDs and LVIDs if using persistent .cache file 2016-03-30 11:00:01 +02:00
format1 redefine pvcreate structs 2016-02-25 09:14:10 -06:00
format_pool redefine pvcreate structs 2016-02-25 09:14:10 -06:00
format_text debug: move misplaced log_debug 2016-04-21 00:34:01 +02:00
freeseg doc: change fsf address 2016-01-21 12:11:37 +01:00
label doc: change fsf address 2016-01-21 12:11:37 +01:00
locking cleanup: simplify code 2016-04-22 00:22:02 +02:00
log cleanup: use unsigned with EPOCH printf format 2016-05-05 23:55:20 +02:00
lvmpolld doc: change fsf address 2016-01-21 12:11:37 +01:00
metadata lvmcache: improve duplicate PV handling 2016-05-06 09:00:00 -05:00
mirror activate: Use macros for target and module names. 2016-03-22 17:46:15 +00:00
misc debug: unify some tracing messages 2016-04-12 13:06:16 +02:00
mm doc: change fsf address 2016-01-21 12:11:37 +01:00
notify coverity: drop unused header file 2016-04-22 01:12:34 +02:00
properties doc: change fsf address 2016-01-21 12:11:37 +01:00
raid activate: Use macros for target and module names. 2016-03-22 17:46:15 +00:00
replicator doc: change fsf address 2016-01-21 12:11:37 +01:00
report thin: zero and transaction_id also with thin volumes 2016-04-26 23:24:51 +02:00
snapshot activate: Use macros for target and module names. 2016-03-22 17:46:15 +00:00
striped activate: Use macros for target and module names. 2016-03-22 17:46:15 +00:00
thin Revert "thin: display highest mapped sector" 2016-04-01 20:09:38 +01:00
unknown doc: change fsf address 2016-01-21 12:11:37 +01:00
uuid doc: change fsf address 2016-01-21 12:11:37 +01:00
zero activate: Use macros for target and module names. 2016-03-22 17:46:15 +00:00
Makefile.in dbus: add notification from commands 2016-03-07 10:06:09 -06:00