From: Zdenek Kabelac <zkabelac@sourceware.org>
To: lvm-devel@redhat.com
Subject: main - tests: check resize of cached vdopool
Date: Wed, 17 Feb 2021 10:54:43 +0000 (GMT) [thread overview]
Message-ID: <20210217105443.91002382E818@sourceware.org> (raw)
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=19e137358008ce0a73c980d10cfdeaad7f9a5045
Commit: 19e137358008ce0a73c980d10cfdeaad7f9a5045
Parent: 5bf1dba9eb8a8b77410e386e59dadeb27801b14e
Author: Zdenek Kabelac <zkabelac@redhat.com>
AuthorDate: Wed Feb 17 11:50:27 2021 +0100
Committer: Zdenek Kabelac <zkabelac@redhat.com>
CommitterDate: Wed Feb 17 11:53:18 2021 +0100
tests: check resize of cached vdopool
---
test/shell/lvconvert-cache-vdo.sh | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/test/shell/lvconvert-cache-vdo.sh b/test/shell/lvconvert-cache-vdo.sh
index 8e2894877..39caf5e03 100644
--- a/test/shell/lvconvert-cache-vdo.sh
+++ b/test/shell/lvconvert-cache-vdo.sh
@@ -17,6 +17,10 @@ SKIP_WITH_LVMPOLLD=1
. lib/inittest
+percent_() {
+ get lv_field $vg/vpool data_percent | cut -d. -f1
+}
+
aux have_vdo 6 2 0 || skip
aux have_cache 1 3 0 || skip
@@ -41,9 +45,15 @@ lvchange -ay $vg
check dev_md5sum $vg $lv1
lvconvert --yes --cache --cachepool cpool $vg/vpool
-lvconvert --splitcache $vg/vpool
+
+VDODATA="$(percent_)"
+# Check resize of cached VDO pool
+lvextend -L+1G $vg/vpool
lvs -a $vg
+# Check after resize usage is reduced
+test "$(percent_)" -lt $VDODATA
+lvconvert --splitcache $vg/vpool
lvconvert --yes --cache --cachepool cpool $vg/$lv1
check dev_md5sum $vg $lv1
reply other threads:[~2021-02-17 10:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210217105443.91002382E818@sourceware.org \
--to=zkabelac@sourceware.org \
--cc=lvm-devel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.