]> sourceware.org Git - lvm2.git/log
lvm2.git
12 months agovdo: avoid using of valuesonly
Zdenek Kabelac [Wed, 13 Sep 2023 21:13:27 +0000 (23:13 +0200)]
vdo: avoid using of valuesonly

To retain backward compatibility with some older version of lvm
avoid using --valuesonly option with lvmconfig.

12 months agotest: improve aux teardown 1002475168
Zdenek Kabelac [Tue, 12 Sep 2023 22:39:33 +0000 (00:39 +0200)]
test: improve aux teardown

Handle the case of device teardown where the first pass
could have only a single, but opened device, for removal.
In such case we want to at least once go through
the udev_wait and retry removal again.

TODO: maybe a sleep .1  might be usable as well with udev_wait

12 months agogcc: warning: missing braces around initializer
Zdenek Kabelac [Tue, 12 Sep 2023 14:40:26 +0000 (16:40 +0200)]
gcc: warning: missing braces around initializer

Fix warning emitted by some older gcc...

12 months agovdo: better support for devicesfile
Zdenek Kabelac [Wed, 13 Sep 2023 11:20:31 +0000 (13:20 +0200)]
vdo: better support for devicesfile

Instead of relying on 'pvs' output - check directly system
configuation and use lvmdevice accrording to use_devicesfile setting.

Also drop use of --fs ignore for filesystem extension for better
backward compatibility with older lvm version.

Shuffle code a bit so the '--no-snapshot' path does not execute
a few unnecessary commands.

12 months agoWHATS_NEW: updates 1001156730
Zdenek Kabelac [Tue, 12 Sep 2023 12:43:59 +0000 (14:43 +0200)]
WHATS_NEW: updates

12 months agogcc: fix warnings for x32 architecture
Mikulas Patocka [Wed, 6 Sep 2023 13:28:29 +0000 (15:28 +0200)]
gcc: fix warnings for x32 architecture

Warning from x32 ABI compilation.

12 months agodebug: missing dots
Zdenek Kabelac [Fri, 8 Sep 2023 22:13:46 +0000 (00:13 +0200)]
debug: missing dots

12 months agovdo: lvm_import_vdo enhancements
Zdenek Kabelac [Fri, 8 Sep 2023 15:19:39 +0000 (17:19 +0200)]
vdo: lvm_import_vdo enhancements

Work also with devices that may have ':' inside their generated
/dev/disk/by-id

Ensure there is no race with systems' auto activation while using
the snapshot for conversion.

Update system's vdoconf.yml after the use of snapshot for conversion.

Skip unnecesary prompt for 'convert' while using snapshot and query only
for final snaphot merge.

Prohibit conversion for a device with the PV header.

Enhance 'trap' protection for more signals.

Improve clean() recovery path.

Replace bash 'test' command with [].

Correct some output message to print $TOOL.

Support also options without '-' in the middle i.e. --nosnapshot.

For shellcheck predefine all variables extracted from vdoconf.yml.

12 months agolvresize: fix 32 bit overflow in size calculation 999979404
David Teigland [Mon, 11 Sep 2023 17:18:12 +0000 (12:18 -0500)]
lvresize: fix 32 bit overflow in size calculation

12 months agomake: generate 991895852
Zdenek Kabelac [Mon, 4 Sep 2023 12:25:45 +0000 (14:25 +0200)]
make: generate

12 months agotests: disable logging for lvmdbusd
Zdenek Kabelac [Mon, 4 Sep 2023 16:43:12 +0000 (18:43 +0200)]
tests: disable logging for lvmdbusd

Since lvmdbusd testing tends to do its own logging,
try for now to disable very generic logging mechnanism
of the test suite and see the result.

Some lvmdbusd test seems to rely on some log/file logic
which is modified with the use of these shell vars.

12 months agotests: check for writecache
Zdenek Kabelac [Mon, 4 Sep 2023 15:32:26 +0000 (17:32 +0200)]
tests: check for writecache

Writecache needs writecache kernel target to be present.

12 months agotests: check for binaries
Zdenek Kabelac [Mon, 4 Sep 2023 12:24:22 +0000 (14:24 +0200)]
tests: check for binaries

vdo wrapper tool uses some 'locally installed' binaries
for vdoformat and vdoprepareforlvm
Chech for their presence.

Skip this test with lvmlockd.

12 months agoWHATS_NEW: update 990420620
Zdenek Kabelac [Sun, 3 Sep 2023 20:49:17 +0000 (22:49 +0200)]
WHATS_NEW: update

12 months agotests: vdo scsi convert
Zdenek Kabelac [Sun, 3 Sep 2023 19:59:06 +0000 (21:59 +0200)]
tests: vdo scsi convert

Somewhat tricky test to check VDO import of a SCSI device.

12 months agotests: vdo convert
Zdenek Kabelac [Sat, 2 Sep 2023 19:28:16 +0000 (21:28 +0200)]
tests: vdo convert

Require VDO version 6.2.3.

Skip the part of the test that needs vdo wrapper and 2 different
versions of vdoprepareforlvm to prepare shifted VDO header
at the 2MiB offset.

12 months agotests: check passing PV list
Zdenek Kabelac [Sat, 2 Sep 2023 22:41:48 +0000 (00:41 +0200)]
tests: check passing PV list

12 months agotests: vdo wrapper support symlinks
Zdenek Kabelac [Sun, 3 Sep 2023 20:00:30 +0000 (22:00 +0200)]
tests: vdo wrapper support symlinks

Enhance internal VDO replacement wrapper script to handle symlinks
for i.e. SCSI device like VDO manager.

12 months agoaux: teardown also devices with testing UUID
Zdenek Kabelac [Sat, 2 Sep 2023 19:36:34 +0000 (21:36 +0200)]
aux: teardown also devices with testing UUID

Hunt also for devices with LVMTEST prefix in UUID.

Call teardown_devs_prefixed - so if they hold RAM or SCSI
they are closed before trying to remove kernel modules.

12 months agodebug: trace result failure
Zdenek Kabelac [Thu, 31 Aug 2023 16:50:08 +0000 (18:50 +0200)]
debug: trace result failure

12 months agodebug: drop stack from regular path
Zdenek Kabelac [Thu, 31 Aug 2023 16:48:15 +0000 (18:48 +0200)]
debug: drop stack from regular path

12 months agodebug: check for syscalls
Zdenek Kabelac [Thu, 31 Aug 2023 16:47:42 +0000 (18:47 +0200)]
debug: check for syscalls

Add some debug checks for possibly failing syscalls.

12 months agoclang: ensure all variables intialized
Zdenek Kabelac [Thu, 24 Aug 2023 13:29:22 +0000 (15:29 +0200)]
clang: ensure all variables intialized

Just in case of some wierd kernel bug, which would forget
to report these values...

12 months agoclang: ensure status is initilized
Zdenek Kabelac [Thu, 24 Aug 2023 13:30:45 +0000 (15:30 +0200)]
clang: ensure status is initilized

Initialize status before handling error path.

12 months agofilesystem: move stat after open check
Zdenek Kabelac [Thu, 31 Aug 2023 16:50:33 +0000 (18:50 +0200)]
filesystem: move stat after open check

To avoid time-of-check-time-of-use clash, take the stat()
after successful open with fstat().
Also add some debugs for failing sys calls.

12 months agodmeventd: move var set to locked section
Zdenek Kabelac [Thu, 31 Aug 2023 16:45:30 +0000 (18:45 +0200)]
dmeventd: move var set to locked section

It should not change the actual code flow, however make the
set of the current_event variable inside locked section.

12 months agolvconvert: thin conversion accept passed PVs
Zdenek Kabelac [Thu, 31 Aug 2023 16:44:53 +0000 (18:44 +0200)]
lvconvert: thin conversion accept passed PVs

When creating thin pool or check pool there is allocated LV
for metadata and for such allocation user should be able to
specify list of PVs on cmdline.

Also fix unused passed list of PV for thick to thin conversion,
where the code was using whole PV set from a VG (but since it's
been not enabled on cmdline, user could not hit this issue).
Also remove unneeded initialization of use_pvh.

12 months agovdo: enhance import script for devices file
Zdenek Kabelac [Sat, 2 Sep 2023 19:25:20 +0000 (21:25 +0200)]
vdo: enhance import script for devices file

When the import is used on a system, that uses devices file,
the final activation was impossible for the case the converted
volume was not present in devices file.
Currently add volume automatically in such case.

Also add some more debugging output from the script.

TODO: Consider enhnacing lvconvert with extending devices file.

12 months agovdo: lvm_import_vdo uses devname from vdoconf.yml
Zdenek Kabelac [Sun, 3 Sep 2023 13:55:26 +0000 (15:55 +0200)]
vdo: lvm_import_vdo uses devname from vdoconf.yml

VDO is using specific path for some device paths.
i.e. for /dev/sda it could be /dev/disk/by-id/scsi-xxxxx.

This used to be not a problem before lvm2 started to use snapshot,
but now it needs to replace matching device path.
So switch to the path naming used in vdoconf.yml file.

12 months agolvmlockd: client mutex ordering 988258448
David Teigland [Thu, 31 Aug 2023 18:15:07 +0000 (13:15 -0500)]
lvmlockd: client mutex ordering

Avoid deadlock between threads on mutexes (in theory.)

12 months agovgchange: acquire an exclusive VG lock for refresh 987099464
wangzhiqiang [Wed, 30 Aug 2023 20:47:42 +0000 (15:47 -0500)]
vgchange: acquire an exclusive VG lock for refresh

Concurrent vgchange --refresh commands can lead to hung
tasks in dm code.

Signed-off-by: wangzhiqiang <wangzhiqiang95@huawei.com>
12 months agoman: dmsetup: document --headings 986859216
Peter Rajnoha [Wed, 30 Aug 2023 16:35:17 +0000 (18:35 +0200)]
man: dmsetup: document --headings

12 months agotests: add shell/report-headings.sh 1/head 984074408 986364352
Peter Rajnoha [Tue, 22 Aug 2023 12:55:31 +0000 (14:55 +0200)]
tests: add shell/report-headings.sh

12 months agoman: update lvmreport man page about report/headings and --headings
Peter Rajnoha [Tue, 22 Aug 2023 12:21:58 +0000 (14:21 +0200)]
man: update lvmreport man page about report/headings and --headings

12 months agomake: generate
Peter Rajnoha [Tue, 22 Aug 2023 11:43:00 +0000 (13:43 +0200)]
make: generate

12 months agodmsetup: support printing full column names in report headings
Peter Rajnoha [Tue, 22 Aug 2023 09:19:05 +0000 (11:19 +0200)]
dmsetup: support printing full column names in report headings

Add '--headings none|abbrev|full|0|1|2' command line option to select
the heading type.

  none|0   - no headings
  abbrev|1 - column name abbreviations
  full|2   - full column names (column names are equal to exact names
             that -o|--options also accepts to set report output)

12 months agoreport: support printing full column names in report headings
Peter Rajnoha [Tue, 22 Aug 2023 08:54:35 +0000 (10:54 +0200)]
report: support printing full column names in report headings

Reuse existing report/headings config setting to make it possible to
change the type of headings to display:
  0 - no headings
  1 - column name abbreviations (default and original functionality)
  2 - full column names (column names are equal to exact names that
      -o|--options also accepts to set report output)

Also, add '--headings none|abbrev|full|0|1|2' command line option
so we are able to select the heading type for each LVM reporting
command directly.

12 months agolibdm: report: support reporting field IDs in headings
Peter Rajnoha [Tue, 22 Aug 2023 08:23:20 +0000 (10:23 +0200)]
libdm: report: support reporting field IDs in headings

Add new DM_REPORT_OUTPUT_FIELD_IDS_IN_HEADINGS report output flag.
If enabled, column IDs are reported instead of column names in report
headings.

The 'column IDs' are IDs as found in 'const struct dm_report_field_type *fields'
array that is passed during report initialization (that is, a call to
dm_report_init/dm_report_init_with_selection). In this case, the 'id'
dm_report_field_type member is used instead of the 'heading' member.

12 months agogitignore: update 984072111
Peter Rajnoha [Mon, 28 Aug 2023 13:44:00 +0000 (15:44 +0200)]
gitignore: update

12 months agogcc: initialize variables 977422369
Zdenek Kabelac [Wed, 23 Aug 2023 12:43:07 +0000 (14:43 +0200)]
gcc: initialize variables

12 months agotests: better slowdown
Zdenek Kabelac [Wed, 23 Aug 2023 11:47:06 +0000 (13:47 +0200)]
tests: better slowdown

12 months agoCI: Add timeout 976096647
Marian Csontos [Tue, 22 Aug 2023 14:38:08 +0000 (16:38 +0200)]
CI: Add timeout

Increase timeout from default 1h to 2h.

12 months agotests: skip some tests with valgrind 971546152
Zdenek Kabelac [Thu, 17 Aug 2023 19:50:48 +0000 (21:50 +0200)]
tests: skip some tests with valgrind

Valgrind tends to be too slow for any kind of slowing down,
thus skip some tests that are time sensitive.

12 months agodebug: common error handling
Zdenek Kabelac [Thu, 17 Aug 2023 18:02:40 +0000 (20:02 +0200)]
debug: common error handling

12 months agocleanup: move allocation code
Zdenek Kabelac [Thu, 17 Aug 2023 18:00:30 +0000 (20:00 +0200)]
cleanup: move allocation code

Allocate new memory after validation passed.

12 months agolvconvert: run error path code only for shared VG
Zdenek Kabelac [Thu, 17 Aug 2023 19:50:03 +0000 (21:50 +0200)]
lvconvert: run error path code only for shared VG

Error path for locking only for share VG.

12 months agolvconvert: move _pmspare handling before conversion
Zdenek Kabelac [Thu, 17 Aug 2023 18:02:16 +0000 (20:02 +0200)]
lvconvert: move _pmspare handling before conversion

12 months agopool: use predefined name for metadata LV
Zdenek Kabelac [Thu, 17 Aug 2023 17:59:36 +0000 (19:59 +0200)]
pool: use predefined name for metadata LV

While create new LV for pool volume, use name from 'pool_metadata%d' naming
sequence. This LV is later on renamed to  pool_t/cmeta, but if there
is any error in the middle, we may evenutally leave some 'volume',
With this name it can be slightly more obvious how it got there,
but also when we handle _pmspare name - we get slightly more predictible
name used there for it.

However for a standard usage this commit shall no visible impact as the
name is used temporarily just for cleaning LV.

12 months agolvmlockd: fix lvconvert to thin-pool 970196973
David Teigland [Wed, 16 Aug 2023 20:00:47 +0000 (15:00 -0500)]
lvmlockd: fix lvconvert to thin-pool

12 months agolvmlockd: let lockd_init_lv_args set lock_args
David Teigland [Wed, 16 Aug 2023 18:24:36 +0000 (13:24 -0500)]
lvmlockd: let lockd_init_lv_args set lock_args

Set the lock_args string in addition to doing initialization.
lvconvert calls lockd_init_lv_args() directly, skipping
the normal lockd_init_lv() which usually sets lock_args.

12 months agolvmlockd: fix thick to thin lv conversion
David Teigland [Tue, 15 Aug 2023 14:53:39 +0000 (09:53 -0500)]
lvmlockd: fix thick to thin lv conversion

12 months agotests: update pool uuid handling 969567177
Zdenek Kabelac [Tue, 15 Aug 2023 21:11:07 +0000 (23:11 +0200)]
tests: update pool uuid handling

Pools now preserve meta LV UUID with swapmetadata operation
to make the usage of lvmlockd easier.

Update test to reflect this change.

12 months agogcc: cleanup warnings
Zdenek Kabelac [Wed, 16 Aug 2023 13:12:36 +0000 (15:12 +0200)]
gcc: cleanup warnings

Correcting signess comparation.
Also use standalone /* fall through */ comment as that's
the only one supported by gcc to quiet warning.

12 months agocleanup: no longer used
Zdenek Kabelac [Tue, 15 Aug 2023 21:05:43 +0000 (23:05 +0200)]
cleanup: no longer used

Previous commit made this var unused.

12 months agomake: make install_libexec a target of install_lvm2
Christian Hesse [Tue, 15 Aug 2023 07:45:20 +0000 (09:45 +0200)]
make: make install_libexec a target of install_lvm2

This makes sure libexec scripts are available for lvm2 commands.

12 months agolvconvert: use vg mempool
Zdenek Kabelac [Wed, 16 Aug 2023 11:29:55 +0000 (13:29 +0200)]
lvconvert: use vg mempool

Keep allocation for a VG within vg memory pool.

12 months agolvconvert: fix regresion from integrity check
Zdenek Kabelac [Tue, 15 Aug 2023 21:06:29 +0000 (23:06 +0200)]
lvconvert: fix regresion from integrity check

Testing code sliped into commit and cause regression in testing for
a raid with integrity.

12 months agolvconvert swapmetadata: update lvmlockd locking for uuid exchange 968582819
David Teigland [Tue, 15 Aug 2023 18:07:34 +0000 (13:07 -0500)]
lvconvert swapmetadata: update lvmlockd locking for uuid exchange

lvmlockd locking for swapmetadata adjusted for commit
ac36153e9943 lvconvert: preserve UUID for swapped metadata

Now that the LV uuid is swapped between LVs, the lvmlockd lock can
simply be moved between them, and the same lock can continue to be
used for the LV outside of the pool.

12 months agoWHATS_NEW: update
Zdenek Kabelac [Mon, 14 Aug 2023 15:00:57 +0000 (17:00 +0200)]
WHATS_NEW: update

12 months agodebug: add missing log_error
Zdenek Kabelac [Mon, 14 Aug 2023 12:03:19 +0000 (14:03 +0200)]
debug: add missing log_error

Report error with failure.

12 months agodebug: use just single label
Zdenek Kabelac [Mon, 14 Aug 2023 12:09:25 +0000 (14:09 +0200)]
debug: use just single label

12 months agodebug: use common error exit path
Zdenek Kabelac [Wed, 9 Aug 2023 11:19:08 +0000 (13:19 +0200)]
debug: use common error exit path

12 months agolvconvert: vdo needs writable LV
Zdenek Kabelac [Wed, 9 Aug 2023 11:44:00 +0000 (13:44 +0200)]
lvconvert: vdo needs writable LV

12 months agocommands: add lv_is_writable
Zdenek Kabelac [Wed, 9 Aug 2023 11:43:45 +0000 (13:43 +0200)]
commands: add lv_is_writable

12 months agolvconvert: fix ret values fro integrity remove
Zdenek Kabelac [Wed, 9 Aug 2023 11:02:13 +0000 (13:02 +0200)]
lvconvert: fix ret values fro integrity remove

Fix return value from _lvconvert_integrity_remove()
as it is expected to match _add() and be 0/1.

Also add some missing log_error() messages.

12 months agolvconvert: preserve UUID on pool repair
Zdenek Kabelac [Mon, 14 Aug 2023 14:15:46 +0000 (16:15 +0200)]
lvconvert: preserve UUID on pool repair

Once lvm2 repairs pool's metadata LV and preserves the original metadata LV
with unmodified metadata, for such LV in VG use newly created UUID for new
_pmspare and actually preserve UUID for this hidden _pmspare (if it
exists).

12 months agolvconvert: preserve UUID for swapped metadata
Zdenek Kabelac [Mon, 14 Aug 2023 13:43:48 +0000 (15:43 +0200)]
lvconvert: preserve UUID for swapped metadata

When swapping metadata LV for a pool volume, preserve UUID for metadata
LV during the swap - this allows to better utilise locks with lvmlockd.

13 months agolvconvert swapmetadata: fix lvmlockd locking 960986663
David Teigland [Tue, 8 Aug 2023 21:57:22 +0000 (16:57 -0500)]
lvconvert swapmetadata: fix lvmlockd locking

The lockd lock needs to be freed for the LV that is becoming
the new metadata LV, and a new lockd lock needs to be created
for the old metadata LV that is becoming an independent LV.
Fixes b3e45219c2f4

13 months agodevice_id: rewrite validation of devname entries 956297527
David Teigland [Thu, 3 Aug 2023 21:20:43 +0000 (16:20 -0500)]
device_id: rewrite validation of devname entries

The old approach was too complicated and didn't work correctly
in some cases.

13 months agoCI: Add .gitlab-ci.yml 954395768
Marian Csontos [Wed, 28 Jun 2023 12:51:22 +0000 (14:51 +0200)]
CI: Add .gitlab-ci.yml

13 months agopost-release
Marian Csontos [Wed, 2 Aug 2023 12:42:16 +0000 (14:42 +0200)]
post-release

13 months agopre-release v2_03_22
Marian Csontos [Wed, 2 Aug 2023 12:39:55 +0000 (14:39 +0200)]
pre-release

13 months agoWHATS_NEW: update
Marian Csontos [Wed, 2 Aug 2023 12:38:23 +0000 (14:38 +0200)]
WHATS_NEW: update

13 months agomake: generate
Marian Csontos [Wed, 2 Aug 2023 10:22:16 +0000 (12:22 +0200)]
make: generate

13 months agoreport: fix pv_major and pv_minor report field type
Peter Rajnoha [Mon, 31 Jul 2023 11:37:34 +0000 (13:37 +0200)]
report: fix pv_major and pv_minor report field type

We incorrectly marked pv_major and pv_minor fields as being of string
type, even though the values were already correctly handled as integers
internally. This confused -S|--select that tried to compare string
values instead of integers.

Reported here: https://github.com/lvmteam/lvm2/issues/122

13 months agolvmdevices: add --delnotfound to delete entries for missing devices
David Teigland [Wed, 19 Jul 2023 20:04:53 +0000 (15:04 -0500)]
lvmdevices: add --delnotfound to delete entries for missing devices

Used with update: lvmdevices --update --delnotfound.
Removes all devices file entries for which no matching device is found.

13 months agovgmknodes: skipping thin pool is not an error
Paul van Genderen-Tjie A Loi [Mon, 24 Jul 2023 17:03:06 +0000 (12:03 -0500)]
vgmknodes: skipping thin pool is not an error

13 months agotests: catch all output
Zdenek Kabelac [Mon, 17 Jul 2023 14:24:22 +0000 (16:24 +0200)]
tests: catch all output

Previous fix was invalid (after some in-place shuffling)
'dd' copied goes to 'stderr' so we need to catch all output.
Grep needs to check output of tee tool.
Ensure 'C' locales are in use with 'dd'.

13 months agovdo: use long --verbose
Zdenek Kabelac [Mon, 17 Jul 2023 14:22:29 +0000 (16:22 +0200)]
vdo: use long --verbose

vdo tools needs long option.

13 months agotests: new logic for repair
Zdenek Kabelac [Mon, 17 Jul 2023 12:30:39 +0000 (14:30 +0200)]
tests: new logic for repair

meta name deduced from cachepool name.

13 months agoWHATS_NEW: update
Zdenek Kabelac [Mon, 17 Jul 2023 11:47:57 +0000 (13:47 +0200)]
WHATS_NEW: update

13 months agotests: use zero device
Zdenek Kabelac [Mon, 17 Jul 2023 11:42:58 +0000 (13:42 +0200)]
tests: use zero device

Change the test to use 'zero' backend, so we could use larger size
and get 'larger' buffer of dirty blocks for fast CPUs...

13 months agotests: check for loaded brd
Zdenek Kabelac [Mon, 17 Jul 2023 11:21:59 +0000 (13:21 +0200)]
tests: check for loaded brd

Skip the test if the brd is already loaded in the system.

13 months agotests: mark test as warning
Zdenek Kabelac [Sun, 16 Jul 2023 20:21:13 +0000 (22:21 +0200)]
tests: mark test as warning

Until more universal solution for thin-pool corruption gets in place.

13 months agodebug: add backtrace
Zdenek Kabelac [Mon, 17 Jul 2023 10:44:04 +0000 (12:44 +0200)]
debug: add backtrace

13 months agocleanup: remove double //
Zdenek Kabelac [Sun, 16 Jul 2023 21:00:24 +0000 (23:00 +0200)]
cleanup: remove double //

dev_dir ends with /.

13 months agocleanup: remove duplicated code
Zdenek Kabelac [Sun, 16 Jul 2023 20:17:23 +0000 (22:17 +0200)]
cleanup: remove duplicated code

Commit cac4a9743acb826d785c0e51e9a752d8959ced80 moved setting
if layer structed to the function front, but the old code
was still left in original place.

13 months agolvconvert: code shuffle
Zdenek Kabelac [Mon, 17 Jul 2023 10:22:50 +0000 (12:22 +0200)]
lvconvert: code shuffle

Use cachepool name for create name for metadata backup LV.
(so we do not generate 2 'sequences' of metadata filenames.)
Move path preparion before handling _pmspare.
Also drop extra call to sync_local_dev_names() as it's
already got in sync with call of exec_cmd().

13 months agolvconvert: add support --setactivationskip
Zdenek Kabelac [Mon, 17 Jul 2023 10:13:14 +0000 (12:13 +0200)]
lvconvert: add support --setactivationskip

When repair thinpool or cachepool, lvm2 leaves original metadata
volume backup. To avoid potential damage of those data, mark such
volume as 'read-only' and also allow user to use --setactivationskip
option for this volume.

TODO: likely better default would be to automatically skip, but
that might need some more thinking about recovery reporting doc.

13 months agolvconvert: use public LVs for recovery
Zdenek Kabelac [Sun, 16 Jul 2023 19:15:00 +0000 (21:15 +0200)]
lvconvert: use public LVs for recovery

Replace the use of internal /dev/mapper names with the use of
public LV names /dev/vg/lv for use with repair tools.
For this make the activation of _pmspare LV to be handled as
a component activation with public name.
Metadata is already atomatically activated this way (as readonly).

So if there is any 'error' happening, we leave public LVs in
system.

13 months agovdo: refactor code
Zdenek Kabelac [Sun, 16 Jul 2023 18:03:15 +0000 (20:03 +0200)]
vdo: refactor code

Shuffle code to use prepare_exec_args().
Simplify generation of options string within a single char buffer.

13 months agolvm-exec: refactor code
Zdenek Kabelac [Sun, 16 Jul 2023 15:35:20 +0000 (17:35 +0200)]
lvm-exec: refactor code

Add prepare_exec_args() for reading option list for
thin/cache_repair, thin/cache_check.

13 months agolv_manip: refactor code
Zdenek Kabelac [Sun, 16 Jul 2023 15:35:04 +0000 (17:35 +0200)]
lv_manip: refactor code

Simplify initialization of exec buffer.
Check for misconfigured 'fsadm' executable path.

13 months agoactive: device name limit is NAME_LEN
Zdenek Kabelac [Mon, 17 Jul 2023 10:43:39 +0000 (12:43 +0200)]
active: device name limit is NAME_LEN

Use existing NAME_LEN instead of 257 value.
Add missing backtrace.

13 months agoWHATS_NEW: update
Zdenek Kabelac [Sat, 15 Jul 2023 09:04:06 +0000 (11:04 +0200)]
WHATS_NEW: update

13 months agotests: updates
Zdenek Kabelac [Sat, 15 Jul 2023 08:39:56 +0000 (10:39 +0200)]
tests: updates

Pass more args with some 'aux' commands:
wipefs_a, enable_dev, disable_dev
(so it's a bit more efficient using single udev_wait call).
Use prepare_vg instead of prepare_pvs.

13 months agotests: avoid using /test dir
Zdenek Kabelac [Fri, 14 Jul 2023 20:05:27 +0000 (22:05 +0200)]
tests: avoid using /test dir

Keep using test directory for created files.
Trap errors and remove brd in this case.
Use some shell builtins to reduce fork count.
Use "$VAR".
Run 'pvs' with devlist (so not acceing other system devices).

13 months agotests: add fsck before resize2fs
Zdenek Kabelac [Fri, 14 Jul 2023 23:26:10 +0000 (01:26 +0200)]
tests: add fsck before resize2fs

13 months agotests: faster check for flushing
Zdenek Kabelac [Fri, 14 Jul 2023 21:24:23 +0000 (23:24 +0200)]
tests: faster check for flushing

Try minimizing delay in detecting 'cleaner' policy precence,
so we can fast interrupt running lvconvert.

13 months agotests: ensure single leg is broken
Zdenek Kabelac [Sat, 15 Jul 2023 08:21:48 +0000 (10:21 +0200)]
tests: ensure single leg is broken

Make sure only the first raid5 leg, that contains searched string
is being modified, so we do not 'damage'  2legs at once.

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