]> sourceware.org Git - lvm2.git/log
lvm2.git
15 months agolvconvert: hanle metadataswap with lvmlockd
Zdenek Kabelac [Fri, 14 Jul 2023 23:26:37 +0000 (01:26 +0200)]
lvconvert: hanle metadataswap with lvmlockd

15 months agomm: add libzstd to ignore list
Zdenek Kabelac [Fri, 14 Jul 2023 21:19:33 +0000 (23:19 +0200)]
mm: add libzstd to ignore list

No need to lock-in-RAM libzstd (linked from systemd).

15 months agotests: check --test
Zdenek Kabelac [Fri, 14 Jul 2023 14:24:49 +0000 (16:24 +0200)]
tests: check --test

Check lvconvert --thin is not adding more LVs.
Enable testing with lvmlockd.

TODO: lvmlockd is missing support for --test.

15 months agotests: more checks with active thin lv
Zdenek Kabelac [Fri, 14 Jul 2023 14:16:46 +0000 (16:16 +0200)]
tests: more checks with active thin lv

Check --usepolicy works primarily when thin-pool -tpool is there.
Also let the test run with lvmlockd.

15 months agotests: skip with lvmpolld
Zdenek Kabelac [Fri, 14 Jul 2023 09:18:58 +0000 (11:18 +0200)]
tests: skip with lvmpolld

Not needed with lvmpolld pass.

15 months agocleanup: indent
Zdenek Kabelac [Fri, 14 Jul 2023 09:40:51 +0000 (11:40 +0200)]
cleanup: indent

15 months agolvresize: improve usepolices
Zdenek Kabelac [Fri, 14 Jul 2023 14:13:41 +0000 (16:13 +0200)]
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.

15 months agolvmlockd: enable vdo conversion
Zdenek Kabelac [Fri, 14 Jul 2023 11:27:29 +0000 (13:27 +0200)]
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).

15 months agolvmlockd: query the simplest check first
Zdenek Kabelac [Fri, 14 Jul 2023 11:26:42 +0000 (13:26 +0200)]
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.

15 months agolvconvert: thin convert locking
Zdenek Kabelac [Fri, 14 Jul 2023 14:50:27 +0000 (16:50 +0200)]
lvconvert: thin convert locking

Fix locking when converting thick to thin LV, ensure
we take pool lock for shared VG.

15 months agolvconvert: no metadata for test mode
Zdenek Kabelac [Fri, 14 Jul 2023 09:39:04 +0000 (11:39 +0200)]
lvconvert: no metadata for test mode

Avoid trying to build real metadata in --test mode.

15 months agoman-generator: ensure p is defined
Zdenek Kabelac [Thu, 13 Jul 2023 19:56:47 +0000 (21:56 +0200)]
man-generator: ensure p is defined

In error path, p pointer could have been undefined.

15 months agodebug: missed properly modify pointer type
Zdenek Kabelac [Thu, 13 Jul 2023 19:52:20 +0000 (21:52 +0200)]
debug: missed properly modify pointer type

15 months agotests: improve LD_LIBRARY_PATH setting
Zdenek Kabelac [Thu, 13 Jul 2023 19:25:15 +0000 (21:25 +0200)]
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.

15 months agotests: update
Zdenek Kabelac [Thu, 13 Jul 2023 19:23:40 +0000 (21:23 +0200)]
tests: update

Just drop debug log in case of error happenig later,
so we do not print uneeded info...

15 months agotests: use conf=fdatasync
Zdenek Kabelac [Thu, 13 Jul 2023 19:22:26 +0000 (21:22 +0200)]
tests: use conf=fdatasync

Since we write here in 1k blocksize - we can't use direct.

15 months agotests: skip test if daemon is running
Zdenek Kabelac [Thu, 13 Jul 2023 15:42:50 +0000 (17:42 +0200)]
tests: skip test if daemon is running

Skip the test, to avoid making all test failed when there is
'left' daemon running.

15 months agomakefiles: install lvmdbusd executable
Zdenek Kabelac [Thu, 13 Jul 2023 14:36:49 +0000 (16:36 +0200)]
makefiles: install lvmdbusd executable

Use a different mechanism to ensure, lvmdbudd is executable at
install destination.

15 months agomakefiles: remove autom4te.cache
Zdenek Kabelac [Thu, 13 Jul 2023 10:27:09 +0000 (12:27 +0200)]
makefiles: remove autom4te.cache

For 'make distclean' remove also autom4te.cache
(from autoreconf).

15 months agogcc: correct signess comparation
Zdenek Kabelac [Thu, 13 Jul 2023 10:32:44 +0000 (12:32 +0200)]
gcc: correct signess comparation

Compare int to int and unsigned to unsigned...

15 months agolvchange: add log_error for failure path
Zdenek Kabelac [Thu, 13 Jul 2023 19:24:26 +0000 (21:24 +0200)]
lvchange: add log_error for failure path

When change of monitoring fails, ensure there is log_error() printed.

15 months agodebug: fix sscanf type
Zdenek Kabelac [Thu, 13 Jul 2023 19:19:48 +0000 (21:19 +0200)]
debug: fix sscanf type

Last commit c38b668fc3ead664a35130c1acec63518630d1dc 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.

15 months agoUpdate README
Marian Csontos [Wed, 12 Jul 2023 13:53:28 +0000 (15:53 +0200)]
Update README

15 months agoWHATS_NEW: update
Zdenek Kabelac [Wed, 12 Jul 2023 12:21:32 +0000 (14:21 +0200)]
WHATS_NEW: update

15 months agotests: some fixes for lvmlockd testing
Zdenek Kabelac [Wed, 12 Jul 2023 11:58:50 +0000 (13:58 +0200)]
tests: some fixes for lvmlockd testing

15 months agotests: reduce paths added to LD_LIBRARY_PATH
Zdenek Kabelac [Wed, 12 Jul 2023 11:51:48 +0000 (13:51 +0200)]
tests: reduce paths added to LD_LIBRARY_PATH

Add only stricly needed paths to compiled .so objects.

15 months agotests: check for writecache presence
Zdenek Kabelac [Wed, 12 Jul 2023 11:47:13 +0000 (13:47 +0200)]
tests: check for writecache presence

Test is using writecache.

15 months agotests: makefile build proper tools list
Zdenek Kabelac [Tue, 11 Jul 2023 13:48:15 +0000 (15:48 +0200)]
tests: makefile build proper tools list

Add compiled components to the list.

15 months agodebug: use display_lvname
Zdenek Kabelac [Wed, 12 Jul 2023 11:50:21 +0000 (13:50 +0200)]
debug: use display_lvname

15 months agodebug: fix parsing of /proc/self/stat
Zdenek Kabelac [Mon, 10 Jul 2023 19:44:24 +0000 (21:44 +0200)]
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

15 months agocov: fix memleak in vgchange
Zdenek Kabelac [Wed, 12 Jul 2023 12:15:41 +0000 (14:15 +0200)]
cov: fix memleak in vgchange

Release allocated  vgname from get_single_vgname_cmd_arg()
when it is not returned via *vgname_ret.

15 months agocov: hide some messages
Zdenek Kabelac [Wed, 12 Jul 2023 12:12:51 +0000 (14:12 +0200)]
cov: hide some messages

Living with these...

15 months agoautoconf: update py-compile
Zdenek Kabelac [Mon, 10 Jul 2023 18:38:26 +0000 (20:38 +0200)]
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
15 months agolvconvert: correction for thin conversion
Zdenek Kabelac [Wed, 12 Jul 2023 11:52:32 +0000 (13:52 +0200)]
lvconvert: correction for thin conversion

Updates for 39457234db1d92f89d4234e2f2f5b703206281ae.
Off-by-one for option array - need 20 fields.
Missed to clear lock_args for cachepool.

15 months agoREADME: Move to gitlab
Marian Csontos [Mon, 10 Jul 2023 15:47:43 +0000 (17:47 +0200)]
README: Move to gitlab

15 months agoWHATS_NEW: updates
Zdenek Kabelac [Tue, 4 Jul 2023 19:50:35 +0000 (21:50 +0200)]
WHATS_NEW: updates

15 months agolv: followup seg_monitor reporting
Zdenek Kabelac [Tue, 4 Jul 2023 22:50:54 +0000 (00:50 +0200)]
lv: followup seg_monitor reporting

With 3596558861e62ca0c6f37bfba6a4e80e46dcca47 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.

15 months agotests: use aux functionality
Zdenek Kabelac [Tue, 4 Jul 2023 20:17:58 +0000 (22:17 +0200)]
tests: use aux functionality

Use aux wait_recalc and wait_for_sync  for faster processing.

15 months agotests: update thin
Zdenek Kabelac [Mon, 3 Jul 2023 18:50:49 +0000 (20:50 +0200)]
tests: update thin

15 months agoman: update for new syntax
Zdenek Kabelac [Tue, 4 Jul 2023 19:34:37 +0000 (21:34 +0200)]
man: update for new syntax

15 months agopool: improve message for data persistance
Zdenek Kabelac [Tue, 4 Jul 2023 21:40:11 +0000 (23:40 +0200)]
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.

15 months agolvconvert: support conversion to thin volume
Zdenek Kabelac [Tue, 4 Jul 2023 19:34:47 +0000 (21:34 +0200)]
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.

15 months agocleanup: typos
Zdenek Kabelac [Sun, 2 Jul 2023 15:46:47 +0000 (17:46 +0200)]
cleanup: typos

15 months agocleanup: use spelling synchronize
Zdenek Kabelac [Sun, 2 Jul 2023 14:41:34 +0000 (16:41 +0200)]
cleanup: use spelling synchronize

Use single spelling form for synchronize.

15 months agotests: caching of single thin volume
Zdenek Kabelac [Tue, 4 Jul 2023 18:06:45 +0000 (20:06 +0200)]
tests: caching of single thin volume

15 months agotests: cache with error and zero
Zdenek Kabelac [Tue, 4 Jul 2023 17:15:40 +0000 (19:15 +0200)]
tests: cache with error and zero

15 months agotests: skip on kernels
Zdenek Kabelac [Tue, 4 Jul 2023 17:14:18 +0000 (19:14 +0200)]
tests: skip on kernels

15 months agolv_manip: fix move_lv_segments moved bits
Zdenek Kabelac [Mon, 10 Jul 2023 13:43:49 +0000 (15:43 +0200)]
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.

15 months agopool: do not pass empty string in callback
Zdenek Kabelac [Tue, 4 Jul 2023 20:46:50 +0000 (22:46 +0200)]
pool: do not pass empty string in callback

When preparing cmdline to executing dmpd tool, avoid adding
empty string ("") on such line.

15 months agocache: update validation rules
Zdenek Kabelac [Tue, 4 Jul 2023 17:21:43 +0000 (19:21 +0200)]
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.

15 months agocache: support more segtypes for caching
Zdenek Kabelac [Tue, 4 Jul 2023 08:58:39 +0000 (10:58 +0200)]
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.

15 months agocache: handle error segtype
Zdenek Kabelac [Tue, 4 Jul 2023 17:20:12 +0000 (19:20 +0200)]
cache: handle error segtype

Allow to convert error LV.

15 months agocachepool: skip wipe for nonzeroeable segments
Zdenek Kabelac [Tue, 4 Jul 2023 11:29:00 +0000 (13:29 +0200)]
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).

15 months agopool: support passing data_lv for recalculation
Zdenek Kabelac [Sun, 2 Jul 2023 09:21:15 +0000 (11:21 +0200)]
pool: support passing data_lv for recalculation

Support data_lv to be passed as parameter when it's not yet
attached to the pool.

15 months agocommands: error and zero segtype handling
Zdenek Kabelac [Tue, 4 Jul 2023 11:26:57 +0000 (13:26 +0200)]
commands: error and zero segtype handling

Add function to work with error and zero LVs more easily.

15 months agocommands: enhance error checking for generator
Zdenek Kabelac [Tue, 4 Jul 2023 09:26:46 +0000 (11:26 +0200)]
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.

15 months agocommands: support query for lv_is_cow
Zdenek Kabelac [Tue, 4 Jul 2023 11:31:56 +0000 (13:31 +0200)]
commands: support query for lv_is_cow

15 months agosegtype: add missing macros for error and zero segment
Zdenek Kabelac [Tue, 4 Jul 2023 11:14:58 +0000 (13:14 +0200)]
segtype: add missing macros for error and zero segment

Add macros for checking error and zero segment as we do
with other segtypes.

15 months agosnapshot: no error when extending above max size
Zdenek Kabelac [Thu, 29 Jun 2023 21:19:09 +0000 (23:19 +0200)]
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.

15 months agovdo: support version 4
Zdenek Kabelac [Sun, 2 Jul 2023 20:02:18 +0000 (22:02 +0200)]
vdo: support version 4

Properly parse VDO volumes formatted with geometry block version 4.0.

15 months agopool: avoid using artificial name internally
Zdenek Kabelac [Thu, 29 Jun 2023 11:53:43 +0000 (13:53 +0200)]
pool: avoid using artificial name internally

15 months agolv: more details about monitoring lvs
Zdenek Kabelac [Wed, 28 Jun 2023 09:51:35 +0000 (11:51 +0200)]
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)

15 months agolvm_import_vdo: spelling fixes
Zdenek Kabelac [Thu, 29 Jun 2023 11:05:55 +0000 (13:05 +0200)]
lvm_import_vdo: spelling fixes

15 months agovdo: lvm_import_vdo correct parsing output
Zdenek Kabelac [Thu, 29 Jun 2023 11:06:18 +0000 (13:06 +0200)]
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.

15 months agovdo: indent for lvdisplay
Zdenek Kabelac [Wed, 28 Jun 2023 09:53:29 +0000 (11:53 +0200)]
vdo: indent for lvdisplay

15 months agovdo: check_point_frequence is unused option
Zdenek Kabelac [Wed, 28 Jun 2023 09:55:20 +0000 (11:55 +0200)]
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.)

15 months agotests: simplify
Zdenek Kabelac [Sun, 25 Jun 2023 10:58:27 +0000 (12:58 +0200)]
tests: simplify

15 months agotests: require raid target
Zdenek Kabelac [Sat, 24 Jun 2023 20:37:12 +0000 (22:37 +0200)]
tests: require raid target

15 months agotests: correct checked devices
Zdenek Kabelac [Sun, 25 Jun 2023 09:52:47 +0000 (11:52 +0200)]
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.

15 months agotests: correct generated metadata
Zdenek Kabelac [Sat, 24 Jun 2023 20:34:38 +0000 (22:34 +0200)]
tests: correct generated metadata

Newer thin_check actually rejects such restored data.

15 months agoWHATS_NEW: update
Zdenek Kabelac [Fri, 23 Jun 2023 16:07:31 +0000 (18:07 +0200)]
WHATS_NEW: update

15 months agomake: generate
Zdenek Kabelac [Fri, 23 Jun 2023 09:39:46 +0000 (11:39 +0200)]
make: generate

15 months agodebug: add backtraces
Zdenek Kabelac [Fri, 23 Jun 2023 14:04:55 +0000 (16:04 +0200)]
debug: add backtraces

15 months agoaux: add configuration for thin_restore and check_restore
Zdenek Kabelac [Fri, 23 Jun 2023 12:43:36 +0000 (14:43 +0200)]
aux: add configuration for thin_restore and check_restore

15 months agotests: improve test for machine_id
Zdenek Kabelac [Fri, 23 Jun 2023 12:43:07 +0000 (14:43 +0200)]
tests: improve test for machine_id

15 months agotests: ensure test defines its own etc dir
Zdenek Kabelac [Tue, 20 Jun 2023 19:56:28 +0000 (21:56 +0200)]
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.

15 months agotests: fix path to dev dir
Zdenek Kabelac [Tue, 20 Jun 2023 19:19:43 +0000 (21:19 +0200)]
tests: fix path to dev dir

Correct some explicit references to /dev and use $DM_DEV_DIR.

15 months agothin: add cfg support for thin_restore and cache_restore
Zdenek Kabelac [Fri, 23 Jun 2023 12:39:44 +0000 (14:39 +0200)]
thin: add cfg support for thin_restore and cache_restore

Add configurable paths for thin_restore and cache_restore.

15 months agotests: update test for automatic virtual size correction
Zdenek Kabelac [Fri, 23 Jun 2023 16:03:25 +0000 (18:03 +0200)]
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.

15 months agolvm_import_vdo: correct the converted virtual size
Zdenek Kabelac [Fri, 23 Jun 2023 16:01:32 +0000 (18:01 +0200)]
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.

15 months agolvcreate: allow thin snapshot syntax that broke
David Teigland [Tue, 20 Jun 2023 20:41:24 +0000 (15:41 -0500)]
lvcreate: allow thin snapshot syntax that broke

The command "lvcreate --type thin --snapshot ..." to create a thin
snapshot would fail.

commit d651b340e68d97ada25e558eb50aa40062bba936 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.

15 months agotests: lvresize fs mounted multiple times
David Teigland [Tue, 20 Jun 2023 18:13:06 +0000 (13:13 -0500)]
tests: lvresize fs mounted multiple times

15 months agolvresize: fix multiple mounts
David Teigland [Fri, 16 Jun 2023 17:06:40 +0000 (12:06 -0500)]
lvresize: fix multiple mounts

which was mistaken as a mounted LV that had been renamed.

16 months agodevice_id: ignore leading and trailing spaces for sys_wwid and sys_serial
David Teigland [Thu, 15 Jun 2023 18:58:48 +0000 (13:58 -0500)]
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.

16 months agotests: Skip integrity tests if target not present dev-mcsontos-ci
Marian Csontos [Wed, 14 Jun 2023 11:48:51 +0000 (13:48 +0200)]
tests: Skip integrity tests if target not present

16 months agotests: tmp is used for TMPDIR
Marian Csontos [Wed, 14 Jun 2023 11:23:41 +0000 (13:23 +0200)]
tests:  tmp is used for TMPDIR

Fixes tests failing due to previous commit 734d9791f817.

16 months agoWHATS_NEW: update
Zdenek Kabelac [Fri, 9 Jun 2023 15:52:00 +0000 (17:52 +0200)]
WHATS_NEW: update

16 months agotests: updates
Zdenek Kabelac [Fri, 9 Jun 2023 11:28:23 +0000 (13:28 +0200)]
tests: updates

Add some more complicated conversion tests.

16 months agotests: vdo manager wrapper tool updates
Zdenek Kabelac [Fri, 9 Jun 2023 11:24:56 +0000 (13:24 +0200)]
tests: vdo manager wrapper tool updates

Support size specification in KiB units.
Add some theoretical support for some new options from vdoprepareforlvm.

16 months agotests: tmp dir inside test dir
Zdenek Kabelac [Mon, 29 May 2023 12:17:43 +0000 (14:17 +0200)]
tests: tmp dir inside test dir

Keep even temporary files within testing dir so generated files are
not left behind in system's /tmp directory.

16 months agocov: drop unneeded constness
Zdenek Kabelac [Thu, 11 May 2023 17:17:18 +0000 (19:17 +0200)]
cov: drop unneeded constness

If we want to have const structure - use a const pointer to avoid,
however making individual members const make it only assingle
in construct time and we already violate this logic since
we memcpy into the structure -  so drop these unnecessary consts...

16 months agovdo: man updates for lvm_import_vdo
Zdenek Kabelac [Fri, 9 Jun 2023 11:24:19 +0000 (13:24 +0200)]
vdo: man updates for lvm_import_vdo

16 months agovdo: enhance lvm_vdo_import
Zdenek Kabelac [Thu, 11 May 2023 18:07:37 +0000 (20:07 +0200)]
vdo: enhance lvm_vdo_import

Add support for usage of 'dm-snapshot' for doing whole device conversion
in a snapshot which could be merged once the whole conversion has been
made.
This helps with cases where there would be any unexpected failure in the
middle of conversion process and user can continue using original
device until problem in conversion is fixed.

Import tool now uses 'truncate' tool to create a small backend file (20M) for loop device
to hold COW exception store.

Option  --vdo-config has been added to allow specifing location of vdo
configuration file.

Option --no-snapshot allows to use import tool without creation of
snapshot, however recovery after finished VDO conversion and unfinished
lvm2 conversion is then very difficult.

Option --uuid-prefix allow to specify DM UUID prefix for snapshot
device.

Use read with -r.

16 months agovdo: fix and enhance vdo metadata reader
Zdenek Kabelac [Fri, 9 Jun 2023 11:21:35 +0000 (13:21 +0200)]
vdo: fix and enhance vdo metadata reader

Improve metadata parser to handle volume_geometry bio_offset,
which needs to be substracted from 'region' start_block when present.

This bio_offset block is non-zero i.e. with converted VDO volumes.

Also fix some converted structure value (but they are not in use).

16 months agocmd_enum: correct inclusion
Zdenek Kabelac [Thu, 18 May 2023 19:53:33 +0000 (21:53 +0200)]
cmd_enum: correct inclusion

Ensure we use generated header file for this build from -Iinclude.

Reported-by: Anton Lundin <glance@ac2.se>
16 months agodevice_id: fix handling of non-PV with duplicate serial number
David Teigland [Thu, 8 Jun 2023 17:24:05 +0000 (12:24 -0500)]
device_id: fix handling of non-PV with duplicate serial number

Fix in the code that matches devices to system.devices entries when
the devices have the same serial number.  A non-PV device in
system.devices has no pvid value, and the code was segfaulting
when checking the null pvid value.

16 months agoman: lvmraid update limitations
David Teigland [Mon, 5 Jun 2023 15:43:51 +0000 (10:43 -0500)]
man: lvmraid update limitations

16 months agoreporter: restore report type to initial value after processing report_for_selection
Peter Rajnoha [Tue, 30 May 2023 19:14:37 +0000 (21:14 +0200)]
reporter: restore report type to initial value after processing report_for_selection

If we are executing 'report_for_selection' to do an internal report
just for the selection itself (not for display), we can call it more
than once. In that case, we are reusing the same selection handle
(e.g. inside 'process_each_lv_in_vg').

The selection handle has 'report_type' field which is a union of all
report types needed for the report based on selection fields we actually
use.

The 'report_type' is further clarified based on checks and rules inside
'_get_final_report_type' which 'report_for_selection' calls. Then, this
final report type unambiguously identifies proper branch to take in
'report_all_in_{pv,vg,lv}' that is called next.

If the 'report_for_selection' is called more than once with the same
selection handle, we need to make sure that we always restore the report
type to its initial value, so all the rules inside 'report_for_selection'
are applied correctly next time.

This patch fixes the missing restoration of the 'report_type' value in
'selection_handle' that is reused for recurring 'report_for_selection'
calls.

An example scenario where this failed was with selecting an LV for
removal with "lvremove --select" while using a field in the selection
that required extra DM info or DM status call for the LV (that is,
"Logical Volume Device Info Fields" and "Logical Volume Device Status Fields"
as visible in 'lvs -S help').

16 months agolvreduce: simplify _lvseg_get_stripes integrity check
David Teigland [Thu, 25 May 2023 17:09:41 +0000 (12:09 -0500)]
lvreduce: simplify _lvseg_get_stripes integrity check

Simplify unnecessary loop to avoid coverity complaint.

16 months agodevice_id: ignore trailing underscores in t10 wwid from devices file
David Teigland [Fri, 19 May 2023 17:52:48 +0000 (12:52 -0500)]
device_id: ignore trailing underscores in t10 wwid from devices file

In previous lvm versions, trailing spaces at the end of a t10 wwid would
be replaced with underscores, so the IDNAME string in system.devices
would look something like "t10.123_".  Current versions of lvm ignore
trailing spaces in a t10 wwid, so the IDNAME string used would be
"t10.123".  The different values would cause lvm to not recognize a
device in system.devices with the trailing _.  Fix this by ignoring
trailing underscores in the IDNAME string from system.devices.

This page took 0.069248 seconds and 5 git commands to generate.