1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
Commit Graph

18597 Commits

Author SHA1 Message Date
Zdenek Kabelac
9abcf5cb48 tests: use aux functionality
Use aux wait_recalc and wait_for_sync  for faster processing.
2023-07-10 17:13:33 +02:00
Zdenek Kabelac
935813457f tests: update thin 2023-07-10 17:13:33 +02:00
Zdenek Kabelac
9ba9e99716 man: update for new syntax 2023-07-10 17:13:33 +02:00
Zdenek Kabelac
70c911b63f pool: improve message for data persistance
Inform a user that pools using either error or zero LVs are
not able to keep any data persistant.
2023-07-10 17:13:32 +02:00
Zdenek Kabelac
39457234db lvconvert: support conversion to thin volume
Update pool conversion function to handle also conversion of
thick LV to thin LV by moving thick LV into thin pool data LV
and creating fully provissioned thin LV on top of this volume.

Reworking existing conversion to use insert_layer_for_lv co
the uuid is now kept with thin-pool - this should however not
really matter as we are doing full deactivation & activation cycle.

With conversion to thin LV user can use same set of arguments
to set chunk-size.

TODO: add some smart code to decide best values for chunks sizes.
2023-07-10 17:13:32 +02:00
Zdenek Kabelac
f35fa8c178 cleanup: typos 2023-07-10 17:13:32 +02:00
Zdenek Kabelac
96123b9059 cleanup: use spelling synchronize
Use single spelling form for synchronize.
2023-07-10 17:13:32 +02:00
Zdenek Kabelac
98a34e43ab tests: caching of single thin volume 2023-07-10 17:13:32 +02:00
Zdenek Kabelac
721bee1b70 tests: cache with error and zero 2023-07-10 17:13:32 +02:00
Zdenek Kabelac
975368ba18 tests: skip on kernels 2023-07-10 17:13:32 +02:00
Zdenek Kabelac
077b46e014 lv_manip: fix move_lv_segments moved bits
For proper functionality of insert_layer_for_lv we need to
move more bits to layerd LV.

Add some missing new types and correct usage of caller,
so the new LV type is set after the movement.
2023-07-10 17:13:32 +02:00
Zdenek Kabelac
e022805f1d pool: do not pass empty string in callback
When preparing cmdline to executing dmpd tool, avoid adding
empty string ("") on such line.
2023-07-10 17:13:32 +02:00
Zdenek Kabelac
e36028b7d2 cache: update validation rules
Validate cache origin in front of the prompt.
Also add some rules to command description file.

TODO:
more validation needed also for lvcreate,
more complex rules with "OR" seems to be needed.
2023-07-10 17:13:32 +02:00
Zdenek Kabelac
88f1e7a9a7 cache: support more segtypes for caching
Enable support to cache thin/error/zero virtual targets.

Use can now select whether he want to cache whole thin-pool,
or an individual thin volume out of whole thin-pool.
Support using zero and error LVs as data volume for
cachepool is possibly useful for benchmarking, not much
can be expected from such setup.
2023-07-10 17:13:32 +02:00
Zdenek Kabelac
0dee6fc28c cache: handle error segtype
Allow to convert error LV.
2023-07-10 17:13:32 +02:00
Zdenek Kabelac
9bbbc1b265 cachepool: skip wipe for nonzeroeable segments
Avoid activation when going to skip zeroing of 'error' segtype
(so it's not erroring out).
Also skip zeroing for 'zero' segtype LV (already being zero).
2023-07-10 17:13:32 +02:00
Zdenek Kabelac
558890ad0e pool: support passing data_lv for recalculation
Support data_lv to be passed as parameter when it's not yet
attached to the pool.
2023-07-10 17:13:32 +02:00
Zdenek Kabelac
5175e87fda commands: error and zero segtype handling
Add function to work with error and zero LVs more easily.
2023-07-10 17:13:32 +02:00
Zdenek Kabelac
226429058c commands: enhance error checking for generator
No exit value 0, when the parser hits an error.
Increase some buffers since as some arg lists are getting longer.
2023-07-10 17:13:32 +02:00
Zdenek Kabelac
44b070415b commands: support query for lv_is_cow 2023-07-10 17:13:32 +02:00
Zdenek Kabelac
d43a79eec9 segtype: add missing macros for error and zero segment
Add macros for checking error and zero segment as we do
with other segtypes.
2023-07-10 17:13:32 +02:00
Zdenek Kabelac
5154054af4 snapshot: no error when extending above max size
When lvm2 calculates the maximal usable COW size and crops the user
requested size to this value, don't return the error result from
the 'lvextend' operation.

We already apply the same logic when resizing thin-pool beyond
the supported maximal size.

FIXME: The return code error logic here is somewhat fuzzy.
2023-07-10 17:13:32 +02:00
Zdenek Kabelac
b90c5d6015 vdo: support version 4
Properly parse VDO volumes formatted with geometry block version 4.0.
2023-07-10 17:13:32 +02:00
Zdenek Kabelac
e84b00964f pool: avoid using artificial name internally 2023-06-29 13:55:27 +02:00
Zdenek Kabelac
3596558861 lv: more details about monitoring lvs
Show "not supported" when LV does not support dmeventd monitoring.
Show "disabled" for LV with disabled dmeventd monitoring.
(lvdisplay -m)
2023-06-29 13:10:42 +02:00
Zdenek Kabelac
8a07f57ba4 lvm_import_vdo: spelling fixes 2023-06-29 13:10:42 +02:00
Zdenek Kabelac
8b75bbe47d vdo: lvm_import_vdo correct parsing output
Output from vdo manager may actually indent output with spaces,
so trim leading and ending space.

Also add support for verbosity flag for vdo conversion tool.
2023-06-29 13:10:42 +02:00
Zdenek Kabelac
e48c9826e3 vdo: indent for lvdisplay 2023-06-29 13:10:42 +02:00
Zdenek Kabelac
6ff65e6755 vdo: check_point_frequence is unused option
This vdo parameter existed in the early stage of integration of vdo into lvm2,
but later it's been removed from vdoformat tool - so actually if
there would be any non-zero value it would cause error on lvcreate.
Option was not stored on disk in lvm2 metadata.

Remove this vdo parameter from lvm2 sources.

(Although this vdo parameter will be still accepted on cmdline through
 --vdosettings option, but it will be ignored.)
2023-06-29 13:10:42 +02:00
Zdenek Kabelac
fa434a1837 tests: simplify 2023-06-25 13:02:36 +02:00
Zdenek Kabelac
b8db2c0a4a tests: require raid target 2023-06-25 13:02:36 +02:00
Zdenek Kabelac
04860b6324 tests: correct checked devices
Fix the testing logic.
With raid5 device the layout of files on a filesystem does not define
which leg will actually contain the block we try to damage.
So test will now figure out which device has damaged block.

Use 'check' functionality and also drop unneeded random write as we
now can identify easily in other way.
2023-06-25 13:02:36 +02:00
Zdenek Kabelac
5848f75278 tests: correct generated metadata
Newer thin_check actually rejects such restored data.
2023-06-25 12:00:57 +02:00
Zdenek Kabelac
0a5712ada4 WHATS_NEW: update 2023-06-23 18:08:10 +02:00
Zdenek Kabelac
9756824f64 make: generate 2023-06-23 18:08:10 +02:00
Zdenek Kabelac
46fe47b8e0 debug: add backtraces 2023-06-23 18:08:03 +02:00
Zdenek Kabelac
a1d5fba666 aux: add configuration for thin_restore and check_restore 2023-06-23 18:06:22 +02:00
Zdenek Kabelac
aed91e49ae tests: improve test for machine_id 2023-06-23 18:06:22 +02:00
Zdenek Kabelac
39d6a9601f tests: ensure test defines its own etc dir
Compilation may configure it's own /etc path so ensure the test
has a defined location for access to this dir during testing.

Also prepare machine_id filei (with the use of uuidgen tool)
for the test.
2023-06-23 18:06:22 +02:00
Zdenek Kabelac
2cb43449ee tests: fix path to dev dir
Correct some explicit references to /dev and use $DM_DEV_DIR.
2023-06-23 18:06:22 +02:00
Zdenek Kabelac
fec3087eef thin: add cfg support for thin_restore and cache_restore
Add configurable paths for thin_restore and cache_restore.
2023-06-23 18:06:22 +02:00
Zdenek Kabelac
8d09124c62 tests: update test for automatic virtual size correction
lvm_import_vdo will adjust the virtual size within conversion
so the volume can be use without any futher tweaking.
2023-06-23 18:06:22 +02:00
Zdenek Kabelac
657dde6208 lvm_import_vdo: correct the converted virtual size
Ensure the volume after conversion has the properly aligned size to the
volume group extent size. This would be visible when using virtual size,
that cannot be divided by extent size.

Before the user had to manually adjust the size after conversion to get
access to all data stored on VDO volume.
2023-06-23 18:05:03 +02:00
David Teigland
ea6b5b694b lvcreate: allow thin snapshot syntax that broke
The command "lvcreate --type thin --snapshot ..." to create a thin
snapshot would fail.

commit d651b340e6 removed the optional
"--type thin" from the command definition "lvcreate --snapshot LV_thin",
and added --type thin as AUTOTYPE.  This was correct and should not have
changed anything if all the command defs were correct, but it broke
the "lvcreate --type thin --snapshot" case.  It reveals a problem in a
different command definintion:  "lvcreate --type thin LV_thin" that was
missing --snapshot in its OO list.
2023-06-20 15:47:01 -05:00
David Teigland
1dbb86f8c7 tests: lvresize fs mounted multiple times 2023-06-20 13:13:06 -05:00
David Teigland
7c3eca833f lvresize: fix multiple mounts
which was mistaken as a mounted LV that had been renamed.
2023-06-16 12:11:51 -05:00
David Teigland
228a8e8c1f device_id: ignore leading and trailing spaces for sys_wwid and sys_serial
Leading and trailing underscores are also ignored to handle device ids
written by previous versions which replaced all spaces with underscores.
2023-06-15 15:17:14 -05:00
Marian Csontos
f0b48a23d9 tests: Skip integrity tests if target not present 2023-06-14 13:48:51 +02:00
Marian Csontos
4cf005d395 tests: tmp is used for TMPDIR
Fixes tests failing due to previous commit 734d9791f8.
2023-06-14 13:23:41 +02:00
Zdenek Kabelac
7ac5dbfd09 WHATS_NEW: update 2023-06-09 18:01:35 +02:00