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

18681 Commits

Author SHA1 Message Date
Zdenek Kabelac
482501c21f tests: more checks with active thin lv
Check --usepolicy works primarily when thin-pool -tpool is there.
Also let the test run with lvmlockd.
2023-07-14 16:52:51 +02:00
Zdenek Kabelac
a997714648 tests: skip with lvmpolld
Not needed with lvmpolld pass.
2023-07-14 16:52:51 +02:00
Zdenek Kabelac
b89fc0564b cleanup: indent 2023-07-14 16:52:51 +02:00
Zdenek Kabelac
a2b2ae35b2 lvresize: improve usepolices
lvresize --usepolicy requires resized LVs to be active.
(So it's not only required for shared VG).

The test for active pool needs to use lv_info to query 'layer'
otherwise the pool is considered inactive if it was not activated
explicitely - thun 'implicit' activation with VDO or ThinLV was
not managed by --usepolicy option.
2023-07-14 16:52:51 +02:00
Zdenek Kabelac
8cbba1d164 lvmlockd: enable vdo conversion
As we turn 'already' active/locked LV into a data LV of vdopool,
we just keep active lock for such volume (uuid is preserved).
2023-07-14 16:52:51 +02:00
Zdenek Kabelac
75b28ab49d lvmlockd: query the simplest check first
Check for visibility of the LV first.

TODO:

Short check list and test only for those that can't be locked,
but they are visible LVs.
2023-07-14 16:52:51 +02:00
Zdenek Kabelac
8eb3a5b557 lvconvert: thin convert locking
Fix locking when converting thick to thin LV, ensure
we take pool lock for shared VG.
2023-07-14 16:51:46 +02:00
Zdenek Kabelac
bdcfd2d730 lvconvert: no metadata for test mode
Avoid trying to build real metadata in --test mode.
2023-07-14 16:20:30 +02:00
Zdenek Kabelac
93484c2a62 man-generator: ensure p is defined
In error path, p pointer could have been undefined.
2023-07-13 21:56:47 +02:00
Zdenek Kabelac
97fc0ca49b debug: missed properly modify pointer type 2023-07-13 21:52:20 +02:00
Zdenek Kabelac
f24eb81dbe tests: improve LD_LIBRARY_PATH setting
Some linkers do need libdevmapper-event-lvm2.so.2.03,
so add also this symlink to the tests  /lib dir.
This fixes the need to use previous LD_LIBRARY_PATH complex
setting and now works with much shorter list.
2023-07-13 21:31:18 +02:00
Zdenek Kabelac
4ae2dde5c3 tests: update
Just drop debug log in case of error happenig later,
so we do not print uneeded info...
2023-07-13 21:31:18 +02:00
Zdenek Kabelac
2ecd290c0d tests: use conf=fdatasync
Since we write here in 1k blocksize - we can't use direct.
2023-07-13 21:31:18 +02:00
Zdenek Kabelac
ae512e20f5 tests: skip test if daemon is running
Skip the test, to avoid making all test failed when there is
'left' daemon running.
2023-07-13 21:31:18 +02:00
Zdenek Kabelac
7171260b94 makefiles: install lvmdbusd executable
Use a different mechanism to ensure, lvmdbudd is executable at
install destination.
2023-07-13 21:31:18 +02:00
Zdenek Kabelac
f8712c6cab makefiles: remove autom4te.cache
For 'make distclean' remove also autom4te.cache
(from autoreconf).
2023-07-13 21:31:18 +02:00
Zdenek Kabelac
5ce236a691 gcc: correct signess comparation
Compare int to int and unsigned to unsigned...
2023-07-13 21:31:18 +02:00
Zdenek Kabelac
64b28e0839 lvchange: add log_error for failure path
When change of monitoring fails, ensure there is log_error() printed.
2023-07-13 21:31:18 +02:00
Zdenek Kabelac
cb2d32bdc4 debug: fix sscanf type
Last commit c38b668fc3 was pushed
with type 'scanf' instead of 'sscanf' needed for buffer reading.
Interestingly this caused scanning from 'stdin' descriptor and
thus failures in lvm shell usage.
2023-07-13 21:31:18 +02:00
Marian Csontos
6e3b51681f Update README 2023-07-12 15:53:45 +02:00
Zdenek Kabelac
6f1318c474 WHATS_NEW: update 2023-07-12 15:18:38 +02:00
Zdenek Kabelac
33f022617a tests: some fixes for lvmlockd testing 2023-07-12 15:18:38 +02:00
Zdenek Kabelac
85fb46d8a6 tests: reduce paths added to LD_LIBRARY_PATH
Add only stricly needed paths to compiled .so objects.
2023-07-12 15:18:38 +02:00
Zdenek Kabelac
80bad4a3b4 tests: check for writecache presence
Test is using writecache.
2023-07-12 15:18:38 +02:00
Zdenek Kabelac
a51c68aacb tests: makefile build proper tools list
Add compiled components to the list.
2023-07-12 15:18:38 +02:00
Zdenek Kabelac
4d70e7bf78 debug: use display_lvname 2023-07-12 15:18:38 +02:00
Zdenek Kabelac
c38b668fc3 debug: fix parsing of /proc/self/stat
The code in init_log_file relies on the process name (COMM) to not
contain whitespaces. This change fixes it by looking up the right-most
parenthesis to safely jump past COMM.

For more context see:
https://www.openwall.com/lists/oss-security/2022/12/21/6

Code is only used with testing, so it should have no impact on regular
users.

Reported-by: Hugues Evrard <hevrard@google.com>

mm
2023-07-12 15:18:38 +02:00
Zdenek Kabelac
7ec97ed5f2 cov: fix memleak in vgchange
Release allocated  vgname from get_single_vgname_cmd_arg()
when it is not returned via *vgname_ret.
2023-07-12 15:18:38 +02:00
Zdenek Kabelac
491ee5d106 cov: hide some messages
Living with these...
2023-07-12 15:18:38 +02:00
Zdenek Kabelac
4c78bdcfaa autoconf: update py-compile
Use newer version of this script from:
https://raw.githubusercontent.com/autotools-mirror/automake/4bd4640e03670e267d9763d377f107c09b4f2202/lib/py-compile

Reported-by: Adam Willamson
2023-07-12 15:18:38 +02:00
Zdenek Kabelac
857f5d6e65 lvconvert: correction for thin conversion
Updates for 39457234db.
Off-by-one for option array - need 20 fields.
Missed to clear lock_args for cachepool.
2023-07-12 15:18:38 +02:00
Marian Csontos
b3b6c6b576 README: Move to gitlab 2023-07-10 18:03:51 +02:00
Zdenek Kabelac
52f939caa7 WHATS_NEW: updates 2023-07-10 17:13:33 +02:00
Zdenek Kabelac
00b5d7b037 lv: followup seg_monitor reporting
With 3596558861 it's been introduced
a more fine grained description.
However 'disabled' might be actually more confusing then empty field,
so keep only the info about 'not enabled'aka dmevend is not allowed
to monitor LV which otherwise could be monitored.
2023-07-10 17:13:33 +02:00
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