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;
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=07d92322c13e942b…
Commit: 07d92322c13e942b8a47b4370a82b70d33a6f0c8
Parent: d90d99b23d94dea41b65166f8bb19cb2883e527c
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Apr 25 13:38:24 2016 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Apr 26 23:29:58 2016 +0200
man: lvcreate doc passthrough
Add few more words about passthough mode.
---
man/lvcreate.8.in | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/man/lvcreate.8.in b/man/lvcreate.8.in
index f6bb14f..fd8b3a7 100644
--- a/man/lvcreate.8.in
+++ b/man/lvcreate.8.in
@@ -219,7 +219,10 @@ If \fBwritethough\fP is specified, a write is considered complete only
when it has been stored in the cache pool LV and on the origin LV.
While \fBwritethrough\fP may be slower for writes, it is more
resilient if something should happen to a device associated with the
-cache pool LV.
+cache pool LV. With \fBpassthrough\fP mode, all reads are served
+from origin LV (all reads miss the cache) and all writes are
+forwarded to the origin LV; additionally, write hits cause cache
+block invalidates. See \fBlvmcache(7)\fP for more details.
.
.HP
.BR \-\-cachepolicy
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=d90d99b23d94dea4…
Commit: d90d99b23d94dea41b65166f8bb19cb2883e527c
Parent: e77b6968b6b420a4d0d9f14af1386f28761f055b
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Sun Apr 24 11:40:59 2016 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Tue Apr 26 23:29:58 2016 +0200
man: lvchange updates
Drop never existing --degrade.
---
man/lvchange.8.in | 17 ++++++++---------
1 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/man/lvchange.8.in b/man/lvchange.8.in
index fb16530..34ce583 100644
--- a/man/lvchange.8.in
+++ b/man/lvchange.8.in
@@ -26,15 +26,14 @@ lvchange \(em change attributes of a logical volume
.RB [ \-A | \-\-autobackup
.RB { y | n }]
.RB [ \-\-cachepolicy
-.IR policy ]
+.IR Policy ]
.RB [ \-\-cachesettings
-.IR key \fB= value ]
+.IR Key \fB= Value ]
.RB [ \-\-commandprofile
.IR ProfileName ]
.RB [ \-C | \-\-contiguous
.RB { y | n }]
.RB [ \-d | \-\-debug ]
-.RB [ \-\-degraded ]
.RB [ \-\-deltag
.IR Tag ]
.RB [ \-\-detachprofile ]
@@ -57,9 +56,9 @@ lvchange \(em change attributes of a logical volume
.RB [ \-M | \-\-persistent
.RB { y | n }
.RB [ \-\-major
-.IR major ]
+.IR Major ]
.RB [ \-\-minor
-.IR minor ]]
+.IR Minor ]]
.RB [ \-\-poll
.RB { y | n }]
.RB [ \-\- [ raid ] maxrecoveryrate
@@ -188,9 +187,9 @@ of the flag is reported within \fBlv_attr\fP bits.
.
.HP
.BR \-\-cachepolicy
-.IR policy ,
+.IR Policy ,
.BR \-\-cachesettings
-.IR key \fB= value
+.IR Key \fB= Value
.br
Only applicable to cached LVs; see also \fBlvmcache(7)\fP. Sets
the cache policy and its associated tunable settings. In most use-cases,
@@ -240,7 +239,7 @@ Do not use this if dmeventd is already monitoring a device.
.
.HP
.BR \-\-major
-.IR major
+.IR Major
.br
Sets the major number. This option is supported only on older systems
(kernel version 2.4) and is ignored on modern Linux systems where major
@@ -248,7 +247,7 @@ numbers are dynamically assigned.
.
.HP
.BR \-\-minor
-.IR minor
+.IR Minor
.br
Set the minor number.
.
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=ecae76c713bd4fa6…
Commit: ecae76c713bd4fa6c9d8f2a2c990625e4f38b504
Parent: 2bb33aaf556134b0217b822755383245ac678527
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Tue Apr 26 12:51:06 2016 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Tue Apr 26 12:57:37 2016 +0200
udev: rules: add comments explaining subsystem-specific rules
---
udev/10-dm.rules.in | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/udev/10-dm.rules.in b/udev/10-dm.rules.in
index 8d7a8ca..b4fa52a 100644
--- a/udev/10-dm.rules.in
+++ b/udev/10-dm.rules.in
@@ -13,6 +13,20 @@
# DM_UUID - UUID set for DM device (blank if not specified)
# DM_SUSPENDED - suspended state of DM device (0 or 1)
# DM_UDEV_RULES_VSN - DM udev rules version
+#
+# These rules cover only basic device-mapper functionality in udev.
+#
+# Various DM subsystems may contain further subsystem-specific rules
+# in 11-dm-<subsystem_name>.rules which should be installed together
+# with the DM subsystem and which extend these basic rules.
+# For example:
+# 11-dm-lvm.rules for LVM subsystem
+# 11-dm-mpath.rules for multipath subsystem (since version 0.6.0, recommended!)
+#
+# Even more specific rules may be required by subsystems so always
+# check subsystem's upstream repository for recent set of rules.
+# Also, keep in mind that recent rules may also require recent
+# subsystem-specific binaries.
KERNEL=="device-mapper", NAME="(DM_DIR)/control"
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=2bb33aaf556134b0…
Commit: 2bb33aaf556134b0217b822755383245ac678527
Parent: 379874a2d0ff51cdbfbc1cc723b41e06bcdfd277
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Mon Apr 25 14:48:46 2016 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Mon Apr 25 14:55:54 2016 +0200
udev: rules: remove mpath from 10-dm.rules, superseded by 11-dm-mpath.rules (mpath>=0.6.0)
Multipath 0.6.0 contains new 11-dm-mpath.rules which supersede the rule
that was in 10-dm.rules. The 11-dm-mpath.rules are also more complete,
fixing several other issues. Using the new 11-dm-mpath.rules from
multipath-tools >= 0.6.0 is strongly recommended for proper
DM multipath functionality!
See also:
http://christophe.varoqui.free.frhttp://git.opensvc.com/gitweb.cgi?p=multipath-tools/.git;a=blob;f=multipath…
---
WHATS_NEW | 1 +
udev/10-dm.rules.in | 4 ----
2 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 961bae7..1aa335e 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.152 -
==================================
+ Remove mpath from 10-dm.rules, superseded by 11-dm-mpath.rules (mpath>=0.6.0).
Version 2.02.151 - 23rd April 2016
==================================
diff --git a/udev/10-dm.rules.in b/udev/10-dm.rules.in
index 2755530..8d7a8ca 100644
--- a/udev/10-dm.rules.in
+++ b/udev/10-dm.rules.in
@@ -120,10 +120,6 @@ ENV{DM_UDEV_RULES_VSN}="2"
ENV{DM_UDEV_DISABLE_DM_RULES_FLAG}!="1", ENV{DM_NAME}=="?*", SYMLINK+="(DM_DIR)/$env{DM_NAME}"
-# We have to ignore further rule application for inappropriate events
-# and devices. But still send the notification if cookie exists.
-ENV{DM_UUID}=="mpath-?*", ENV{DM_ACTION}=="PATH_FAILED", GOTO="dm_disable"
-
# Avoid processing and scanning a DM device in the other (foreign)
# rules if it is in suspended state. However, we still keep 'disk'
# and 'DM subsystem' related rules enabled in this case.
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=379874a2d0ff51cd…
Commit: 379874a2d0ff51cdbfbc1cc723b41e06bcdfd277
Parent: 9d976c0002f06e97c50bca7dad35d647848ed60f
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Mon Apr 25 11:41:36 2016 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Mon Apr 25 11:44:24 2016 +0200
cleanup: do not mention segment in warning message if device not found for a PV when checking used/assumed devs for an LV
[0] fedora/~ # pvs --config 'devices/filter=["a|/dev/sda|", "r|.*|"]'
WARNING: Device for PV Qcxpcy-XgtP-UD3s-PmG0-qLyE-Z0ho-DYsxoz not found or rejected by a filter.
WARNING: Device for PV Qcxpcy-XgtP-UD3s-PmG0-qLyE-Z0ho-DYsxoz not found or rejected by a filter.
WARNING: Couldn't find device for segment belonging to fedora/root while checking used and assumed devices.
WARNING: Couldn't find device for segment belonging to fedora/swap while checking used and assumed devices.
PV VG Fmt Attr PSize PFree
/dev/sda lvm2 --- 128.00m 128.00m
[unknown] fedora lvm2 a-m 19.49g 0
Probably not worth mentioning "segments" here, just state that devices
for an LV can't be all found during the check - it's less mysterious for
user then:
[0] fedora/~ # pvs --config 'devices/filter=["a|/dev/sda|", "r|.*|"]'
WARNING: Device for PV Qcxpcy-XgtP-UD3s-PmG0-qLyE-Z0ho-DYsxoz not found or rejected by a filter.
WARNING: Device for PV Qcxpcy-XgtP-UD3s-PmG0-qLyE-Z0ho-DYsxoz not found or rejected by a filter.
WARNING: Couldn't find all devices for LV fedora/root while checking used and assumed devices.
WARNING: Couldn't find all devices for LV fedora/swap while checking used and assumed devices.
PV VG Fmt Attr PSize PFree
/dev/sda lvm2 --- 128.00m 128.00m
[unknown] fedora lvm2 a-m 19.49g 0
---
lib/metadata/metadata.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c
index 1ceed68..6d101e0 100644
--- a/lib/metadata/metadata.c
+++ b/lib/metadata/metadata.c
@@ -4631,8 +4631,8 @@ static int _check_devs_used_correspond_with_lv(struct dm_pool *mem, struct dm_li
if (seg_type(seg, s) == AREA_PV) {
if (!(dev = seg_dev(seg, s))) {
if (!warned_about_no_dev) {
- log_warn("WARNING: Couldn't find device for segment belonging "
- "to %s while checking used and assumed devices.",
+ log_warn("WARNING: Couldn't find all devices for LV %s "
+ "while checking used and assumed devices.",
display_lvname(lv));
warned_about_no_dev = 1;
}
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=9d976c0002f06e97…
Commit: 9d976c0002f06e97c50bca7dad35d647848ed60f
Parent: eb8edccd58a4ac2b313800f4d1839df336e3cab9
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Mon Apr 25 11:15:44 2016 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Mon Apr 25 11:27:28 2016 +0200
metadata: log warning instead of error if device not found while checking used and assumed devs
When checking assumed PVs against real devices used for LVs and if
there's no device assigned for an assumed PV (e.g. due to filters),
do log_warn instead of log_error and continue checking LV segments
and associated assumed PVs further, just like we do log_warn elsewhere
in this situation.
This way user will see the warning for each LV which couldn't be
checked completely against real PVs used. Before, we logged only
the very first occurence of missing device for an LV in a VG and we
returned from the function doing this check for all the LVs in VG
immediately which may be a bit misleading because it didn't tell
user about all the other LVs and whether they could be checked
or not.
For example, we have this setup:
[0] fedora/~ # pvs
PV VG Fmt Attr PSize PFree
/dev/sda lvm2 --- 128.00m 128.00m
/dev/vda2 fedora lvm2 a-- 19.49g 0
[0] fedora/~ # lvs -o+devices
LV VG Attr LSize Devices
root fedora -wi-ao---- 19.00g /dev/vda2(0)
swap fedora -wi-ao---- 500.00m /dev/vda2(4864)
Before this patch (only the very first LV in a VG is logged to have a
problem while checking used and assumed devices):
[0] fedora/~ # pvs --config 'devices/filter=["a|/dev/sda|", "r|.*|"]'
WARNING: Device for PV Qcxpcy-XgtP-UD3s-PmG0-qLyE-Z0ho-DYsxoz not found or rejected by a filter.
WARNING: Device for PV Qcxpcy-XgtP-UD3s-PmG0-qLyE-Z0ho-DYsxoz not found or rejected by a filter.
Couldn't find device for segment belonging to fedora/root while checking used and assumed devices.
PV VG Fmt Attr PSize PFree
/dev/sda lvm2 --- 128.00m 128.00m
[unknown] fedora lvm2 a-m 19.49g 0
With this patch applied (all LVs where we hit problem while checking
used and assumed devices are logged and it's warning, not error):
[0] fedora/~ # pvs --config 'devices/filter=["a|/dev/sda|", "r|.*|"]'
WARNING: Device for PV Qcxpcy-XgtP-UD3s-PmG0-qLyE-Z0ho-DYsxoz not found or rejected by a filter.
WARNING: Device for PV Qcxpcy-XgtP-UD3s-PmG0-qLyE-Z0ho-DYsxoz not found or rejected by a filter.
WARNING: Couldn't find device for segment belonging to fedora/root while checking used and assumed devices.
WARNING: Couldn't find device for segment belonging to fedora/swap while checking used and assumed devices.
PV VG Fmt Attr PSize PFree
/dev/sda lvm2 --- 128.00m 128.00m
[unknown] fedora lvm2 a-m 19.49g 0
---
lib/metadata/metadata.c | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c
index f9ce080..1ceed68 100644
--- a/lib/metadata/metadata.c
+++ b/lib/metadata/metadata.c
@@ -4597,6 +4597,7 @@ static int _check_devs_used_correspond_with_lv(struct dm_pool *mem, struct dm_li
struct device *dev;
struct lv_segment *seg;
uint32_t s;
+ int warned_about_no_dev = 0;
char *used_devnames = NULL, *assumed_devnames = NULL;
if (!(list = dev_cache_get_dev_list_for_lvid(lv->lvid.s + ID_LEN)))
@@ -4629,10 +4630,13 @@ static int _check_devs_used_correspond_with_lv(struct dm_pool *mem, struct dm_li
for (s = 0; s < seg->area_count; s++) {
if (seg_type(seg, s) == AREA_PV) {
if (!(dev = seg_dev(seg, s))) {
- log_error("Couldn't find device for segment belonging to "
- "%s while checking used and assumed devices.",
- display_lvname(lv));
- return 0;
+ if (!warned_about_no_dev) {
+ log_warn("WARNING: Couldn't find device for segment belonging "
+ "to %s while checking used and assumed devices.",
+ display_lvname(lv));
+ warned_about_no_dev = 1;
+ }
+ continue;
}
if (!(dev->flags & DEV_USED_FOR_LV)) {
if (!found_inconsistent) {
@@ -4653,11 +4657,10 @@ static int _check_devs_used_correspond_with_lv(struct dm_pool *mem, struct dm_li
if (!dm_pool_grow_object(mem, "\0", 1))
return_0;
assumed_devnames = dm_pool_end_object(mem);
+ log_warn("WARNING: Device mismatch detected for %s which is accessing %s instead of %s.",
+ display_lvname(lv), used_devnames, assumed_devnames);
}
- log_warn("WARNING: Device mismatch detected for %s which is accessing %s instead of %s.",
- display_lvname(lv), used_devnames, assumed_devnames);
-
return 1;
}