Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=b2492903a600973f…
Commit: b2492903a600973fe9110285804b1c02b71d284c
Parent: 0000000000000000000000000000000000000000
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: 2016-04-30 00:09 +0000
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: 2016-04-30 00:09 +0000
annotated tag: v2_02_152 has been created
at b2492903a600973fe9110285804b1c02b71d284c (tag)
tagging e53ecf91f7550b77d8b85545e49c5805332ddd8d (commit)
replaces v2_02_151
Release 2.02.152.
More bug fixes.
23 files changed, 321 insertions(+), 116 deletions(-)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
iEYEABECAAYFAlcj9+QACgkQIoGRwVZ+LBe4iwCgiXA8V0KTpjBFmt7zjZxN7Nm/
ogwAoLNwaDOf6yBE1nG0KNmrSnfGCqIi
=Yxmh
-----END PGP SIGNATURE-----
Alasdair G Kergon (5):
post-release
libdm: Add dm_udev_wait_immediate.
datastruct: Add str_list_wipe.
raid: Use inherited tags when wiping rmeta.
pre-release
David Teigland (3):
metadata: fix segfault when filters reject devices
lvmetad: improve warning after lvmetad message fails
pvscan: autoactivation should ignore some VGs
Peter Rajnoha (4):
metadata: log warning instead of error if device not found while checking used and assumed devs
cleanup: do not mention segment in warning message if device not found for a PV when checking used/assumed devs for an LV
udev: rules: remove mpath from 10-dm.rules, superseded by 11-dm-mpath.rules (mpath>=0.6.0)
udev: rules: add comments explaining subsystem-specific rules
Zdenek Kabelac (12):
modprobe: check /sys/module entry first
cache: with cache target 1.9 mq is alias to smq
cache: check for clean cache as separete function
thin: zero and transaction_id also with thin volumes
lvchange: fix return code
lvchange: always check for sigint
lvchange: use better arg functions
man: lvchange updates
man: lvcreate doc passthrough
cleanup: smaller timeout
cleanup: use log_debug_activation
cache: better support for alias check
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=c76df666c903b59f…
Commit: c76df666c903b59f069292c4c1507b1ac37a5590
Parent: e3efcdc9f5d98807ff9887aa602aff1bdc870cbd
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Fri Apr 29 19:49:21 2016 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Fri Apr 29 19:49:21 2016 +0100
raid: Use inherited tags when wiping rmeta.
If there's an activation volume_filter, it might not be possible
to activate the rmeta LVs to wipe them. At least inherit any
LV tags from the parent LV while attempting this.
---
WHATS_NEW | 1 +
lib/metadata/lv_manip.c | 13 +++++++++++++
2 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 55ecb68..a712c5f 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.152 -
==================================
+ Use any inherited tags when wiping metadata sub LVs to ensure activation.
Add str_list_wipe.
Improve support for interrupting procesing of volumes during lvchange.
Use failed command return code when lvchanging read-only volume.
diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
index 4bce808..cd0a78c 100644
--- a/lib/metadata/lv_manip.c
+++ b/lib/metadata/lv_manip.c
@@ -3834,6 +3834,16 @@ static int _lv_extend_layered_lv(struct alloc_handle *ah,
return 0;
}
lv_set_visible(meta_lv);
+
+ /*
+ * Copy any tags from the new LV to the metadata LV so
+ * it can be activated temporarily.
+ */
+ if (!str_list_dup(meta_lv->vg->vgmem, &meta_lv->tags, &lv->tags)) {
+ log_error("Failed to copy tags onto LV %s to clear metadata.", display_lvname(meta_lv));
+ return 0;
+ }
+
clear_metadata = 1;
}
@@ -3882,6 +3892,9 @@ static int _lv_extend_layered_lv(struct alloc_handle *ah,
return 0;
}
lv_set_hidden(meta_lv);
+
+ /* Wipe any temporary tags required for activation. */
+ str_list_wipe(&meta_lv->tags);
}
}
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=a2d2a61339b83de0…
Commit: a2d2a61339b83de0d48ed6ed15e816773393c6b4
Parent: 263c1a4db51184c718e85c1c3fdcef7908dd7c88
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Wed Apr 27 15:33:23 2016 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Wed Apr 27 15:45:38 2016 -0500
pvscan: autoactivation should ignore some VGs
pvscan autoactivation has its own VG processing implementation,
so it can't properly handle things like foreign or shared VGs,
so make it ignore those VG types (or errors from them) as best
as possible.
Add a FIXME stating that pvscan autoactivation must really be
moved to the standard VG processing by calling process_each_vg
to do activation once the scanning / cache update is finished.
---
tools/pvscan.c | 34 ++++++++++++++++++++++++++++++++--
1 files changed, 32 insertions(+), 2 deletions(-)
diff --git a/tools/pvscan.c b/tools/pvscan.c
index 425383a..d93773a 100644
--- a/tools/pvscan.c
+++ b/tools/pvscan.c
@@ -132,6 +132,7 @@ static int _auto_activation_handler(struct cmd_context *cmd,
int refresh_done = 0;
struct volume_group *vg;
struct id vgid_raw;
+ uint32_t read_error;
int r = 0;
/* TODO: add support for partial and clustered VGs */
@@ -141,16 +142,45 @@ static int _auto_activation_handler(struct cmd_context *cmd,
if (!id_read_format(&vgid_raw, vgid))
return_0;
+ /*
+ * FIXME: pvscan activation really needs to be changed to use
+ * the standard process_each_vg() interface. It should save
+ * a list of VG names that are found during the scan, then
+ * call process_each_vg() with that list to do activation.
+ */
+
+ cmd->vg_read_print_access_error = 0;
+
/* NB. This is safe because we know lvmetad is running and we won't hit disk. */
vg = vg_read(cmd, vgname, (const char *)&vgid_raw, 0, 0);
- if (vg_read_error(vg)) {
+ read_error = vg_read_error(vg);
+ if (read_error) {
+ /*
+ * foreign VGs: we want to read and update lvmetad, but that's
+ * all, we don't want to even attempt to autoactivate.
+ *
+ * shared VGs: we want to read and update lvmetad, and for now
+ * ignore them for autoactivation. Once pvscan autoactivation
+ * uses process_each_vg, then shared VGs could be autoactivated.
+ */
+ if (read_error & (FAILED_SYSTEMID | FAILED_LOCK_TYPE | FAILED_LOCK_MODE)) {
+ release_vg(vg);
+ return 1;
+ }
+
log_error("Failed to read Volume Group \"%s\" (%s) during autoactivation.", vgname, vgid);
release_vg(vg);
return 0;
}
+ if (is_lockd_type(vg->lock_type)) {
+ r = 1;
+ goto out;
+ }
+
if (vg_is_clustered(vg)) {
- r = 1; goto out;
+ r = 1;
+ goto out;
}
/* FIXME: There's a tiny race when suspending the device which is part
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=3c53acb378478f23…
Commit: 3c53acb378478f23acf624be8836c0cb24c2724e
Parent: 49f32e4859017104555ba0297fa0384d4aa3d5f2
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Wed Apr 27 12:13:26 2016 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Wed Apr 27 12:13:26 2016 -0500
metadata: fix segfault when filters reject devices
Checking for devices uses is_missing_pv() to check
if there is a device for the PV. is_missing_pv()
is based on the MISSING_PV flag, which does not
always correspond to !pv->dev. When using lvmetad,
a command like:
pvs --config 'devices/filter=["a|/dev/sdb|", "r|.*|"]'
will cause a number of PVs to have NULL pv->dev, but
not the MISSING_PV flag. So, NULL pv->dev needs to
also be checked.
---
lib/metadata/metadata.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c
index 6d101e0..c8237d5 100644
--- a/lib/metadata/metadata.c
+++ b/lib/metadata/metadata.c
@@ -4682,6 +4682,15 @@ static int _check_devs_used_correspond_with_vg(struct volume_group *vg)
/* Mark all PVs in VG as used. */
dm_list_iterate_items(pvl, &vg->pvs) {
+ /*
+ * FIXME: It's not clear if the meaning
+ * of "missing" should always include the
+ * !pv->dev case, or if "missing" is the
+ * more narrow case where VG metadata has
+ * been written with the MISSING flag.
+ */
+ if (!pvl->pv->dev)
+ continue;
if (is_missing_pv(pvl->pv))
continue;
pvl->pv->dev->flags |= DEV_ASSUMED_FOR_LV;