1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
lvm2/lib
Jonathan Brassow abc89422af Mirror: Fix inability to remove VG's cluster flag if it contains a mirror
According to bug 995193, if a volume group
	1) contains a mirror
	2) is clustered
	3) 'locking_type' = 0 is used
then it is not possible to remove the 'c'luster flag from the VG.  This
is due to the way _lv_is_active behaves.

We shouldn't allow the cluster flag to be flipped unless the mirrors in
the cluster are not active.  This is because different kernel modules
are used depending on whether a mirror is cluster or not.  When we
attempt to see if the mirror is active, we first check locally.  If it
is not, then we attempt to check for remotely active instances if the VG
is clustered.  Since the no_lock locking type is LCK_CLUSTERED, but does
not implement 'query_resource', remote_lock_held will always return an
error in this case.  An error from remove_lock_held is treated as though
the lock _is_ held (i.e. the LV is active remotely).  This blocks the
cluster flag from changing.

The solution is to implement 'query_resource' for the no_lock type.  It
will report a message and return 1.  This will allow _lv_is_active to
function properly.  The LV would be considered not active remotely and
the VG can change its flag.
2013-08-12 13:56:47 -05:00
..
activate Mirror: Fix issue preventing PV creation on mirror LVs 2013-08-07 17:42:26 -05:00
cache cleanup: simplier string reset 2013-07-22 12:41:21 +02:00
commands filters: fix segfault on incorrect global_filter 2013-07-26 13:04:53 +02:00
config workaround: gcc v4.8 on 32 bit param. passing bug when -02 opimization used 2013-08-09 13:24:50 +02:00
datastruct Switch to return void 2012-02-08 12:52:58 +00:00
device dev-type: dev_get_primary_dev default error code 0, not -1 2013-07-19 15:26:53 +02:00
display display: fix units for sizes <1k 2013-07-18 17:55:58 +01:00
error cleanup: drop unneeded included header files 2012-08-23 14:37:20 +02:00
filters config: add config_source_t type to identify configuration source 2013-07-02 15:19:08 +02:00
format1 cleanup: drop unused headers 2013-06-16 00:07:32 +02:00
format_pool cleanup: drop unused headers 2013-06-16 00:07:32 +02:00
format_text lvmetad: fix mda offset/size overflow if >= 4g (32bit) 2013-08-06 13:37:42 +02:00
freeseg cleanup: drop unneeded included header files 2012-08-23 14:37:20 +02:00
label logging: classify log_debug messages 2013-01-07 22:30:29 +00:00
locking Mirror: Fix inability to remove VG's cluster flag if it contains a mirror 2013-08-12 13:56:47 -05:00
log logging: tidy log_sys_error when string empty 2013-08-12 18:40:41 +01:00
metadata thin: fix commit e195b5227e 2013-08-06 16:28:12 +02:00
mirror config: add profile arg to find_config_tree_str 2013-07-02 15:19:09 +02:00
misc exec: pipe open 2013-08-06 16:18:43 +02:00
mm config: add profile arg to find_config_tree_bool 2013-07-02 15:19:09 +02:00
properties lvm2app: Add thin and thin pool lv creation 2013-07-12 16:52:16 -05:00
raid config: add profile arg to find_config_tree_str 2013-07-02 15:19:09 +02:00
replicator cleanup: drop unneeded included header files 2012-08-23 14:37:20 +02:00
report reporting: tidy recent new fields 2013-07-19 01:30:02 +01:00
snapshot config: add profile arg to find_config_tree_str 2013-07-02 15:19:09 +02:00
striped Add activation/use_linear_target enabled by default. (prajnoha) 2011-11-28 20:37:51 +00:00
thin thin: metadata resize needs 1.9 version 2013-07-31 15:29:27 +02: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 lib/properties: Common code for handling properties. 2013-07-12 16:52:16 -05:00