Skip to contentSkip to conversation

LVM2 ./WHATS_NEW lib/metadata/mirror.c

PATCH [email protected] 1 participant 1 message Mar 23, 2012

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mbroz at sourceware.org 2012-03-23 16:28:41

Modified files:
. : WHATS_NEW
lib/metadata : mirror.c

Log message:
Fix pvmove if LV is activated exclusively but cmirror is not running.

In this case we should allow to use local mirror, check for cmirror should apply only for lvconvert/lvcreate.

Introduced in 2.02.86 by removing !(lv->status & ACTIVATE_EXCL).

(Partially workaround, it is minimalistic patch for now.)

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.2366&r2=1.2367
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/mirror.c.diff?cvsroot=lvm2&r1=1.179&r2=1.180

WHATS_NEW +1 -0
@@ -1,5 +1,6 @@
 Version 2.02.96 - 
 ================================
+  Fix pvmove for exclusively activated LV pvmove in clustered VG. (2.02.86)
   Always free hash table on update_pvid_to_vgid() in lvmetad.
   Update and fix monitoring of thin pool devices.
   Check hash insert success in lock_vg clvmd.
lib/metadata/mirror.c +4 -1
@@ -2070,7 +2070,10 @@
 
 	if (vg_is_clustered(lv->vg)) {
 		/* FIXME: review check of lv_is_active_remotely */
-		if (!_cluster_mirror_is_available(lv)) {
+		/* FIXME: move this test out of this function */
+		/* Skip test for pvmove mirrors, it can use local mirror */
+		if (!(lv->status & (PVMOVE | LOCKED)) &&
+		    !_cluster_mirror_is_available(lv)) {
 			log_error("Shared cluster mirrors are not available.");
 			return 0;
 		}