summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2015-07-13 11:08:49 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2015-07-15 13:10:21 +0200
commit4a33d5714341caf281f8e519b4b6c875d6eba292 (patch)
tree581d1562c7bce41f89a3ef28b5985d796398d2c3
parent34a410994674f450564d6f221ff5ef0b16d37280 (diff)
downloadlvm2-4a33d5714341caf281f8e519b4b6c875d6eba292.tar.gz
thin: fix warning for overprovisioning
When lvm.conf is properly configure for auto resize of overprovisioned thin-pool volume, avoid showing any warning (2.02.124).
-rw-r--r--WHATS_NEW1
-rw-r--r--lib/metadata/thin_manip.c2
-rw-r--r--test/shell/lvextend-thin-metadata-dmeventd.sh3
3 files changed, 5 insertions, 1 deletions
diff --git a/WHATS_NEW b/WHATS_NEW
index 4fd027c46..3a8cd9eec 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.126 -
================================
+ Fix detection of thin-pool overprovisioning (2.02.124).
Fix lvmpolld segfaults on 32 bit architectures.
Fix ignored --startstopservices option if running lvmconf with systemd.
diff --git a/lib/metadata/thin_manip.c b/lib/metadata/thin_manip.c
index 181c72e6b..d0a5c5518 100644
--- a/lib/metadata/thin_manip.c
+++ b/lib/metadata/thin_manip.c
@@ -303,6 +303,8 @@ int pool_check_overprovisioning(const struct logical_volume *lv)
/* There is some free space in VG, but it is not configured
* for growing - threshold is 100% or percent is 0% */
sz = poolsum;
+ else
+ sz = ~0; /* No warning */
if (sz != ~0) {
log_warn("WARNING: Sum of all thin volume sizes (%s) exceeds the "
diff --git a/test/shell/lvextend-thin-metadata-dmeventd.sh b/test/shell/lvextend-thin-metadata-dmeventd.sh
index 72cdb8187..689707217 100644
--- a/test/shell/lvextend-thin-metadata-dmeventd.sh
+++ b/test/shell/lvextend-thin-metadata-dmeventd.sh
@@ -61,7 +61,8 @@ aux prepare_pvs 3 256
vgcreate -s 1M $vg $(cat DEVICES)
# Testing dmeventd autoresize
-lvcreate -L200M -V1G -n thin -T $vg/pool
+lvcreate -L200M -V500M -n thin -T $vg/pool 2>&1 | tee out
+not grep "WARNING: Sum" out
lvcreate -L2M -n $lv1 $vg
lvchange -an $vg/thin $vg/pool