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

18682 Commits

Author SHA1 Message Date
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
Zdenek Kabelac
d6771e513e 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().
2023-07-17 12:44:23 +02:00
Zdenek Kabelac
f078ffc5e6 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.
2023-07-17 12:44:23 +02:00
Zdenek Kabelac
d040b68aee 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.
2023-07-17 12:44:23 +02:00
Zdenek Kabelac
409a79621a vdo: refactor code
Shuffle code to use prepare_exec_args().
Simplify generation of options string within a single char buffer.
2023-07-17 12:44:23 +02:00
Zdenek Kabelac
4d2311655b lvm-exec: refactor code
Add prepare_exec_args() for reading option list for
thin/cache_repair, thin/cache_check.
2023-07-17 12:44:23 +02:00
Zdenek Kabelac
f78b02477b lv_manip: refactor code
Simplify initialization of exec buffer.
Check for misconfigured 'fsadm' executable path.
2023-07-17 12:44:23 +02:00
Zdenek Kabelac
c5e4326337 active: device name limit is NAME_LEN
Use existing NAME_LEN instead of 257 value.
Add missing backtrace.
2023-07-17 12:43:39 +02:00
Zdenek Kabelac
0670338e0b WHATS_NEW: update 2023-07-15 11:05:35 +02:00
Zdenek Kabelac
f6104adcb6 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.
2023-07-15 11:05:35 +02:00
Zdenek Kabelac
55b498b6b5 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).
2023-07-15 11:05:35 +02:00
Zdenek Kabelac
9b23ff5d50 tests: add fsck before resize2fs 2023-07-15 11:05:35 +02:00
Zdenek Kabelac
ac25dd9be6 tests: faster check for flushing
Try minimizing delay in detecting 'cleaner' policy precence,
so we can fast interrupt running lvconvert.
2023-07-15 11:05:35 +02:00
Zdenek Kabelac
f71d3cce93 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.
2023-07-15 11:05:35 +02:00
Zdenek Kabelac
914d793858 aux: fix version checking
New dmpd tools return version string in different format,
so update code to understand both variant.

Also hide some shell var setting to local functions.
2023-07-15 11:05:35 +02:00
Zdenek Kabelac
81ef1fd0cc debug: print WARNING:
Add WARNING: in front of log_warn() messages.
2023-07-15 11:05:35 +02:00
Zdenek Kabelac
b3e45219c2 lvconvert: hanle metadataswap with lvmlockd 2023-07-15 11:05:35 +02:00
Zdenek Kabelac
fdf2571679 mm: add libzstd to ignore list
No need to lock-in-RAM libzstd (linked from systemd).
2023-07-15 11:05:06 +02:00