Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=e80ca65d305cd896b98f1…
Commit: e80ca65d305cd896b98f1023e22c2ec9b4d4e5b5
Parent: d6bce036155ae973c869bdce3ca5f824f933f599
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Mon Jun 17 22:47:35 2019 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Jun 19 13:36:58 2019 +0200
tests: replaces grep -q usage
Since we use 'set -euE -o pipefail' for shell execution,
any failure of any command in the 'piped' shell can result
in failure of whole executed chain - resulting in typically
unsually test skip, that was left unnoticed.
Since checked command have usually short output, the simplest
fix seems to be to let grep parse whole output instead
of quiting after first match.
---
test/lib/aux.sh | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/test/lib/aux.sh b/test/lib/aux.sh
index 3a66f53..86ed554 100644
--- a/test/lib/aux.sh
+++ b/test/lib/aux.sh
@@ -26,7 +26,7 @@ expect_failure() {
check_daemon_in_builddir() {
# skip if we don't have our own deamon...
if test -z "${installed_testsuite+varset}"; then
- (which "$1" 2>/dev/null | grep -q "$abs_builddir") || skip "$1 is not in executed path."
+ (which "$1" 2>/dev/null | grep "$abs_builddir" >/dev/null ) || skip "$1 is not in executed path."
fi
rm -f debug.log strace.log
}
@@ -167,7 +167,7 @@ prepare_clvmd() {
test -e "$DM_DEV_DIR/control" || dmsetup table >/dev/null # create control node
# skip if singlenode is not compiled in
- (clvmd --help 2>&1 | grep "Available cluster managers" | grep -q "singlenode") || \
+ (clvmd --help 2>&1 | grep "Available cluster managers" | grep "singlenode" >/dev/null) || \
skip "Compiled clvmd does not support singlenode for testing."
# lvmconf "activation/monitoring = 1"
@@ -588,7 +588,7 @@ teardown() {
dm_table | not grep -E -q "$vg|$vg1|$vg2|$vg3|$vg4" || {
# Avoid activation of dmeventd if there is no pid
cfg=$(test -s LOCAL_DMEVENTD || echo "--config activation{monitoring=0}")
- if dm_info suspended,name | grep -q "^Suspended:.*$PREFIX" ; then
+ if dm_info suspended,name | grep "^Suspended:.*$PREFIX" >/dev/null ; then
echo "## skipping vgremove, suspended devices detected."
else
vgremove -ff "$cfg" \
@@ -719,7 +719,7 @@ prepare_scsi_debug_dev() {
# Skip test if scsi_debug module is unavailable or is already in use
modprobe --dry-run scsi_debug || skip
- lsmod | not grep -q scsi_debug || skip
+ lsmod | not grep scsi_debug >/dev/null || skip
# Create the scsi_debug device and determine the new scsi device's name
# NOTE: it will _never_ make sense to pass num_tgts param;
@@ -1534,7 +1534,7 @@ driver_at_least() {
}
have_thin() {
- lvm segtypes 2>/dev/null | grep -q thin$ || {
+ lvm segtypes 2>/dev/null | grep thin$ >/dev/null || {
echo "Thin is not built-in." >&2
return 1
}
@@ -1578,7 +1578,7 @@ have_raid4 () {
}
have_cache() {
- lvm segtypes 2>/dev/null | grep -q cache$ || {
+ lvm segtypes 2>/dev/null | grep cache$ >/dev/null || {
echo "Cache is not built-in." >&2
return 1
}
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=d6bce036155ae973c869b…
Commit: d6bce036155ae973c869bdce3ca5f824f933f599
Parent: 8623e336513c6ac6fcb24aa7e2ef10b8a3a36c59
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Jun 19 12:42:01 2019 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Jun 19 13:33:53 2019 +0200
mirror: fix monitoring change
Commit a8921be641afe865c177e11b8859f4b937f76995 was supposedly a fix
for unwanted table reload - however before final commit, the tiny
change has been made that was believed to be an enhancment
of original prepared patch. Unfortunatelly the function
locking_is_clustered is not meant to be an equivalent test
of original function. Drop this change and using
original patch.
---
lib/activate/activate.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/activate/activate.c b/lib/activate/activate.c
index dc9bc9e..b3b8a25 100644
--- a/lib/activate/activate.c
+++ b/lib/activate/activate.c
@@ -2048,12 +2048,12 @@ int monitor_dev_for_events(struct cmd_context *cmd, const struct logical_volume
} else
continue;
- if (!locking_is_clustered() && !vg_write_lock_held() && lv_is_mirror(lv)) {
+ if (!cmd->is_clvmd && !vg_write_lock_held() && lv_is_mirror(lv)) {
/*
* Commands vgchange and lvchange do use read-only lock when changing
* monitoring (--monitor y|n). All other use cases hold 'write-lock'
* so they skip this dm mirror table refreshing step.
- * Shortcut can't be applied with clustered locking.
+ * Shortcut is also not applied with clvmd.
*/
if (!_lv_activate_lv(lv, &mirr_laopts)) {
stack;
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=556dcd2c6b82ead3a5aa5…
Commit: 556dcd2c6b82ead3a5aa50211f08f9d69be13fe1
Parent: 7c697c1058ed32ca6311c3fd4e05f1b444e72aa1
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Mon Jun 17 19:08:28 2019 +0200
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Mon Jun 17 19:08:28 2019 +0200
config: Fix default option which makes no sense
Default value is either undefined or commented, never both.
---
lib/config/config_settings.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index 7851a76..527d5bd 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -1694,7 +1694,7 @@ cfg(metadata_vgmetadatacopies_CFG, "vgmetadatacopies", metadata_CFG_SECTION, CFG
"and allows you to control which metadata areas are used at the\n"
"individual PV level using pvchange --metadataignore y|n.\n")
-cfg_runtime(metadata_pvmetadatasize_CFG, "pvmetadatasize", metadata_CFG_SECTION, CFG_DEFAULT_COMMENTED | CFG_DEFAULT_UNDEFINED, CFG_TYPE_INT, vsn(1, 0, 0), 0, NULL,
+cfg_runtime(metadata_pvmetadatasize_CFG, "pvmetadatasize", metadata_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_INT, vsn(1, 0, 0), 0, NULL,
"The default size of the metadata area in units of 512 byte sectors.\n"
"The metadata area begins at an offset of the page size from the start\n"
"of the device. The first PE is by default at 1 MiB from the start of\n"
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=68328990621ce3af85601…
Commit: 68328990621ce3af85601967de570741c3831392
Parent: 0000000000000000000000000000000000000000
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: 2019-06-15 07:23 +0000
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: 2019-06-15 07:23 +0000
annotated tag: v2_03_05 has been created
at 68328990621ce3af85601967de570741c3831392 (tag)
tagging 60bd9e8406ac28a04aa5e8165149f7a5d4f3265a (commit)
replaces v2_03_04
Release 2.03.05
Change when and how VG metadata are repaired:
- Move metadata repairs from VG reading to VG writing.
- Report/display/scan commands that read VGs will no longer write/repair.
- Improve VG reading to work if one good copy of metadata is found.
- Add vgck --updatemetadata command that will repair metadata problems.
MD component detection improvements:
- Add config setting md_component_checks to control MD component checks.
- Add end of device MD component checks when dev has no udev info.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
iQIcBAABAgAGBQJdBJ5yAAoJELkRJDHlCQOf+MgP/jCl0oGS/GvWmSiMlUdeioWy
SY+yqvYPa5fNnFjIg4qalJJLfooBJuTZQNjYaasB4qyKNrqYEnlVS1gt+GLHE29C
v/vDG6Q+Gcr32CqWT8sJR/x08mwPXjpWQwh74gHQ4/L7Vgau1/i8Ca4FFJS2KKlI
tAoX2StlaVTz5zrqozLCLV7ZYCijHXF+9Hwyw63zMeZ80lDEauCbVLfJnN+ZrCI4
Rb0pxVs88R8z4KeKWHrHTGBKvT9kmOMoe8msavRP9LGX+Icdcjr6/VSOfw4hDdZo
PsXDMJvermOGV2YtQiEkpY+tQ1SvrbOtpL5xeLAvRPI661zznD+AaysayOkSa0wT
HobkEnIUYV3Caj/Ud9fG51k6SFPxNIfjQZka2/pmdZe5RCfi5zRnUNeXLl/+WscD
0UVc+Zp66op8RoBBV9A/ITMkRWcC20d/h8WmjbiIuCLPphCaUlqOcwZZ3DGZ8NLe
yKXwDmT7XqKg4lUMF+OTilx1w4wjErdQi7k44JD9fzyoWeIq5BcmGAtPzXrbhBfu
lEA26/yq5tcnO8SWvoCrjgr6yPvcr0uDBSbN5Fo/7LFnXcE7eKbfSX9gVMyea8JW
VNxB/NawB00b0/kJL86QxuKnDPNFt+iJ7xSNWTIapGBxRtDdkqvfhYz+a3ZzntRE
3uxcDwroL4bnHGKFI7lP
=OoQQ
-----END PGP SIGNATURE-----
David Teigland (35):
Additional MD component checking
add flags to keep track of bad metadata
ability to keep track of bad mdas in lvmcache
ability to keep track of outdated pvs in lvmcache
keep track of which mdas have old metadata in lvmcache
add mda arg to add_mda
change args for text label read function
fix vg_commit return value
create separate lvmcache update functions for read and write
move wipe_outdated_pvs to vg_write
process_each_pv handle outdated pvs
move pv header repairs to vg_write
vgck --updatemetadata is a new command
vgcfgbackup add error messages
add a warning message when updating old metadata
improve reading and repairing vg metadata
metadata.c: removed unused code
tests: add missing-pv missing-pv-unused
tests: add metadata-old.sh
tests: add outdated-pv.sh
tests: add metadata-bad-text.sh
tests: add metadata-bad-mdaheader.sh
locking: reset global_ex flag at end of cmd
reset cmd wipe_outdated_pvs
lvmcache: remove unused code
vgsplit: simplify vg creation
lvmcache: remove unused function
locking: fix repeated convert to ex
fix command definition for pvchange -a
remove unused trustcache option
lvmcache: remove wrapper around lvmcache_get_vgnameids
vgchange: change debug message level
tests: aux have_writecache
WHATS_NEW for recent changes
fix man page generation
Marian Csontos (4):
post-release
Merge remote-tracking branch 'origin/master'
build: make generate
pre-release
Zdenek Kabelac (1):
tests: correct checked target name
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=b4ff865b44f47fc36e905…
Commit: b4ff865b44f47fc36e90505fd891dcf4d297c408
Parent: 9f5e46965bd3e967de8c3b6741f2b7f178192a53
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Sat Jun 15 08:30:04 2019 +0200
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Sat Jun 15 08:30:04 2019 +0200
build: make generate
---
conf/example.conf.in | 27 ++++++++++++++++++++++++++-
man/lvm-fullreport.8_pregen | 10 ----------
man/lvs.8_pregen | 10 ----------
man/pvchange.8_pregen | 6 +-----
man/pvs.8_pregen | 10 ----------
man/vgck.8_pregen | 26 +++++++++++++++++++++++++-
man/vgs.8_pregen | 10 ----------
7 files changed, 52 insertions(+), 47 deletions(-)
diff --git a/conf/example.conf.in b/conf/example.conf.in
index a5eba01..154f621 100644
--- a/conf/example.conf.in
+++ b/conf/example.conf.in
@@ -201,9 +201,34 @@ devices {
multipath_component_detection = 1
# Configuration option devices/md_component_detection.
- # Ignore devices that are components of software RAID (md) devices.
+ # Enable detection and exclusion of MD component devices.
+ # An MD component device is a block device that MD uses as part
+ # of a software RAID virtual device. When an LVM PV is created
+ # on an MD device, LVM must only use the top level MD device as
+ # the PV, and should ignore the underlying component devices.
+ # In cases where the MD superblock is located at the end of the
+ # component devices, it is more difficult for LVM to consistently
+ # identify an MD component, see the md_component_checks setting.
md_component_detection = 1
+ # Configuration option devices/md_component_checks.
+ # The checks LVM should use to detect MD component devices.
+ # MD component devices are block devices used by MD software RAID.
+ #
+ # Accepted values:
+ # auto
+ # LVM will skip scanning the end of devices when it has other
+ # indications that the device is not an MD component.
+ # start
+ # LVM will only scan the start of devices for MD superblocks.
+ # This does not incur extra I/O by LVM.
+ # full
+ # LVM will scan the start and end of devices for MD superblocks.
+ # This requires an extra read at the end of devices.
+ #
+ # This configuration option has an automatic default value.
+ # md_component_checks = "auto"
+
# Configuration option devices/fw_raid_component_detection.
# Ignore devices that are components of firmware RAID devices.
# LVM must use an external_device_info_source other than none for this
diff --git a/man/lvm-fullreport.8_pregen b/man/lvm-fullreport.8_pregen
index 1170dc7..07e618a 100644
--- a/man/lvm-fullreport.8_pregen
+++ b/man/lvm-fullreport.8_pregen
@@ -92,10 +92,6 @@ if information changes between commands.
.ad b
.br
.ad l
-[ \fB--trustcache\fP ]
-.ad b
-.br
-.ad l
[ \fB--unbuffered\fP ]
.ad b
.br
@@ -406,12 +402,6 @@ back metadata it believes has changed but hasn't.
.ad b
.HP
.ad l
-\fB--trustcache\fP
-.br
-Avoids certain device scanning during command processing. Do not use.
-.ad b
-.HP
-.ad l
\fB--unbuffered\fP
.br
Produce output immediately without sorting or aligning the columns properly.
diff --git a/man/lvs.8_pregen b/man/lvs.8_pregen
index c92ba14..8c3091d 100644
--- a/man/lvs.8_pregen
+++ b/man/lvs.8_pregen
@@ -96,10 +96,6 @@ lvs produces formatted output about LVs.
.ad b
.br
.ad l
-[ \fB--trustcache\fP ]
-.ad b
-.br
-.ad l
[ \fB--unbuffered\fP ]
.ad b
.br
@@ -427,12 +423,6 @@ back metadata it believes has changed but hasn't.
.ad b
.HP
.ad l
-\fB--trustcache\fP
-.br
-Avoids certain device scanning during command processing. Do not use.
-.ad b
-.HP
-.ad l
\fB--unbuffered\fP
.br
Produce output immediately without sorting or aligning the columns properly.
diff --git a/man/pvchange.8_pregen b/man/pvchange.8_pregen
index c21ce70..33c63dc 100644
--- a/man/pvchange.8_pregen
+++ b/man/pvchange.8_pregen
@@ -16,7 +16,7 @@ others are optional.
Change properties of all PVs.
.br
.P
-\fBpvchange\fP
+\fBpvchange\fP \fB-a\fP|\fB--all\fP
.RS 4
( \fB-x\fP|\fB--allocatable\fP \fBy\fP|\fBn\fP,
.ad b
@@ -26,10 +26,6 @@ Change properties of all PVs.
.ad b
.br
.ad l
- \fB-a\fP|\fB--all\fP,
-.ad b
-.br
-.ad l
\fB--addtag\fP \fITag\fP,
.ad b
.br
diff --git a/man/pvs.8_pregen b/man/pvs.8_pregen
index 1902f29..596f593 100644
--- a/man/pvs.8_pregen
+++ b/man/pvs.8_pregen
@@ -92,10 +92,6 @@ pvs produces formatted output about PVs.
.ad b
.br
.ad l
-[ \fB--trustcache\fP ]
-.ad b
-.br
-.ad l
[ \fB--unbuffered\fP ]
.ad b
.br
@@ -416,12 +412,6 @@ back metadata it believes has changed but hasn't.
.ad b
.HP
.ad l
-\fB--trustcache\fP
-.br
-Avoids certain device scanning during command processing. Do not use.
-.ad b
-.HP
-.ad l
\fB--unbuffered\fP
.br
Produce output immediately without sorting or aligning the columns properly.
diff --git a/man/vgck.8_pregen b/man/vgck.8_pregen
index 4f2a866..a66de5d 100644
--- a/man/vgck.8_pregen
+++ b/man/vgck.8_pregen
@@ -3,7 +3,7 @@
vgck - Check the consistency of volume group(s)
.
.SH SYNOPSIS
-\fBvgck\fP
+\fBvgck\fP \fIoption_args\fP \fIposition_args\fP
.br
[ \fIoption_args\fP ]
.br
@@ -12,6 +12,9 @@ vgck - Check the consistency of volume group(s)
.SH DESCRIPTION
vgck checks LVM metadata for consistency.
.SH USAGE
+Read and display information about a VG.
+.br
+.P
\fBvgck\fP
.br
.RS 4
@@ -26,6 +29,21 @@ vgck checks LVM metadata for consistency.
[ \fIVG\fP|\fITag\fP ... ]
.RE
+Rewrite VG metadata to correct problems.
+.br
+.P
+\fBvgck\fP \fB--updatemetadata\fP \fIVG\fP
+.br
+.RS 4
+[ COMMON_OPTIONS ]
+.RE
+.br
+
+Common options for command:
+.
+.RS 4
+.RE
+
Common options for lvm:
.
.RS 4
@@ -178,6 +196,12 @@ back metadata it believes has changed but hasn't.
.ad b
.HP
.ad l
+\fB--updatemetadata\fP
+.br
+Update VG metadata to correct problems.
+.ad b
+.HP
+.ad l
\fB-v\fP|\fB--verbose\fP ...
.br
Set verbose level. Repeat from 1 to 4 times to increase the detail
diff --git a/man/vgs.8_pregen b/man/vgs.8_pregen
index 7ba7b8c..8726909 100644
--- a/man/vgs.8_pregen
+++ b/man/vgs.8_pregen
@@ -88,10 +88,6 @@ vgs produces formatted output about VGs.
.ad b
.br
.ad l
-[ \fB--trustcache\fP ]
-.ad b
-.br
-.ad l
[ \fB--unbuffered\fP ]
.ad b
.br
@@ -403,12 +399,6 @@ back metadata it believes has changed but hasn't.
.ad b
.HP
.ad l
-\fB--trustcache\fP
-.br
-Avoids certain device scanning during command processing. Do not use.
-.ad b
-.HP
-.ad l
\fB--unbuffered\fP
.br
Produce output immediately without sorting or aligning the columns properly.
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=8623e336513c6ac6fcb24…
Commit: 8623e336513c6ac6fcb24aa7e2ef10b8a3a36c59
Parent: c31e6b0acad339ec3cdc0c8d7e0e01f8d816ed10
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Fri Jun 14 10:25:00 2019 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Fri Jun 14 10:26:21 2019 -0500
lvconvert: disable linear to mirror of active LV in cluster VG
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.
---
tools/lvconvert.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
index bc666c0..fcbbd26 100644
--- a/tools/lvconvert.c
+++ b/tools/lvconvert.c
@@ -864,6 +864,17 @@ 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.