diff --git a/WHATS_NEW b/WHATS_NEW index 4e63dafa1..beffa2bf6 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.06 - ================================= + Propagate nosync flag around cluster. Allow vgreduce to handle mirror log failures. Add --corelog to lvcreate and lvconvert. Create a log header for replacement in-sync mirror log. diff --git a/daemons/clvmd/lvm-functions.c b/daemons/clvmd/lvm-functions.c index c8207a489..4d387f929 100644 --- a/daemons/clvmd/lvm-functions.c +++ b/daemons/clvmd/lvm-functions.c @@ -306,6 +306,9 @@ int do_lock_lv(unsigned char command, unsigned char lock_flags, char *resource) if (lock_flags & LCK_PARTIAL_MODE) init_partial(1); + if (lock_flags & LCK_MIRROR_NOSYNC_MODE) + init_mirror_in_sync(1); + switch (command) { case LCK_LV_EXCLUSIVE: status = do_activate_lv(resource, lock_flags, LKM_EXMODE); diff --git a/lib/locking/cluster_locking.c b/lib/locking/cluster_locking.c index 6781c9f9a..50da5bf54 100644 --- a/lib/locking/cluster_locking.c +++ b/lib/locking/cluster_locking.c @@ -333,6 +333,9 @@ static int _lock_for_cluster(unsigned char cmd, unsigned int flags, char *name) if (partial_mode()) args[1] |= LCK_PARTIAL_MODE; + if (mirror_sync()) + args[1] |= LCK_MIRROR_NOSYNC_MODE; + /* * VG locks are just that: locks, and have no side effects * so we only need to do them on the local node because all diff --git a/lib/locking/locking.h b/lib/locking/locking.h index 6281b36cd..9153595f3 100644 --- a/lib/locking/locking.h +++ b/lib/locking/locking.h @@ -74,6 +74,7 @@ int check_lvm1_vg_inactive(struct cmd_context *cmd, const char *vgname); * Additional lock bits for cluster communication */ #define LCK_PARTIAL_MODE 0x00000001 /* Running in partial mode */ +#define LCK_MIRROR_NOSYNC_MODE 0x00000002 /* Mirrors don't require sync */ /* * Common combinations diff --git a/lib/metadata/mirror.c b/lib/metadata/mirror.c index 04bb9fa9a..17a3344ca 100644 --- a/lib/metadata/mirror.c +++ b/lib/metadata/mirror.c @@ -235,7 +235,7 @@ int reconfigure_mirror_images(struct lv_segment *mirrored_seg, uint32_t num_mirr { int r; int insync = 0; - int mirror_dev_failed = (mirrored_seg->area_count != num_mirrors); + // int mirror_dev_failed = (mirrored_seg->area_count != num_mirrors); float sync_percent = 0; /* was the mirror in-sync before problems? */