Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=3a4267ade462e906…
Commit: 3a4267ade462e9066fbe70076da0eff679b3cdb6
Parent: b26604c8d84a189fc3ee276d6e8711a49eecd831
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Tue Aug 30 13:28:36 2016 +0200
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Aug 31 11:13:59 2016 +0200
tests: skip test for older cache target
Some test on older can targets are not going to work, and
since there is no other fix then using newer kernel - skip
such tests completely.
---
test/shell/lvconvert-cache-chunks.sh | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/test/shell/lvconvert-cache-chunks.sh b/test/shell/lvconvert-cache-chunks.sh
index 806db0f..4631e0e 100644
--- a/test/shell/lvconvert-cache-chunks.sh
+++ b/test/shell/lvconvert-cache-chunks.sh
@@ -10,6 +10,7 @@
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
# Exercise number of cache chunks in cache pool
+# Skips creation of real cached device for older cache targets...
SKIP_WITH_LVMLOCKD=1
SKIP_WITH_LVMPOLLD=1
@@ -34,8 +35,11 @@ lvcreate -L1M -n $lv1 $vg
# Not let pass small chunks when caching origin
fail lvconvert -H --chunksize 128K --cachepool $vg/cpool $vg/$lv1
-# Though 2M is valid
-lvconvert -y -H --chunksize 2M --cachepool $vg/cpool $vg/$lv1
+# Thought 2M is valid
+if aux have_cache 1 8 0 ; then
+ # Without SMQ we run out of kernel memory easily
+ lvconvert -y -H --chunksize 2M --cachepool $vg/cpool $vg/$lv1
+fi
lvremove -f $vg
@@ -46,8 +50,10 @@ lvcreate -L1T -n cpool $vg
# Not allowed to create more then 10e6 chunks
fail lvconvert -y --type cache-pool --chunksize 128K $vg/cpool
-# Let operation pass when max_chunk limit is raised
-lvconvert -y --type cache-pool --chunksize 128K $vg/cpool \
- --config 'allocation/cache_pool_max_chunks=10000000'
+if aux have_cache 1 8 0 ; then
+ # Let operation pass when max_chunk limit is raised
+ lvconvert -y --type cache-pool --chunksize 128K $vg/cpool \
+ --config 'allocation/cache_pool_max_chunks=10000000'
+fi
vgremove -f $vg
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=16ed726610eca266…
Commit: 16ed726610eca266bc6ef03989a156862ebf3d7a
Parent: 52d1ddd601d278821d69aa35914e0db18f018749
Author: Peter Rajnoha <prajnoha(a)redhat.com>
AuthorDate: Tue Aug 30 15:33:50 2016 +0200
Committer: Peter Rajnoha <prajnoha(a)redhat.com>
CommitterDate: Tue Aug 30 15:38:34 2016 +0200
lvmdump: use lsblk -s and lsblk -O in lvmdump only if these options are supported
The lsblk is just a nice helper here - it's not crucial for lvmdump so
do best effort here and use the most we can from current version of
lsblk that is installed on system. The lsblk -s option was added a bit
later after lsblk introduction and lsblk -O support even more later -
so if these are not available, use only pure lsblk output without any
extras.
---
WHATS_NEW | 1 +
scripts/lvmdump.sh | 13 ++++++++++---
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index ad3d174..3f7eaf1 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.165 -
===================================
+ Use lsblk -s and lsblk -O in lvmdump only if these options are supported.
Fix number of stripes shown in lvcreate raid10 message when too many.
Do not monitor cache-pool metadata when LV is just being cleared.
Add allocation/cache_pool_max_chunks to prevent misuse of cache target.
diff --git a/scripts/lvmdump.sh b/scripts/lvmdump.sh
index d13a69b..85f8e5c 100755
--- a/scripts/lvmdump.sh
+++ b/scripts/lvmdump.sh
@@ -28,6 +28,7 @@ PS=ps # need alx
SED=sed
DD=dd
CUT=cut
+GREP=grep
DATE=date
BASENAME=basename
UDEVADM=udevadm
@@ -259,8 +260,14 @@ if (( $sysreport )); then
if test -z "LSBLK"; then
myecho "WARNING: lsblk not found"
else
- log "$LSBLK -O >> \"$sysreport_dir/lsblk\""
- log "$LSBLK -s >> \"$sysreport_dir/lsblk_s\""
+ if $LSBLK --help | $GREP -- --output-all >/dev/null; then
+ log "$LSBLK -O >> \"$sysreport_dir/lsblk_O\""
+ else
+ log "$LSBLK >> \"$sysreport_dir/lsblk\""
+ fi
+ if $LSBLK --help | $GREP -- --inverse >/dev/null; then
+ log "$LSBLK -s >> \"$sysreport_dir/lsblk_s\""
+ fi
fi
if test -z "$SYSTEMCTL"; then
@@ -281,7 +288,7 @@ if (( $sysreport )); then
lvm2-activation-net.service \
> \"$sysreport_dir/systemd_lvm2_services_status\" 2>> \"$log\""
log "$SYSTEMCTL list-units -l -a --no-legend --no-pager > \"$sysreport_dir/systemd_unit_list\" 2>> \"$log\""
- for unit in $(cat $sysreport_dir/systemd_unit_list | grep lvm2-pvscan | cut -d " " -f 1); do
+ for unit in $(cat $sysreport_dir/systemd_unit_list | $GREP lvm2-pvscan | cut -d " " -f 1); do
log "$SYSTEMCTL status -l --no-pager -n $log_lines -o short-precise $unit >> \"$sysreport_dir/systemd_lvm2_pvscan_service_status\""
done
fi
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=52d1ddd601d27882…
Commit: 52d1ddd601d278821d69aa35914e0db18f018749
Parent: be85c22f6591435f27380e944f4770612b3b6d3c
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Tue Aug 30 13:23:39 2016 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Tue Aug 30 13:23:39 2016 +0100
config: regenerate
---
conf/example.conf.in | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/conf/example.conf.in b/conf/example.conf.in
index b98a19f..b1a2a9c 100644
--- a/conf/example.conf.in
+++ b/conf/example.conf.in
@@ -428,6 +428,12 @@ allocation {
# 32KiB to 1GiB in multiples of 32.
# This configuration option does not have a default value defined.
+ # Configuration option allocation/cache_pool_max_chunks.
+ # The maximum number of chunks in a cache pool.
+ # For cache target v1.9 the recommended maximumm is 1000000 chunks.
+ # Using cache pool with more chunks may degrade cache performance.
+ # This configuration option does not have a default value defined.
+
# Configuration option allocation/thin_pool_metadata_require_separate_pvs.
# Thin pool metdata and data will always use different PVs.
thin_pool_metadata_require_separate_pvs = 0
@@ -1684,11 +1690,11 @@ activation {
# This configuration option has an automatic default value.
# quoted = 1
- # Configuration option report/colums_as_rows.
+ # Configuration option report/columns_as_rows.
# Output each column as a row.
# If set, this also implies report/prefixes=1.
# This configuration option has an automatic default value.
- # colums_as_rows = 0
+ # columns_as_rows = 0
# Configuration option report/binary_values_as_numeric.
# Use binary values 0 or 1 instead of descriptive literal values.
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=be85c22f6591435f…
Commit: be85c22f6591435f27380e944f4770612b3b6d3c
Parent: 7412690dd2ca55d0a790ba50a3425565758130ce
Author: Alasdair G Kergon <agk(a)redhat.com>
AuthorDate: Tue Aug 30 12:04:23 2016 +0100
Committer: Alasdair G Kergon <agk(a)redhat.com>
CommitterDate: Tue Aug 30 12:04:23 2016 +0100
raid10: Fix #stripes in lvcreate msg when too many.
---
WHATS_NEW | 1 +
tools/lvcreate.c | 2 +-
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 6980e17..ad3d174 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.165 -
===================================
+ Fix number of stripes shown in lvcreate raid10 message when too many.
Do not monitor cache-pool metadata when LV is just being cleared.
Add allocation/cache_pool_max_chunks to prevent misuse of cache target.
Give error not segfault in lvconvert --splitmirrors when PV lies outside LV.
diff --git a/tools/lvcreate.c b/tools/lvcreate.c
index 33664c5..387c8d4 100644
--- a/tools/lvcreate.c
+++ b/tools/lvcreate.c
@@ -591,7 +591,7 @@ static int _read_mirror_and_raid_params(struct cmd_context *cmd,
/* FIMXE: raid10 check has to change once we support data copies and odd numbers of stripes */
if (seg_is_raid10(lp) && lp->mirrors * lp->stripes > max_images) {
log_error("Only up to %u stripes in %s supported currently.",
- max_images, lp->segtype->name);
+ max_images / lp->mirrors, lp->segtype->name);
return 0;
} else if (seg_is_mirrored(lp)) {
if (lp->mirrors > max_images) {
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=1870b3293a26f6d9…
Commit: 1870b3293a26f6d946e8451a10e8c9762ae9f31c
Parent: 96a0604bd036d78af964392460d0309456b58b1a
Author: Tony Asleson <tasleson(a)redhat.com>
AuthorDate: Mon Aug 29 14:52:41 2016 -0500
Committer: Tony Asleson <tasleson(a)redhat.com>
CommitterDate: Mon Aug 29 15:26:56 2016 -0500
lvmdbusd/lvmdb.py: Make stand alone execution work
This was broken when the args were moved to cfg
---
daemons/lvmdbusd/cmdhandler.py | 10 +++++-----
daemons/lvmdbusd/utils.py | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/daemons/lvmdbusd/cmdhandler.py b/daemons/lvmdbusd/cmdhandler.py
index 877f17c..9b0c877 100644
--- a/daemons/lvmdbusd/cmdhandler.py
+++ b/daemons/lvmdbusd/cmdhandler.py
@@ -38,10 +38,6 @@ total_count = 0
# at the same time.
cmd_lock = threading.RLock()
-# The actual method which gets called to invoke the lvm command, can vary
-# from forking a new process to using lvm shell
-_t_call = None
-
class LvmExecutionMeta(object):
@@ -113,12 +109,16 @@ def call_lvm(command, debug=False):
_debug_c(command, process.returncode, (stdout_text, stderr_text))
if process.returncode == 0:
- if cfg.args.debug and out[1] and len(out[1]) and 'help' not in command:
+ if cfg.args and cfg.args.debug and out[1] and len(out[1]) and \
+ 'help' not in command:
log_error('WARNING: lvm is out-putting text to STDERR on success!')
_debug_c(command, process.returncode, (stdout_text, stderr_text))
return process.returncode, stdout_text, stderr_text
+# The actual method which gets called to invoke the lvm command, can vary
+# from forking a new process to using lvm shell
+_t_call = call_lvm
def _shell_cfg():
global _t_call
diff --git a/daemons/lvmdbusd/utils.py b/daemons/lvmdbusd/utils.py
index 06301cd..7d217df 100644
--- a/daemons/lvmdbusd/utils.py
+++ b/daemons/lvmdbusd/utils.py
@@ -262,7 +262,7 @@ def _common_log(msg, *attributes):
# @param msg Message to output to stdout
# @return None
def log_debug(msg, *attributes):
- if cfg.args.debug:
+ if cfg.args and cfg.args.debug:
_common_log(msg, *attributes)