Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=7cfbf3a394c2663fbeed1…
Commit: 7cfbf3a394c2663fbeed17705320b83e69781720
Parent: 5b3fbccab9e243901f512f9db3059a3c5eb09fe8
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Thu Aug 29 11:35:46 2019 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Thu Aug 29 11:35:46 2019 -0500
fix segfault for invalid characters in vg name
Fixes a regression from commit ba7ff96faff0
"improve reading and repairing vg metadata"
where the error path for a vg name with invalid
charaters was missing an error flag, which led
to the caller not recognizing an error occured.
Previously, an error flag was hidden in the old
_vg_make_handle function.
---
lib/metadata/metadata.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c
index 2c61bde..6d21ff9 100644
--- a/lib/metadata/metadata.c
+++ b/lib/metadata/metadata.c
@@ -4900,7 +4900,8 @@ struct volume_group *vg_read(struct cmd_context *cmd, const char *vg_name, const
if (!validate_name(vg_name)) {
log_error("Volume group name \"%s\" has invalid characters.", vg_name);
- return NULL;
+ failure |= FAILED_NOTFOUND;
+ goto_bad;
}
/*
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=dcbed38b3339ce4da722b…
Commit: dcbed38b3339ce4da722bccec8eaf7b8d775a6c2
Parent: 32a8865a272d31d5bc12332a4da0309ce3af9243
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Tue Aug 27 15:40:24 2019 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Tue Aug 27 15:40:24 2019 -0500
fix duplicate pv size check
Fixes a segfault in the recent commit e01fddc57:
"improve duplicate pv handling for md components"
While choosing between duplicates, the info struct is
not always valid; it may have been dropped already.
Remove the code that was still using the info struct for
size comparisons. The size comparisons were a bogus check
anyway because it was just preferring the dev that had
already been chosen, it wasn't actually comparing the
dev size to the PV size. It would be good to use a
dev/PV size comparison in the duplicate handling code, but
the PV size is not available until after vg_read, not
from the scan.
---
lib/cache/lvmcache.c | 24 ------------------------
1 files changed, 0 insertions(+), 24 deletions(-)
diff --git a/lib/cache/lvmcache.c b/lib/cache/lvmcache.c
index 87c0021..29d6446 100644
--- a/lib/cache/lvmcache.c
+++ b/lib/cache/lvmcache.c
@@ -491,12 +491,10 @@ static void _choose_duplicates(struct cmd_context *cmd,
struct lvmcache_info *info;
struct device *dev1, *dev2;
uint32_t dev1_major, dev1_minor, dev2_major, dev2_minor;
- uint64_t info_size, dev1_size, dev2_size;
int in_subsys1, in_subsys2;
int is_dm1, is_dm2;
int has_fs1, has_fs2;
int has_lv1, has_lv2;
- int same_size1, same_size2;
int prev_unchosen1, prev_unchosen2;
int change;
@@ -613,11 +611,6 @@ next:
dev2_major = MAJOR(dev2->dev);
dev2_minor = MINOR(dev2->dev);
- if (!dev_get_size(dev1, &dev1_size))
- dev1_size = 0;
- if (!dev_get_size(dev2, &dev2_size))
- dev2_size = 0;
-
has_lv1 = (dev1->flags & DEV_USED_FOR_LV) ? 1 : 0;
has_lv2 = (dev2->flags & DEV_USED_FOR_LV) ? 1 : 0;
@@ -630,21 +623,11 @@ next:
has_fs1 = dm_device_has_mounted_fs(dev1_major, dev1_minor);
has_fs2 = dm_device_has_mounted_fs(dev2_major, dev2_minor);
- info_size = info->device_size >> SECTOR_SHIFT;
- same_size1 = (dev1_size == info_size);
- same_size2 = (dev2_size == info_size);
-
log_debug_cache("PV %s compare duplicates: %s %u:%u. %s %u:%u.",
devl->dev->pvid,
dev_name(dev1), dev1_major, dev1_minor,
dev_name(dev2), dev2_major, dev2_minor);
- log_debug_cache("PV %s: wants size %llu. %s is %llu. %s is %llu.",
- devl->dev->pvid,
- (unsigned long long)info_size,
- dev_name(dev1), (unsigned long long)dev1_size,
- dev_name(dev2), (unsigned long long)dev2_size);
-
log_debug_cache("PV %s: %s was prev %s. %s was prev %s.",
devl->dev->pvid,
dev_name(dev1), prev_unchosen1 ? "not chosen" : "<none>",
@@ -686,13 +669,6 @@ next:
/* change to 2 */
change = 1;
reason = "device is used by LV";
- } else if (same_size1 && !same_size2) {
- /* keep 1 */
- reason = "device size is correct";
- } else if (same_size2 && !same_size1) {
- /* change to 2 */
- change = 1;
- reason = "device size is correct";
} else if (has_fs1 && !has_fs2) {
/* keep 1 */
reason = "device has fs mounted";
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=a17661b9cdfc6b6d9762e…
Commit: a17661b9cdfc6b6d9762e7d42515f1b1c751e0ae
Parent: 0000000000000000000000000000000000000000
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: 2019-08-27 15:22 +0000
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: 2019-08-27 15:22 +0000
annotated tag: v2_02_186 has been created
at a17661b9cdfc6b6d9762e7d42515f1b1c751e0ae (tag)
tagging 4e5761487efcb33a47f8913f5302e36307604832 (commit)
replaces v2_02_185
Release 2.02.186
Bug fix release.
Notable changes:
Fix not working RAID repair.
Allow --stripes/--stripesize in 'mirror' conversions.
Disable incorrect linear to mirror of active LV in cluster VG.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
iQIcBAABAgAGBQJdZUzQAAoJELkRJDHlCQOfQa8P/1TM1oNoCkwkkWuSDVeSg8KT
axHyGJnxDqVivwasPRx3xvaP0NsRsc2mpZxB9NChfZdwkrF3+CF5fVsqSVLnGHxL
HCeHfOV5PjtsQAf+uUG6AS/fZllW1iRfeaMxXEqaa/DbRrspaJQtMj8JEVn7b0l9
Fi2R3nKeaNio8AHfxupZz9McZaBgF6QihqEOVgLl/gaOZ24RcyAvU1onIzyz3OnJ
8QMfiA3UHc1UwpP79nCcSbx8ndDMJxoxK/HuyVMNatNP18RZ0KQy6gMR92ViWjiQ
InEte1qj+3rzWskbk2zTPrBLUYAnx2UTyGbbWdwY+ub7Z4Dj5ZBq9kIIW/gHcCJF
ApUhR2IB6iCA8EsooLvVBzGW+SKMC5E+xt94uUzKEP+WClxqRamPZ7Z5vKHDuJNz
5Q9VZOHag/z4vzKyyOh874Gd4STec6rOi6DIBVgXhxMjDqZUm7hRrr/4io56pToH
nNLrOr9JQF9rwgxWQHXjkcWZpEPHHzhAc4NSyXIscegzS1F+KODUHlkCJpRWHRTD
mZODtB648uUK9XKyYGbnMXSRBJnAf2rq8XDpyzvOvETBx73r5dpTlBb5UlOb9GGm
OzlonVwXiFcB3Ru/WnRqUBHqShe7aqfGt8Hay4rwLwlfH7FhyqeuDDFf8H6ZEo8k
tOHO9oY1QcJWSSQjGnFx
=uehd
-----END PGP SIGNATURE-----
David Teigland (15):
lvmlockd: do not allow mirror LV to be activated shared
man: updates to lvmlockd
lvmcache: remove unused_duplicate_devs list from cmd
lvconvert: disable linear to mirror of active LV in cluster VG
Revert "lvconvert: disable linear to mirror of active LV in cluster VG"
pvremove/vgextend: fix using device aliases with lvmetad
tests: fsadm-crypt.sh update mkfs parameter
vgrename: use global lock
Fix rounding writes up to sector size
tests: large-physical-sector-size
WHATS_NEW: fix large physical block size
vgchange: don't fail monitor command if vg is exported
man lvmthin: remove nonexistent topic
devices: put ifdef around BLKPBSZGET
pvscan: avoid redundant activation
Heinz Mauelshagen (4):
lvconvert: allow --stripes/--stripesize in 'mirror' conversions
pvmove_poll: instrument
dmeventd: avoid bail out preventing repair in raid plugin
Revert "pvmove_poll: instrument"
Marian Csontos (5):
post-release
build: Fix make rpm with releases
cov: Fix a leak
build: make generate
pre-release
Peter Rajnoha (1):
udev: do not overwrite ID_MODEL in 69-dm-lvm-metad.rules
Zdenek Kabelac (49):
tests: update cache test
cache: support no_discard_passdown
tests: automatically set scan_lvs when using extend_filter
tests: check no_discard_passdown
mirror: fix monitoring change
tests: replaces grep -q usage
tests: fix ra checking
tests: check mirror with clvmd and dmeventd
aux: fix selecting lvmconf values
tests: simplify some var settings
tests: update resize value
tests: check for installed time command
tests: for cluster testing we always need exclusive mirrors
tests: drop unwanted backup
tests: properly enforce v1
tests: accept also value 512
tests: for cluster always use exlusive mirrors
cov: unlock lvm2 mutex on error path
cov: release iterator on error path
cov: check result of dev_read_bytes
cov: check result of dev_get_block_size
cov: check lv_info
cov: check for socket_path being set
cov: add stack tracing for error paths
cov: clearer condition check
cov: validate pagesize is not negative
cov: ensure cname exists before derefering it
cov: remove unused headers
libdm: implement search for device names for older kernels
gcc: cleanup warning of shawhing a global dclr
gcc: clean uninitialized var warning
cov: release iterator on error path
cov: avoid recursive self-inclusion
tests: raise minsize of xfs
tests: use luks1 for test
tests: split args
tests: add settle wait before issue remove
make: support comments in exported symbols
exported_symbols: comment old symbols
pvmove: correcting read_ahead setting
pvmove: add missing synchronization
activation: add synchronization point
dmsetup: debug print
activation: extend handling of pending_delete
snapshot: always activate
cache: improve vgremove loop
lv_manip: add synchronizations
dmsetup: missed trailing newline
activation: use cmd pending mem for pending_delete
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=3954034b1577c21be18ac…
Commit: 3954034b1577c21be18acd2f8e1904c3181c6c19
Parent: ad86cda4d79704dcce13d98cd9579baab56b7e7b
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Tue Aug 27 17:10:05 2019 +0200
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Tue Aug 27 17:10:52 2019 +0200
build: make generate
---
man/lvconvert.8_pregen | 70 ++++++++++++++++++++++++++----------------------
1 files changed, 38 insertions(+), 32 deletions(-)
diff --git a/man/lvconvert.8_pregen b/man/lvconvert.8_pregen
index a47127b..e6de8f0 100644
--- a/man/lvconvert.8_pregen
+++ b/man/lvconvert.8_pregen
@@ -354,6 +354,44 @@ Convert LV to striped.
.RE
-
+Convert LV to type mirror (also see type raid1),
+.br
+.P
+\fBlvconvert\fP \fB--type\fP \fBmirror\fP \fILV\fP
+.br
+.RS 4
+.ad l
+[ \fB-m\fP|\fB--mirrors\fP [\fB+\fP|\fB-\fP]\fINumber\fP ]
+.ad b
+.br
+.ad l
+[ \fB-I\fP|\fB--stripesize\fP \fISize\fP[k|UNIT] ]
+.ad b
+.br
+.ad l
+[ \fB-R\fP|\fB--regionsize\fP \fISize\fP[m|UNIT] ]
+.ad b
+.br
+.ad l
+[ \fB-i\fP|\fB--interval\fP \fINumber\fP ]
+.ad b
+.br
+.ad l
+[ \fB--stripes\fP \fINumber\fP ]
+.ad b
+.br
+.ad l
+[ \fB--mirrorlog\fP \fBcore\fP|\fBdisk\fP ]
+.ad b
+.br
+[ COMMON_OPTIONS ]
+.RE
+.br
+.RS 4
+[ \fIPV\fP ... ]
+.RE
+-
+
Convert LV to raid or change raid layout
.br
(a specific raid level must be used, e.g. raid1).
@@ -1472,38 +1510,6 @@ For example, LVM_VG_NAME can generally be substituted for a required VG paramete
.SH ADVANCED USAGE
Alternate command forms, advanced command usage, and listing of all valid syntax for completeness.
.P
-Convert LV to type mirror (also see type raid1),
-.br
-(also see lvconvert --mirrors).
-.br
-.P
-\fBlvconvert\fP \fB--type\fP \fBmirror\fP \fILV\fP
-.br
-.RS 4
-.ad l
-[ \fB-m\fP|\fB--mirrors\fP [\fB+\fP|\fB-\fP]\fINumber\fP ]
-.ad b
-.br
-.ad l
-[ \fB-R\fP|\fB--regionsize\fP \fISize\fP[m|UNIT] ]
-.ad b
-.br
-.ad l
-[ \fB-i\fP|\fB--interval\fP \fINumber\fP ]
-.ad b
-.br
-.ad l
-[ \fB--mirrorlog\fP \fBcore\fP|\fBdisk\fP ]
-.ad b
-.br
-[ COMMON_OPTIONS ]
-.RE
-.br
-.RS 4
-[ \fIPV\fP ... ]
-.RE
--
-
Change the region size of an LV.
.br
.P