Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=82b137ef2f7f1b6fc1bbf…
Commit: 82b137ef2f7f1b6fc1bbf83918750037835a9568
Parent: 556dcd2c6b82ead3a5aa50211f08f9d69be13fe1
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Thu Jun 20 15:59:36 2019 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Thu Jun 20 15:59:36 2019 -0500
vgchange: don't fail monitor command if vg is exported
When monitoring, skip exported VGs without causing a command
failure.
The lvm2-monitor service runs 'vgchange --monitor y', so
any exported VG on the system would cause the service to
fail.
---
tools/vgchange.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/tools/vgchange.c b/tools/vgchange.c
index d6d4f91..a17f456 100644
--- a/tools/vgchange.c
+++ b/tools/vgchange.c
@@ -631,6 +631,8 @@ static int _vgchange_single(struct cmd_context *cmd, const char *vg_name,
};
if (vg_is_exported(vg)) {
+ if (cmd->command->command_enum == vgchange_monitor_CMD)
+ return ECMD_PROCESSED;
log_error("Volume group \"%s\" is exported", vg_name);
return ECMD_FAILED;
}
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=a311684c4ab0ec2cf3a3d…
Commit: a311684c4ab0ec2cf3a3d11412295da52df63c88
Parent: f3a87a2c2e339328ea4d7448f43d5317806a6b24
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Jun 19 23:55:44 2019 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Thu Jun 20 00:05:46 2019 +0200
aux: fix selecting lvmconf values
For older bashes (i.e. rhel5) code can't use internal bash arrays
and uses old-school greps and sorts to create configuration file.
But the split of value was mismatching names with same prefix
so i.e.
devices/scan
devices/scan_lvs
was matching always the later one - fix this by expecting
whitespace or '=' after the name.
---
test/lib/aux.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/test/lib/aux.sh b/test/lib/aux.sh
index 86ed554..1db6fbf 100644
--- a/test/lib/aux.sh
+++ b/test/lib/aux.sh
@@ -1296,7 +1296,7 @@ EOF
echo "$s {"
local k
for k in $(grep ^"$s"/ "$config_values" | cut -f1 -d= | sed -e 's, *$,,' | sort | uniq); do
- grep "^$k" "$config_values" | tail -n 1 | sed -e "s,^$s/, ," || true
+ grep "^$k[ =]" "$config_values" | tail -n 1 | sed -e "s,^$s/, ," || true
done
echo "}"
echo
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=f3a87a2c2e339328ea4d7…
Commit: f3a87a2c2e339328ea4d7448f43d5317806a6b24
Parent: 1727df7c98b749be90a5790d3d9858a012f687f6
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Wed Jun 19 10:40:37 2019 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Wed Jun 19 10:40:37 2019 -0500
Revert "lvconvert: disable linear to mirror of active LV in cluster VG"
This reverts commit 8623e336513c6ac6fcb24aa7e2ef10b8a3a36c59.
The problem this was avoiding now seems to be fixed by
commit d6bce036155ae973c869bdce3ca5f824f933f599
mirror: fix monitoring change
---
tools/lvconvert.c | 11 -----------
1 files changed, 0 insertions(+), 11 deletions(-)
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
index fcbbd26..bc666c0 100644
--- a/tools/lvconvert.c
+++ b/tools/lvconvert.c
@@ -864,17 +864,6 @@ static int _lvconvert_mirrors_aux(struct cmd_context *cmd,
/* FIXME Share code with lvcreate */
/*
- * Avoid bug 1711427 in which an exclusively active linear LV in a
- * clustered VG, when upconverted to a mirror, will mistakenly use
- * a userspace/cmirror log in _add_log() beause laopts.exclusive is
- * not set.
- */
- if (vg_is_clustered(lv->vg) && lv_is_active(lv)) {
- log_error("Cannot convert active LV to mirror in clustered VG.");
- return 0;
- }
-
- /*
* FIXME should we give not only pvh, but also all PVs
* currently taken by the mirror? Would make more sense from
* user perspective.
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=1727df7c98b749be90a57…
Commit: 1727df7c98b749be90a5790d3d9858a012f687f6
Parent: 29ae8b8ca5935536d9ce55959022918e0343562f
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Jun 19 13:38:57 2019 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Jun 19 13:38:57 2019 +0200
tests: check mirror with clvmd and dmeventd
---
test/shell/lvconvert-mirror-dmeventd.sh | 41 +++++++++++++++++++++++++++++++
1 files changed, 41 insertions(+), 0 deletions(-)
diff --git a/test/shell/lvconvert-mirror-dmeventd.sh b/test/shell/lvconvert-mirror-dmeventd.sh
new file mode 100644
index 0000000..3bebd64
--- /dev/null
+++ b/test/shell/lvconvert-mirror-dmeventd.sh
@@ -0,0 +1,41 @@
+#!/usr/bin/env bash
+
+# Copyright (C) 2018 Red Hat, Inc. All rights reserved.
+#
+# This copyrighted material is made available to anyone wishing to use,
+# modify, copy, or redistribute it subject to the terms and conditions
+# of the GNU General Public License v.2.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+# Check clustered usage with dmeventd
+
+. lib/inittest
+
+aux prepare_dmeventd
+
+aux prepare_pvs 3 100
+get_devs
+
+vgcreate $SHARED -s 64k "$vg" "${DEVICES[@]}"
+
+# Use zero devices for big mirror legs
+aux zero_dev "$dev2" $(get first_extent_sector "$dev2"):
+aux zero_dev "$dev3" $(get first_extent_sector "$dev3"):
+
+lvcreate -aey -L90 --type mirror --corelog --regionsize 16k -m1 -n $lv1 $vg "$dev1" "$dev2"
+
+lvconvert -m+1 -b $vg/$lv1 "$dev3"
+
+# We want here ongoing conversion
+
+lvs -a -o+seg_pe_ranges $vg
+
+# Now it should be able to drop 2nd. leg
+lvconvert -m-1 $vg/$lv1 "$dev2"
+
+lvs -a $vg
+
+vgremove -f $vg