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

18699 Commits

Author SHA1 Message Date
Peter Rajnoha
12b60e7c25
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.
2023-08-28 15:44:57 +02:00
Peter Rajnoha
c4b42e9f59
gitignore: update 2023-08-28 15:44:00 +02:00
Zdenek Kabelac
71ff21f57c gcc: initialize variables 2023-08-23 15:10:40 +02:00
Zdenek Kabelac
941c4a20d6 tests: better slowdown 2023-08-23 13:47:39 +02:00
Marian Csontos
73abdedbc9 CI: Add timeout
Increase timeout from default 1h to 2h.
2023-08-22 16:39:32 +02:00
Zdenek Kabelac
5803d9b689 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.
2023-08-17 22:52:08 +02:00
Zdenek Kabelac
61499e870a debug: common error handling 2023-08-17 22:52:08 +02:00
Zdenek Kabelac
ba36ba8853 cleanup: move allocation code
Allocate new memory after validation passed.
2023-08-17 22:52:08 +02:00
Zdenek Kabelac
dde5b81079 lvconvert: run error path code only for shared VG
Error path for locking only for share VG.
2023-08-17 22:52:08 +02:00
Zdenek Kabelac
ad73f571b8 lvconvert: move _pmspare handling before conversion 2023-08-17 20:14:47 +02:00
Zdenek Kabelac
8698f9dce6 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.
2023-08-17 20:10:21 +02:00
David Teigland
6ca97e6e62 lvmlockd: fix lvconvert to thin-pool 2023-08-16 15:29:20 -05:00
David Teigland
696ee52ffd 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.
2023-08-16 15:29:20 -05:00
David Teigland
096196281e lvmlockd: fix thick to thin lv conversion 2023-08-16 15:29:19 -05:00
Zdenek Kabelac
5a96ca4a7f 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.
2023-08-16 15:14:29 +02:00
Zdenek Kabelac
728617d25d gcc: cleanup warnings
Correcting signess comparation.
Also use standalone /* fall through */ comment as that's
the only one supported by gcc to quiet warning.
2023-08-16 15:13:25 +02:00
Zdenek Kabelac
085c3821a8 cleanup: no longer used
Previous commit made this var unused.
2023-08-16 15:13:00 +02:00
Christian Hesse
41e4cefc2e make: make install_libexec a target of install_lvm2
This makes sure libexec scripts are available for lvm2 commands.
2023-08-16 15:13:00 +02:00
Zdenek Kabelac
54617805b8 lvconvert: use vg mempool
Keep allocation for a VG within vg memory pool.
2023-08-16 13:31:01 +02:00
Zdenek Kabelac
13225f1371 lvconvert: fix regresion from integrity check
Testing code sliped into commit and cause regression in testing for
a raid with integrity.
2023-08-16 11:25:54 +02:00
David Teigland
e548afd175 lvconvert swapmetadata: update lvmlockd locking for uuid exchange
lvmlockd locking for swapmetadata adjusted for commit
ac36153e99 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.
2023-08-15 13:13:06 -05:00
Zdenek Kabelac
060491c4ee WHATS_NEW: update 2023-08-14 17:02:11 +02:00
Zdenek Kabelac
b764665f4d debug: add missing log_error
Report error with failure.
2023-08-14 17:02:11 +02:00
Zdenek Kabelac
ee6519f8e2 debug: use just single label 2023-08-14 17:02:11 +02:00
Zdenek Kabelac
741a166f3c debug: use common error exit path 2023-08-14 17:02:11 +02:00
Zdenek Kabelac
23019946c2 lvconvert: vdo needs writable LV 2023-08-14 17:02:11 +02:00
Zdenek Kabelac
2f3d8659b1 commands: add lv_is_writable 2023-08-14 17:02:11 +02:00
Zdenek Kabelac
0b7239ebc7 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.
2023-08-14 17:02:11 +02:00
Zdenek Kabelac
80377eeb13 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).
2023-08-14 17:02:11 +02:00
Zdenek Kabelac
ac36153e99 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.
2023-08-14 17:02:09 +02:00
David Teigland
2928891bd0 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 b3e45219c2
2023-08-08 16:57:22 -05:00
David Teigland
847f1dd99c device_id: rewrite validation of devname entries
The old approach was too complicated and didn't work correctly
in some cases.
2023-08-04 11:45:40 -05:00
Marian Csontos
abdb87dd23 CI: Add .gitlab-ci.yml 2023-08-03 11:00:23 +02:00
Marian Csontos
606ecae5d7 post-release 2023-08-02 14:42:16 +02:00
Marian Csontos
016e469caf pre-release 2023-08-02 14:41:12 +02:00
Marian Csontos
1fe2a74995 WHATS_NEW: update 2023-08-02 14:38:23 +02:00
Marian Csontos
9385bea571 make: generate 2023-08-02 12:22:16 +02:00
Peter Rajnoha
0e9fe272bc
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
2023-07-31 13:44:09 +02:00
David Teigland
7cc414135a 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.
2023-07-24 14:56:32 -05:00
Paul van Genderen-Tjie A Loi
e3cc3e55c8 vgmknodes: skipping thin pool is not an error 2023-07-24 12:03:06 -05:00
Zdenek Kabelac
b2431d105e 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'.
2023-07-17 16:34:14 +02:00
Zdenek Kabelac
1c2782354c vdo: use long --verbose
vdo tools needs long option.
2023-07-17 16:22:29 +02:00
Zdenek Kabelac
32b2e416cc tests: new logic for repair
meta name deduced from cachepool name.
2023-07-17 14:30:39 +02:00
Zdenek Kabelac
ace8a2a868 WHATS_NEW: update 2023-07-17 13:47:57 +02:00
Zdenek Kabelac
39cc12e7c2 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...
2023-07-17 13:42:58 +02:00
Zdenek Kabelac
06e39625ee tests: check for loaded brd
Skip the test if the brd is already loaded in the system.
2023-07-17 13:21:59 +02:00
Zdenek Kabelac
284fdb1745 tests: mark test as warning
Until more universal solution for thin-pool corruption gets in place.
2023-07-17 12:44:48 +02:00
Zdenek Kabelac
96b2c20991 debug: add backtrace 2023-07-17 12:44:37 +02:00
Zdenek Kabelac
09e17f99c5 cleanup: remove double //
dev_dir ends with /.
2023-07-17 12:44:23 +02:00
Zdenek Kabelac
469bcc28ac cleanup: remove duplicated code
Commit cac4a9743a moved setting
if layer structed to the function front, but the old code
was still left in original place.
2023-07-17 12:44:23 +02:00