main - post-release
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=3e2f09d78b64719e6c3...
Commit: 3e2f09d78b64719e6c3d403fb1c6f93b06d80335
Parent: 01b05cf51dd547354b4ad70e7f8f4ff7ff0bb152
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Fri May 7 22:36:56 2021 +0200
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Fri May 7 23:09:15 2021 +0200
post-release
---
VERSION | 2 +-
VERSION_DM | 2 +-
WHATS_NEW | 3 +++
WHATS_NEW_DM | 3 +++
4 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/VERSION b/VERSION
index d9c3e2336..6e36bd169 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.03.12(2) (2021-05-07)
+2.03.13(2)-git (2021-05-07)
diff --git a/VERSION_DM b/VERSION_DM
index 6105a0ff1..df334e09b 100644
--- a/VERSION_DM
+++ b/VERSION_DM
@@ -1 +1 @@
-1.02.177 (2021-05-07)
+1.02.179-git (2021-05-07)
diff --git a/WHATS_NEW b/WHATS_NEW
index 6f339a509..4b5b23072 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,3 +1,6 @@
+Version 2.03.13 -
+===============================
+
Version 2.03.12 - 07th May 2021
===============================
Allow attaching cache to thin data volume.
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index fe4310509..9de74dfe2 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,3 +1,6 @@
+Version 1.02.179 -
+================================
+
Version 1.02.177 - 07th May 2021
================================
Configure proceeds without libaio to allow build of device-mapper only.
2 years, 11 months
main - pre-release
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=01b05cf51dd547354b4...
Commit: 01b05cf51dd547354b4ad70e7f8f4ff7ff0bb152
Parent: 64719861ec094607162cd4faa4a0b2f1d8a3421c
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Fri May 7 22:34:45 2021 +0200
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Fri May 7 23:09:09 2021 +0200
pre-release
---
VERSION | 2 +-
VERSION_DM | 2 +-
WHATS_NEW | 16 ++++++++++------
WHATS_NEW_DM | 4 ++--
4 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/VERSION b/VERSION
index 5723491c3..d9c3e2336 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.03.12(2)-git (2021-01-08)
+2.03.12(2) (2021-05-07)
diff --git a/VERSION_DM b/VERSION_DM
index 380bd1ed5..6105a0ff1 100644
--- a/VERSION_DM
+++ b/VERSION_DM
@@ -1 +1 @@
-1.02.177-git (2021-01-08)
+1.02.177 (2021-05-07)
diff --git a/WHATS_NEW b/WHATS_NEW
index 7917c2690..6f339a509 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,10 +1,13 @@
-Version 2.03.12 -
-===================================
+Version 2.03.12 - 07th May 2021
+===============================
+ Allow attaching cache to thin data volume.
Fix memleak when generating list of outdated pvs.
Better hyphenation usage in man pages.
Replace use of deprecated security_context_t with char*.
Configure supports AIO_LIBS and AIO_CFLAGS.
Improve build process for static builds.
+ New --setautoactivation option to modify LV or VG auto activation.
+ New metadata based autoactivation property for LVs and VGs.
Improve signal handling with lvmpolld.
Signal handler can interrupt command also for SIGTERM.
Lvreduce --yes support.
@@ -20,6 +23,7 @@ Version 2.03.12 -
Merge polling does not fail, when LV is found to be already merged.
Poll volumes with at least 100ms delays.
Do not flush dm cache when cached LV is going to be removed.
+ New lvmlockctl_kill_command configuration option.
Support interruption while waiting on device close before deactivation.
Flush thin-pool messages before removing more thin volumes.
Improve hash function with less collisions and make it faster.
@@ -33,6 +37,7 @@ Version 2.03.12 -
Add devices file feature, off by default for now.
Support extension of writecached volumes.
Fix problem with unbound variable usage within fsadm.
+ Fix IMSM MD RAID detection on 4k devices.
Check for presence of VDO target before starting any conversion.
Support metatadata profiles with volume VDO pool conversions.
Support -Zn for conversion of already formated VDO pools.
@@ -49,11 +54,11 @@ Version 2.03.12 -
Allocation prints better error when metadata cannot fit on a single PV.
Pvmove can better resolve full thin-pool tree move.
Limit pool metadata spare to 16GiB.
- Improves convertsion and allocation of pool metadata.
+ Improves conversion and allocation of pool metadata.
Support thin pool metadata 15.88GiB, adds 64MiB, thin_pool_crop_metadata=0.
- Enhance lvdisplay to report raid availiable/partial.
+ Enhance lvdisplay to report raid available/partial.
Support online rename of VDO pools.
- Imporove removal of pmspare when last pool is removed.
+ Improve removal of pmspare when last pool is removed.
Fix problem with wiping of converted LVs.
Fix memleak in scanning (2.03.11).
Fix corner case allocation for thin-pools.
@@ -256,7 +261,6 @@ Version 2.03.00 - 10th October 2018
Remove clvmd
Remove lvmlib (api)
Remove lvmetad
- lvconvert: provide possible layouts between linear and striped/raid
Use versionsort to fix archive file expiry beyond 100000 files.
Version 2.02.178-rc1 - 24th May 2018
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index 8d070ed1f..fe4310509 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,5 +1,5 @@
-Version 1.02.177 -
-====================================
+Version 1.02.177 - 07th May 2021
+================================
Configure proceeds without libaio to allow build of device-mapper only.
Fix symbol versioning build with -O2 -flto.
Add dm_tree_node_add_thin_pool_target_v1 with crop_metadata support.
2 years, 11 months
main - make: generate
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=64719861ec094607162...
Commit: 64719861ec094607162cd4faa4a0b2f1d8a3421c
Parent: 00f603de2c507ee12195487fa007510ee3ff9770
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Fri May 7 17:44:43 2021 +0200
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Fri May 7 17:44:43 2021 +0200
make: generate
---
man/lvconvert.8_pregen | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/man/lvconvert.8_pregen b/man/lvconvert.8_pregen
index 84b4ac75e..d733ab64f 100644
--- a/man/lvconvert.8_pregen
+++ b/man/lvconvert.8_pregen
@@ -551,7 +551,7 @@ Attach a writecache to an LV, converts the LV to type writecache.
.RE
.P
.RS 4
-LV1 types: linear striped raid
+LV1 types: linear striped thinpool raid
.RE
.P
\(em
@@ -605,7 +605,7 @@ Add a writecache to an LV, using a specified cache device.
.RE
.P
.RS 4
-LV1 types: linear striped raid
+LV1 types: linear striped thinpool raid
.RE
.P
\(em
2 years, 11 months
v2_02_188 annotated tag has been created
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=03fff05bc037e562398...
Commit: 03fff05bc037e5623989e23567e5f488d5c1ee25
Parent: 0000000000000000000000000000000000000000
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: 2021-05-07 15:36 +0000
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: 2021-05-07 15:36 +0000
annotated tag: v2_02_188 has been created
at 03fff05bc037e5623989e23567e5f488d5c1ee25 (tag)
tagging cde814abc04c6724a1561fc9935ac6b986054404 (commit)
replaces v2_02_187
Release 2.02.188
Bug fix release.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
iQIcBAABAgAGBQJglV6wAAoJELkRJDHlCQOfKiUP/1y031XOMEwTUHEIaX1M6A1K
sRBQDdpkLI1UXXWnibkzUAqPksDe4D4KKDgDGSubkgR1hUNAcIMWqQACQ29SC4/Z
/B6dZ6GcJHqbk8UjrauY+a3mogR94zrmoHJ0rKxKidKLC1rEBJmAHMl4DWlsSHL4
HGmhE+kM0ve0TW9TwZGE1rolLli25lsvz/TaaFgSSptmrE7aIhStl6uiCN2V0oby
B089J8Nj0ErjvoulBcXur8UOc7ABPPhH5Lg+t10rSWOOm1tGp7jd0JkLhW95W8Qa
HZjd2YNlALAQJ4yT+NWn7ccXc1SYEQmY2F1feM7EeTnXjCOwmQqAHSmEBWAzo9sE
oH+F8BpDLtEDEFuEALGDW/lXiM28gLMS+Km4Y+H3slZzs2dLIm7ZwV3EJO3jI/xK
xcoUnaHBxOFO7yI6I4QNc03hbopvtTXOnp5SDo0glwiJSsQaCibKU9Z3no/M918w
WXhNAqueYX6vc9KGpuKDBEmaOQjliL0vjl2bfuGEHRB4I5rOJ54NwdVT767D4+FJ
h9y3FoJd/mhN59sjgbzE9Pr5xxbhsSdfev6hz+WMOb02q+rL4AeDBazYRJtoTUUt
oRyzCxI7P4y8emDgWAZRMU5snrFu/36KicXZsCBFvMyi/vFQFABVZ4/QUKoBTCHK
K+6soom8hvB4bbLpiTEr
=/tm2
-----END PGP SIGNATURE-----
Bastian Germann (1):
lvm: add readline alternative editline
David Teigland (6):
scanning: optimize by checking text offset and checksum
vgrename: fix error value when name exists
devices: detect md ddf and imsm superblocks
devices: simplify md superblock checking code
label: cleanup set_byte error exit
vgextend: check missing device during block size check
Heinz Mauelshagen (7):
lv{resize,extend,reduce}: reject size change on 2-legged raid5*
lv{resize,extend,reduce}: also check for 2-legged raid4
lvconvert: fix conversion to 'mirrored' mirror log with larger regionsize
lvconvert: preset raid1 in case of striped conversions
lvconvert: display warning if raid1 LV image count does not change
Revert "lvconvert: display warning if raid1 LV image count does not change"
lvdisplay: enhance LV status output for raid(0)
Marian Csontos (5):
post-release
build: make generate
README: update
tests: fix unbound variable
pre-release
Peter Rajnoha (2):
blkdeactivate: add support for VDO in blkdeactivate script
blkdeactivate: add missing VDO_AVAILABLE check in deactivate_vdo
Wu Guanghao (2):
lvconvert_poll: ensure LV has snapshot type
pvmove: check return value of top_level_lv_name()
Zdenek Kabelac (180):
libdm: fix dm_list pointer arithmentic for new gcc 10 optimization
dmeventd: enhance time waiting loop
container_of: use offsetof from stddef
lvconvert: no validation for thin-pools not used by lvm2
test: repair of thin-pool used by foreign apps
WHATS_NEWS: update
cov: check strdup for NULL
tests: add wait on udev processing
bcache: support longer writes
raid: no wiping when zeroing raid metadata device
container_of: drop needless const converion
lvmcache: use uint32_t for seqno caching
lv_manip: get_default_region_size return uint32_t
gcc: keep unsigned arithmetic
gcc: avoid stack alloc arithmetic
gcc: use apropriate type for reading and printing values
gcc: do not use return with void function
gcc: drop bogus ;
tools: move struct element before variable lenght list
config: drop reading file with mmap
tests: check we detect lvm.conf read failure
WHATS_NEW: update
dmsetup: initilize winsize struct
gcc: zero-sized array to fexlible array C99
gcc: keep using unsigned type
cov: explicitely ignore function result
cleanup: matching declaration order
cleanup: user force_t enums instead of ints
cleanup: add spaces between literals
cleanup: better expressing passing key arg to _hash
lvconvert: flip return value of _raid_split_image_conversion
lv_manip: add synchronization points
man: correctly use configured directories
lvextend: improve percentage estimation
cleanup: comment typo
thin: compensate metadata size by extra percent
alloc: improve estimation of sufficient_pes_free
tests: add aux delayzero_dev support
tests: use delayzero_dev
tests: disable dbustest with valgrind testing
tests: aux collects stack trace when stuck is assumed
tests: have_cache function checks for cache-pool
tests: check for boundary allocation sizes
lvconvert: check if LV has cow type
cov: drop model for origin_from_cow
cov: drop checking for EWOULDBLOCK
cache: simplier signal handling
tests: check in_sync prints also dm status
tests: improve cache abort test
tests: switch for checking version of installed tools
lvcreate: add extra synchronization at error path
tests: smaller delay and lowered version
tests: aux better handle invalid table
tests: utils better handle ouf of disk space
tests: inittest supports SKIP_WITH_LOW_SPACE
tests: use zero backend
tests: use DIRECT io for zeroing whenver we can
activation: use revert_lv on tree suspend failure
thin: no delete message for device_id 0
thin: enhance lvcreate error paths
thin: improve error message
thin: pass through whole code
makefiles: document supported var in make help
activation: move locking of critical section
cleanup: avoid unneeded check
thin: remove unneeded code test
thin: use lv_status_thin and lv_status_thin_pool
active: fix compilation without devmapper
configure: update help
configure: update with latest AM_PATH_PYTHON
configure: use our ordered list of python names
bcache: fix waiting problem for completed IO
bcache: fix busy loop with too many errors
bcache: support interrupts when waiting on IO
bcache: use flexible arrays
debug: remove stacktrace on regular path
debug: show actually reason for taking this code path
debug: no backtrace
tests: move function to aux for reuse
tests: use aux wrapper and add more notes
tests: a bit bigger mirrors
tests: also add thick snap of thin volume
tests: check some common errors
tests: add small delay
tests: rename shown debug trace
tests: aux hides zero and error device
tests: aux setup
tests: missed char in list
rpm: bare words are no longer supported
dm: remove created devices on error path
WHATS_NEWS: update
wipe: convert zero_value to uint8_t
libdm: split code for sending message
libdm: enhance error message
libdm: validate thin-pool before sending messages
label: use open_rw
label: code deduplication
label: deduplicate dev_set_bytes
gcc: calc size in compile time
wipe_lv: make error a fatal event
pool: zero metadata
wipe_lv: always zero at least 4K
lvconvert: more support for yes conversion
tests: failure of zeroing fails command
tests: check pool metadata are zeroed
configure: editline updates
configure: fix python paths
wipe: dev_set_bytes resolves zeroing
wipe_lv: interruptible wiping
configure: check for BLKZEROOUT support
wipe_lv: use BLKZEROOUT when possible
debug: update messages
tests: extend area covered by error target
lv_manip: add space into message
man: more precise UNIT
man: regenerate
debug: shorten error message
lvmcmdlib: lvm2_init_threaded
memlock: allocate at most halve of rlimit stack
tests: check dmevent with bigger reserved_stack
WHATS_NEW: update
tests: changes from master
filters: persistent filter hides rename failure
fsadm: use NULL
fsadm: handle fsck return 1 for corrected fs
fsadm: enhance error handling
tests: fsadm test continue after fs repair
WHATS_NEW: update
cov: dmeventd plugin fix memleak
make: remove file from master
fsadm: better check for getsize64 support
tests: minor update
fsadm: fix bash artihmetic
gcc: cleanup warns from older gcc
fsadm: fix unbound variable usage
tests: few more fsadm checks
alloc: enhance estimation of sufficient_pes_free
tests: check thin-pool corner case allocs
tests: check full zeroing of thin-pool metadata
man: update lvmthin
libdm: add dm_tree_node_add_thin_pool_target_v1
thin: improve 16g support for thin pool metadata
pool: limit pmspare to 16GiB
cache: reuse code for metadata min_max
pvmove: automatically resolve whole stacked LV
allocation: report allocation error instead of crash
WHATS_NEW: updates
tests: check 16G thin pool metadata size
tests: update thin and cache checked messages
aux: update thin_restore_needs_more_volumes
thinpool: use lv_config_profil for crop_metadata
thin: check for overprovisioning only once
lv_resize: use 'bad' code path for error case
lv_manip: reuse function also during reduction
lv_resize: support resizing of cached volumes
tests: support for resized cached LVs
targets: use target_present_version
lvconvert: thin errorwhenfull and recalculation
tests: lvconvert thin profile conversion
lvdisplay: fix show of merged thin snapshot
tests: lvdisplay does not crash for merged thin
lv_manip: avoid removing LV when converting
lvchange: remove unneeded call
tests: readonly snapshot thick origin can't be merged
libdm: simplify line emitter checking
tests: check for raid target support
tests: avoid killing test machines with kernel bug
lvconvert: read-only origin cannot be merged
lvchange: snapshot thick origin permission rw/r
snapshot: create origin of virtual snap read only
makefiles: ignore missing files
make: generate
WHATS_NEW: updates
fsadm: avoid access to unbound variable
tests: remove local setting of LVM_BINARY
WHATS_NEW: update
tests: update setting LVM_BINARY for testing
lvconvert: improve support for metadata profiles
tests: make test complaint to local dev dir
cmdline: add missing comma in definition
Zhao Heming (3):
gcc: change zero-sized array to fexlible array
dev-cache: dev->bcache_fd default from 0 to -1
gitignore: ignore all cscope generated files
2 years, 11 months
stable-2.02 - post-release
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=1afa67f4b9bdeb1e0da...
Commit: 1afa67f4b9bdeb1e0da1cda17695d0aa58f7c3e3
Parent: cde814abc04c6724a1561fc9935ac6b986054404
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Fri May 7 17:36:25 2021 +0200
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Fri May 7 17:36:25 2021 +0200
post-release
---
VERSION | 2 +-
VERSION_DM | 2 +-
WHATS_NEW | 3 +++
WHATS_NEW_DM | 3 +++
4 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/VERSION b/VERSION
index 542534973..f1cba5329 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.02.188(2) (2021-05-07)
+2.02.189(2)-git (2021-05-07)
diff --git a/VERSION_DM b/VERSION_DM
index 6c50cd9ef..095ff82fb 100644
--- a/VERSION_DM
+++ b/VERSION_DM
@@ -1 +1 @@
-1.02.172 (2021-05-07)
+1.02.174-git (2021-05-07)
diff --git a/WHATS_NEW b/WHATS_NEW
index 458236475..03c58976d 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,3 +1,6 @@
+Version 2.02.189 -
+================================
+
Version 2.02.188 - 07th May 2021
================================
Fix problem with unbound variable usage within fsadm.
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index a74a05461..d515f6318 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,3 +1,6 @@
+Version 1.02.174 -
+================================
+
Version 1.02.172 - 07th May 2021
================================
Add dm_tree_node_add_thin_pool_target_v1 with crop_metadata support.
2 years, 11 months
stable-2.02 - pre-release
by Marian Csontos
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=cde814abc04c6724a15...
Commit: cde814abc04c6724a1561fc9935ac6b986054404
Parent: 844a075c01ad300439a46f2ef4c85482f83bf992
Author: Marian Csontos <mcsontos(a)redhat.com>
AuthorDate: Fri May 7 17:33:50 2021 +0200
Committer: Marian Csontos <mcsontos(a)redhat.com>
CommitterDate: Fri May 7 17:33:50 2021 +0200
pre-release
---
VERSION | 2 +-
VERSION_DM | 2 +-
WHATS_NEW | 4 ++--
WHATS_NEW_DM | 4 ++--
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/VERSION b/VERSION
index 60ed5750e..542534973 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.02.188(2)-git (2020-03-24)
+2.02.188(2) (2021-05-07)
diff --git a/VERSION_DM b/VERSION_DM
index cf4dff740..6c50cd9ef 100644
--- a/VERSION_DM
+++ b/VERSION_DM
@@ -1 +1 @@
-1.02.172-git (2020-03-24)
+1.02.172 (2021-05-07)
diff --git a/WHATS_NEW b/WHATS_NEW
index 14b6ec2b9..458236475 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,5 @@
-Version 2.02.188 -
-==================================
+Version 2.02.188 - 07th May 2021
+================================
Fix problem with unbound variable usage within fsadm.
Avoid removing LVs on error path of lvconvert during creation volumes.
Fix crashing lvdisplay when thin volume was waiting for merge.
diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM
index 188ac8900..a74a05461 100644
--- a/WHATS_NEW_DM
+++ b/WHATS_NEW_DM
@@ -1,5 +1,5 @@
-Version 1.02.172 -
-==================================
+Version 1.02.172 - 07th May 2021
+================================
Add dm_tree_node_add_thin_pool_target_v1 with crop_metadata support.
Add support for VDO in blkdeactivate script.
Try to remove all created devices on dm preload tree error path.
2 years, 11 months
main - tests: add lvextend-caches-on-thindata
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=00f603de2c507ee1219...
Commit: 00f603de2c507ee12195487fa007510ee3ff9770
Parent: 6b00c8c9109b0b6111d4adb9918cccc407ac448f
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Thu May 6 15:59:37 2021 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Thu May 6 16:23:26 2021 -0500
tests: add lvextend-caches-on-thindata
to test lvextend of thin pool data while it has
cache|writecache attached
---
test/shell/lvextend-caches-on-thindata.sh | 170 ++++++++++++++++++++++++++++++
1 file changed, 170 insertions(+)
diff --git a/test/shell/lvextend-caches-on-thindata.sh b/test/shell/lvextend-caches-on-thindata.sh
new file mode 100644
index 000000000..aab571611
--- /dev/null
+++ b/test/shell/lvextend-caches-on-thindata.sh
@@ -0,0 +1,170 @@
+#!/usr/bin/env bash
+
+# Copyright (C) 2017-2020 Red Hat, Inc. All rights reserved.
+#
+# This copyrighted material is made available to anyone wishing to use,
+# modify, copy, or redistribute it subject to the terms and conditions
+# of the GNU General Public License v.2.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+SKIP_WITH_LVMPOLLD=1
+
+# lvextend thin pool data that has cache|writecache attached
+
+. lib/inittest
+
+do_test()
+{
+ local tp=$1
+ local lvt=$2
+
+ # create some initial data
+ lvchange -ay $vg/$lvt
+ mkfs.xfs -f -s size=4096 "$DM_DEV_DIR/$vg/$lvt"
+ mount "$DM_DEV_DIR/$vg/$lvt" "$mount_dir"
+ cp pattern "$mount_dir/pattern1"
+ dd if=/dev/urandom of="$mount_dir/rand100M" bs=1M count=100 conv=fdatasync
+ cp pattern "$mount_dir/pattern2"
+
+ # extend while mounted
+ lvextend -L+64M $vg/${tp}_tdata "$dev4"
+ lvs -a $vg -o+devices
+
+ # verify initial data
+ diff pattern "$mount_dir/pattern1"
+ diff pattern "$mount_dir/pattern2"
+ dd of=/dev/null if="$mount_dir/rand100M" bs=1M count=100
+
+ # add more data
+ cp pattern "$mount_dir/pattern3"
+ dd if=/dev/urandom of="$mount_dir/rand8M" bs=1M count=8 conv=fdatasync
+
+ # restart the LV
+ umount "$mount_dir"
+ lvchange -an $vg/$lvt
+ lvchange -an $vg/$tp
+ lvchange -ay $vg/$lvt
+ mount "$DM_DEV_DIR/$vg/$lvt" "$mount_dir"
+
+ # verify all data
+ diff pattern "$mount_dir/pattern1"
+ diff pattern "$mount_dir/pattern2"
+ diff pattern "$mount_dir/pattern3"
+ dd of=/dev/null if="$mount_dir/rand100M" bs=1M count=100
+ dd of=/dev/null if="$mount_dir/rand8M" bs=1M count=8
+
+ # extend again while inactive
+ umount "$mount_dir"
+ lvchange -an $vg/$lvt
+ lvchange -an $vg/$tp
+ lvextend -L+64M $vg/${tp}_tdata "$dev5"
+ lvs -a $vg -o+devices
+ lvchange -ay $vg/$lvt
+ mount "$DM_DEV_DIR/$vg/$lvt" "$mount_dir"
+
+ # verify all data
+ diff pattern "$mount_dir/pattern1"
+ diff pattern "$mount_dir/pattern2"
+ diff pattern "$mount_dir/pattern3"
+ dd of=/dev/null if="$mount_dir/rand100M" bs=1M count=100
+ dd of=/dev/null if="$mount_dir/rand8M" bs=1M count=8
+
+ # add more data
+ cp pattern "$mount_dir/pattern4"
+
+ # remove the cache
+ lvconvert --splitcache $vg/${tp}_tdata
+
+ # verify all data
+ diff pattern "$mount_dir/pattern1"
+ diff pattern "$mount_dir/pattern2"
+ diff pattern "$mount_dir/pattern3"
+ diff pattern "$mount_dir/pattern4"
+ dd of=/dev/null if="$mount_dir/rand100M" bs=1M count=100
+ dd of=/dev/null if="$mount_dir/rand8M" bs=1M count=8
+
+ umount "$mount_dir"
+ lvchange -an $vg/$lvt
+ lvchange -an $vg/$tp
+ lvchange -ay $vg/$lvt
+ mount "$DM_DEV_DIR/$vg/$lvt" "$mount_dir"
+
+ # verify all data
+ diff pattern "$mount_dir/pattern1"
+ diff pattern "$mount_dir/pattern2"
+ diff pattern "$mount_dir/pattern3"
+ diff pattern "$mount_dir/pattern4"
+ dd of=/dev/null if="$mount_dir/rand100M" bs=1M count=100
+ dd of=/dev/null if="$mount_dir/rand8M" bs=1M count=8
+
+ umount "$mount_dir"
+ lvchange -an $vg/$lvt
+ lvchange -an $vg/$tp
+ lvremove $vg/$lvt
+ lvremove $vg/$tp
+ lvremove -y $vg
+}
+
+
+aux have_cache 1 10 0 || skip
+aux have_writecache 1 0 0 || skip
+which mkfs.xfs || skip
+
+mount_dir="mnt"
+mkdir -p "$mount_dir"
+
+aux prepare_devs 6 70 # want 64M of usable space from each dev
+
+# generate random data
+dd if=/dev/urandom of=pattern bs=512K count=1
+
+vgcreate $SHARED $vg "$dev1" "$dev2" "$dev3" "$dev4" "$dev5" "$dev6"
+
+# test extending cache|writecache on thin pool data
+# test type cache|writecache
+# cache with cachepool|cachevol
+# cache with writeback|writethrough
+
+# lv1 is thinpool LV: 128M
+# lv2 is fast LV: 64M
+# lv3 is thin LV: 1G
+
+# attach writecache to thinpool data
+lvcreate --type thin-pool -n $lv1 -L128M --poolmetadataspare n $vg "$dev1" "$dev2"
+lvcreate --type thin -n $lv3 -V1G --thinpool $lv1 $vg
+lvcreate -n $lv2 -L64M -an $vg "$dev3"
+lvconvert -y --type writecache --cachevol $lv2 $vg/$lv1
+lvs -a $vg -o+devices
+do_test $lv1 $lv3
+
+# attach cache/writeback (cachevol) to thinpool data
+lvcreate --type thin-pool -n $lv1 -L128M --poolmetadataspare n $vg "$dev1" "$dev2"
+lvcreate --type thin -n $lv3 -V1G --thinpool $lv1 $vg
+lvcreate -n $lv2 -L64M -an $vg "$dev3"
+lvconvert -y --type cache --cachevol $lv2 --cachemode writeback $vg/$lv1
+lvs -a $vg -o+devices
+do_test $lv1 $lv3
+
+# attach cache/writethrough (cachevol) to thinpool data
+lvcreate --type thin-pool -n $lv1 -L128M --poolmetadataspare n $vg "$dev1" "$dev2"
+lvcreate --type thin -n $lv3 -V1G --thinpool $lv1 $vg
+lvcreate -n $lv2 -L64M -an $vg "$dev3"
+lvconvert -y --type cache --cachevol $lv2 --cachemode writethrough $vg/$lv1
+lvs -a $vg -o+devices
+do_test $lv1 $lv3
+
+# attach cache (cachepool) to thinpool data
+lvcreate --type thin-pool -n $lv1 -L128M --poolmetadataspare n $vg "$dev1" "$dev2"
+lvcreate --type thin -n $lv3 -V1G --thinpool $lv1 $vg
+lvcreate -y --type cache-pool -n $lv2 -L64M --poolmetadataspare n $vg "$dev3" "$dev6"
+lvconvert -y --type cache --cachepool $lv2 --poolmetadataspare n $vg/$lv1
+lvs -a $vg -o+devices
+do_test $lv1 $lv3
+
+# FIXME: test these thin pool data extensions done by dmeventd
+
+vgremove -f $vg
+
2 years, 11 months
main - writecache: allow attaching to thin pool data
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=6b00c8c9109b0b6111d...
Commit: 6b00c8c9109b0b6111d4adb9918cccc407ac448f
Parent: 92fcfc59b2b0a81121771cab3b21ec5dde797510
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Thu May 6 16:18:50 2021 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Thu May 6 16:23:03 2021 -0500
writecache: allow attaching to thin pool data
---
tools/command-lines.in | 4 ++--
tools/lvconvert.c | 14 ++++++++++++--
2 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/tools/command-lines.in b/tools/command-lines.in
index 164516a2e..1107c1e02 100644
--- a/tools/command-lines.in
+++ b/tools/command-lines.in
@@ -493,7 +493,7 @@ AUTOTYPE: cache
---
-lvconvert --type writecache --cachevol LV LV_linear_striped_raid
+lvconvert --type writecache --cachevol LV LV_linear_striped_raid_thinpool
OO: OO_LVCONVERT, --cachesettings String
ID: lvconvert_to_writecache
DESC: Attach a writecache to an LV, converts the LV to type writecache.
@@ -520,7 +520,7 @@ FLAGS: SECONDARY_SYNTAX
---
-lvconvert --type writecache --cachedevice PV LV_linear_striped_raid
+lvconvert --type writecache --cachedevice PV LV_linear_striped_raid_thinpool
OO: OO_LVCONVERT, --cachesize SizeMB, --cachesettings String
ID: lvconvert_to_writecache_with_device
DESC: Add a writecache to an LV, using a specified cache device.
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
index 990a723b6..8dd8a15c4 100644
--- a/tools/lvconvert.c
+++ b/tools/lvconvert.c
@@ -6106,6 +6106,7 @@ int lvconvert_writecache_attach_single(struct cmd_context *cmd,
struct processing_handle *handle)
{
struct volume_group *vg = lv->vg;
+ struct logical_volume *lv_update;
struct logical_volume *lv_wcorig;
struct logical_volume *lv_fast;
struct writecache_settings settings = { 0 };
@@ -6228,6 +6229,15 @@ int lvconvert_writecache_attach_single(struct cmd_context *cmd,
lv_fast->status |= LV_CACHE_VOL;
+ /* When the lv arg is a thinpool, redirect update to data sub lv. */
+
+ if (lv_is_thin_pool(lv)) {
+ lv_update = seg_lv(first_seg(lv), 0);
+ log_verbose("Redirecting operation to data sub LV %s.", display_lvname(lv_update));
+ } else {
+ lv_update = lv;
+ }
+
/*
* Changes the vg struct to match the desired state.
*
@@ -6240,7 +6250,7 @@ int lvconvert_writecache_attach_single(struct cmd_context *cmd,
* gets new id, becomes hidden, gets segments from lv.
*/
- if (!(lv_wcorig = _lv_writecache_create(cmd, lv, lv_fast, block_size_sectors, &settings)))
+ if (!(lv_wcorig = _lv_writecache_create(cmd, lv_update, lv_fast, block_size_sectors, &settings)))
goto_bad;
/*
@@ -6248,7 +6258,7 @@ int lvconvert_writecache_attach_single(struct cmd_context *cmd,
* where the old LV is suspended and the new LV is resumed.
*/
- if (!lv_update_and_reload(lv))
+ if (!lv_update_and_reload(lv_update))
goto_bad;
lockd_lv(cmd, lv, "un", 0);
2 years, 11 months
main - tests: new lvextend-caches
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=92fcfc59b2b0a811217...
Commit: 92fcfc59b2b0a81121771cab3b21ec5dde797510
Parent: 318bb3a06b420e2ff9344138f20b879e82878866
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Thu May 6 14:43:10 2021 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Thu May 6 14:43:10 2021 -0500
tests: new lvextend-caches
to test lvextend of LVs with attached cache|writecache
---
test/shell/lvextend-caches.sh | 150 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 150 insertions(+)
diff --git a/test/shell/lvextend-caches.sh b/test/shell/lvextend-caches.sh
new file mode 100644
index 000000000..de9af6d2c
--- /dev/null
+++ b/test/shell/lvextend-caches.sh
@@ -0,0 +1,150 @@
+#!/usr/bin/env bash
+
+# Copyright (C) 2017-2020 Red Hat, Inc. All rights reserved.
+#
+# This copyrighted material is made available to anyone wishing to use,
+# modify, copy, or redistribute it subject to the terms and conditions
+# of the GNU General Public License v.2.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+SKIP_WITH_LVMPOLLD=1
+
+# lvextend LV with cache|writecache
+
+. lib/inittest
+
+do_test()
+{
+ # create some initial data
+ lvchange -ay $vg/$lv1
+ mkfs.xfs -f -s size=4096 "$DM_DEV_DIR/$vg/$lv1"
+ mount "$DM_DEV_DIR/$vg/$lv1" "$mount_dir"
+ cp pattern "$mount_dir/pattern1"
+ dd if=/dev/urandom of="$mount_dir/rand100M" bs=1M count=100 conv=fdatasync
+ cp pattern "$mount_dir/pattern2"
+
+ # extend while mounted
+ lvextend -L+64M $vg/$lv1 "$dev4"
+ lvs -a $vg -o+devices
+
+ # verify initial data
+ diff pattern "$mount_dir/pattern1"
+ diff pattern "$mount_dir/pattern2"
+ dd of=/dev/null if="$mount_dir/rand100M" bs=1M count=100
+
+ # add more data
+ cp pattern "$mount_dir/pattern3"
+ dd if=/dev/urandom of="$mount_dir/rand8M" bs=1M count=8 conv=fdatasync
+
+ # restart the LV
+ umount "$mount_dir"
+ lvchange -an $vg/$lv1
+ lvchange -ay $vg/$lv1
+ mount "$DM_DEV_DIR/$vg/$lv1" "$mount_dir"
+
+ # verify all data
+ diff pattern "$mount_dir/pattern1"
+ diff pattern "$mount_dir/pattern2"
+ diff pattern "$mount_dir/pattern3"
+ dd of=/dev/null if="$mount_dir/rand100M" bs=1M count=100
+ dd of=/dev/null if="$mount_dir/rand8M" bs=1M count=8
+
+ # extend again while inactive
+ umount "$mount_dir"
+ lvchange -an $vg/$lv1
+ lvextend -L+64M $vg/$lv1 "$dev5"
+ lvs -a $vg -o+devices
+ lvchange -ay $vg/$lv1
+ mount "$DM_DEV_DIR/$vg/$lv1" "$mount_dir"
+
+ # verify all data
+ diff pattern "$mount_dir/pattern1"
+ diff pattern "$mount_dir/pattern2"
+ diff pattern "$mount_dir/pattern3"
+ dd of=/dev/null if="$mount_dir/rand100M" bs=1M count=100
+ dd of=/dev/null if="$mount_dir/rand8M" bs=1M count=8
+
+ # add more data
+ cp pattern "$mount_dir/pattern4"
+
+ # remove the cache
+ lvconvert --splitcache $vg/$lv1
+
+ # verify all data
+ diff pattern "$mount_dir/pattern1"
+ diff pattern "$mount_dir/pattern2"
+ diff pattern "$mount_dir/pattern3"
+ diff pattern "$mount_dir/pattern4"
+ dd of=/dev/null if="$mount_dir/rand100M" bs=1M count=100
+ dd of=/dev/null if="$mount_dir/rand8M" bs=1M count=8
+
+ umount "$mount_dir"
+ lvchange -an $vg/$lv1
+ lvchange -ay $vg/$lv1
+ mount "$DM_DEV_DIR/$vg/$lv1" "$mount_dir"
+
+ # verify all data
+ diff pattern "$mount_dir/pattern1"
+ diff pattern "$mount_dir/pattern2"
+ diff pattern "$mount_dir/pattern3"
+ diff pattern "$mount_dir/pattern4"
+ dd of=/dev/null if="$mount_dir/rand100M" bs=1M count=100
+ dd of=/dev/null if="$mount_dir/rand8M" bs=1M count=8
+
+ umount "$mount_dir"
+ lvchange -an $vg/$lv1
+ lvremove $vg/$lv1
+ lvremove -y $vg
+}
+
+
+aux have_cache 1 10 0 || skip
+aux have_writecache 1 0 0 || skip
+which mkfs.xfs || skip
+
+mount_dir="mnt"
+mkdir -p "$mount_dir"
+
+aux prepare_devs 6 66 # want 64M of usable space from each dev
+
+# generate random data
+dd if=/dev/urandom of=pattern bs=512K count=1
+
+vgcreate $SHARED $vg "$dev1" "$dev2" "$dev3" "$dev4" "$dev5" "$dev6"
+
+# test type cache|writecache
+# cache with cachepool|cachevol
+# cache with writeback|writethrough
+
+# lv1 is main LV: 128M
+# lv2 is fast LV: 64M
+
+lvcreate -n $lv1 -L128M -an $vg "$dev1" "$dev2"
+lvcreate -n $lv2 -L64M -an $vg "$dev3"
+lvconvert -y --type writecache --cachevol $lv2 $vg/$lv1
+lvs -a $vg -o+devices
+do_test
+
+lvcreate -n $lv1 -L128M -an $vg "$dev1" "$dev2"
+lvcreate -n $lv2 -L64M -an $vg "$dev3"
+lvconvert -y --type cache --cachevol $lv2 --cachemode writeback $vg/$lv1
+lvs -a $vg -o+devices
+do_test
+
+lvcreate -n $lv1 -L128M -an $vg "$dev1" "$dev2"
+lvcreate -n $lv2 -L64M -an $vg "$dev3"
+lvconvert -y --type cache --cachevol $lv2 --cachemode writethrough $vg/$lv1
+lvs -a $vg -o+devices
+do_test
+
+lvcreate -n $lv1 -L128M -an $vg "$dev1" "$dev2"
+lvcreate -y --type cache-pool -n $lv2 -L64M --poolmetadataspare n $vg "$dev3" "$dev6"
+lvconvert -y --type cache --cachepool $lv2 --poolmetadataspare n $vg/$lv1
+lvs -a $vg -o+devices
+do_test
+
+vgremove -f $vg
+
2 years, 11 months
main - blkid: simplify fs block size check
by David Teigland
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=318bb3a06b420e2ff93...
Commit: 318bb3a06b420e2ff9344138f20b879e82878866
Parent: 71933d3496dfb21e1e39744d69f0372e202c1a1c
Author: David Teigland <teigland(a)redhat.com>
AuthorDate: Wed May 5 16:15:10 2021 -0500
Committer: David Teigland <teigland(a)redhat.com>
CommitterDate: Wed May 5 16:15:10 2021 -0500
blkid: simplify fs block size check
Only the LV path name is needed for blkid query,
the step of getting a dev struct is not needed.
---
lib/device/dev-type.c | 10 +++++-----
lib/device/dev-type.h | 2 +-
lib/metadata/integrity_manip.c | 7 +------
tools/lvconvert.c | 18 +++++-------------
4 files changed, 12 insertions(+), 25 deletions(-)
diff --git a/lib/device/dev-type.c b/lib/device/dev-type.c
index 1b335722d..706061814 100644
--- a/lib/device/dev-type.c
+++ b/lib/device/dev-type.c
@@ -701,23 +701,23 @@ out:
}
#ifdef BLKID_WIPING_SUPPORT
-int get_fs_block_size(struct device *dev, uint32_t *fs_block_size)
+int get_fs_block_size(const char *pathname, uint32_t *fs_block_size)
{
char *block_size_str = NULL;
- if ((block_size_str = blkid_get_tag_value(NULL, "BLOCK_SIZE", dev_name(dev)))) {
+ if ((block_size_str = blkid_get_tag_value(NULL, "BLOCK_SIZE", pathname))) {
*fs_block_size = (uint32_t)atoi(block_size_str);
free(block_size_str);
- log_debug("Found blkid BLOCK_SIZE %u for fs on %s", *fs_block_size, dev_name(dev));
+ log_debug("Found blkid BLOCK_SIZE %u for fs on %s", *fs_block_size, pathname);
return 1;
} else {
- log_debug("No blkid BLOCK_SIZE for fs on %s", dev_name(dev));
+ log_debug("No blkid BLOCK_SIZE for fs on %s", pathname);
*fs_block_size = 0;
return 0;
}
}
#else
-int get_fs_block_size(struct device *dev, uint32_t *fs_block_size)
+int get_fs_block_size(const char *pathname, uint32_t *fs_block_size)
{
log_debug("Disabled blkid BLOCK_SIZE for fs.");
*fs_block_size = 0;
diff --git a/lib/device/dev-type.h b/lib/device/dev-type.h
index 45377c144..d358520df 100644
--- a/lib/device/dev-type.h
+++ b/lib/device/dev-type.h
@@ -100,6 +100,6 @@ int dev_is_nvme(struct dev_types *dt, struct device *dev);
int dev_is_lv(struct device *dev);
-int get_fs_block_size(struct device *dev, uint32_t *fs_block_size);
+int get_fs_block_size(const char *pathname, uint32_t *fs_block_size);
#endif
diff --git a/lib/metadata/integrity_manip.c b/lib/metadata/integrity_manip.c
index 4fbccfb3c..c2fd7504c 100644
--- a/lib/metadata/integrity_manip.c
+++ b/lib/metadata/integrity_manip.c
@@ -326,7 +326,6 @@ static int _set_integrity_block_size(struct cmd_context *cmd, struct logical_vol
int lbs_4k, int lbs_512, int pbs_4k, int pbs_512)
{
char pathname[PATH_MAX];
- struct device *fs_dev;
uint32_t fs_block_size = 0;
int rv;
@@ -371,10 +370,6 @@ static int _set_integrity_block_size(struct cmd_context *cmd, struct logical_vol
log_error("Path name too long to get LV block size %s", display_lvname(lv));
goto bad;
}
- if (!(fs_dev = dev_cache_get(cmd, pathname, NULL))) {
- log_error("Device for LV not found to check block size %s", display_lvname(lv));
- goto bad;
- }
/*
* get_fs_block_size() returns the libblkid BLOCK_SIZE value,
@@ -387,7 +382,7 @@ static int _set_integrity_block_size(struct cmd_context *cmd, struct logical_vol
* value the block size, but it's possible values are not the same
* as xfs's, and do not seem to relate directly to the device LBS.
*/
- rv = get_fs_block_size(fs_dev, &fs_block_size);
+ rv = get_fs_block_size(pathname, &fs_block_size);
if (!rv || !fs_block_size) {
int use_bs;
diff --git a/tools/lvconvert.c b/tools/lvconvert.c
index ab6892105..990a723b6 100644
--- a/tools/lvconvert.c
+++ b/tools/lvconvert.c
@@ -5948,7 +5948,6 @@ static int _set_writecache_block_size(struct cmd_context *cmd,
uint32_t *block_size_sectors)
{
char pathname[PATH_MAX];
- struct device *fs_dev;
struct dm_list pvs_list;
struct pv_list *pvl;
uint32_t fs_block_size = 0;
@@ -6011,17 +6010,10 @@ static int _set_writecache_block_size(struct cmd_context *cmd,
goto bad;
}
- if (!sync_local_dev_names(cmd))
- stack;
-
- if (!(fs_dev = dev_cache_get(cmd, pathname, NULL))) {
- if (test_mode()) {
- log_print("Test mode skips checking fs block size.");
- fs_block_size = 0;
- goto skip_fs;
- }
- log_error("Device for LV not found to check block size %s", pathname);
- goto bad;
+ if (test_mode()) {
+ log_print("Test mode skips checking fs block size.");
+ fs_block_size = 0;
+ goto skip_fs;
}
/*
@@ -6037,7 +6029,7 @@ static int _set_writecache_block_size(struct cmd_context *cmd,
*
* With 512 LBS and 4K PBS, mkfs.xfs will use xfs sector size 4K.
*/
- rv = get_fs_block_size(fs_dev, &fs_block_size);
+ rv = get_fs_block_size(pathname, &fs_block_size);
skip_fs:
if (!rv || !fs_block_size) {
if (lbs_4k && pbs_4k && !pbs_512) {
2 years, 11 months