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

4477 Commits

Author SHA1 Message Date
David Teigland
1b68841605 args: readonly description update
Include reference to --permission r.
2024-09-06 08:44:06 -05:00
Zdenek Kabelac
e3a2f7b8ee cleanup: typos man pages 2024-08-30 16:51:15 +02:00
Zdenek Kabelac
39b7d1ba8f cleanup: typos in comments
Collection of typos in code comments.
Should have no runtime effect.
2024-08-30 16:51:15 +02:00
Zdenek Kabelac
7da47cea35 cleanup: typos in logging
Fixes various typos in printed/logged messages.
2024-08-30 16:51:15 +02:00
zkabelac
b8a4fda0f7 lvconvert: use pvmove as part of renamed LV name
LV with pvmove_ prefix is not allowed to be created by user
so bigger chance our selected name will never exist.

TODO: probably add code to get generic unused LV name...
2024-08-30 16:48:48 +02:00
Peter Rajnoha
c65d379769
toollib: do not accept duplicate device name on pvcreate input 2024-08-28 10:35:18 +02:00
Zdenek Kabelac
038760da4f gcc: single type initializers
Older gcc doesn't really like complex types (buffer, struct) to be
initialized without extra {} around such type.
So pick any other 'single type' var from a struct and set it to 0,
rest will do the compiler without emitting a warning.
2024-08-22 14:47:29 +02:00
Zdenek Kabelac
ff2cadbf18 cleanup: drop extra space 2024-08-22 14:38:40 +02:00
Peter Rajnoha
b53a2ae2a4
tools: vgscan: accept --refresh option 2024-08-14 15:12:59 +02:00
Peter Rajnoha
1ced65b6b4
tools: vgscan: accept --refresh option 2024-08-14 15:09:50 +02:00
Peter Rajnoha
9472e9c5a0
tools: args: update description for --refresh 2024-08-14 14:59:07 +02:00
Peter Rajnoha
4efed9ee99
tools: vgmknodes: use display_lvname 2024-08-14 14:20:55 +02:00
Peter Rajnoha
845a65a755
tools: vgmknodes: handle /dev/mapper content without LV refresh only if udev not running 2024-08-14 13:53:17 +02:00
Peter Rajnoha
5c6120186d
tools: vgmknodes: log error message if LV refresh fails 2024-08-14 13:50:22 +02:00
Peter Rajnoha
75f9b0c25a
tools: vgmknodes: wait for udev first with --refresh, then check /dev 2024-08-14 13:07:25 +02:00
Zdenek Kabelac
e150931fc4 cov: validate list emptiness
Emit internal error for empty list.
2024-08-09 15:10:18 +02:00
David Teigland
78d14a805c integrity: add --integritysettings for tuning
The option can be used in multiple ways (like --cachesettings):

--integritysettings key=val
--integritysettings 'key1=val1 key2=val2'
--integritysettings key1=val1 --integritysettings key2=val2

Use with lvcreate or lvconvert when integrity is first enabled
to configure:
journal_sectors
journal_watermark
commit_time
bitmap_flush_interval
allow_discards

Use with lvchange to configure (only while inactive):
journal_watermark
commit_time
bitmap_flush_interval
allow_discards

lvchange --integritysettings "" clears any previously configured
settings, so dm-integrity will use its own defaults.

lvs -a -o integritysettings displays configured settings.
2024-08-07 17:40:34 -05:00
Peter Rajnoha
14dbf6ca7b reporter: simplify checking output format setting in report_format_init 2024-07-24 09:50:26 +00:00
Peter Rajnoha
8281f7c111 config: use default log/command_log_report=1 for json/json_std output format
log/command_log_report config setting defaults to 1 now if json or json_std
output format is used (either by setting report/output_format config
setting or using --reportformat cmd line arg).

This means that if we use json/json_std output format, the command log
messages are then part of the json output too, not interleaved as
unstructured text mixed with the json output.

If log/command_log_report is set explicitly in the config, then we still
respect that, no matter what output format is used currently. In this
case, users can still separate and redirect the output by using
LVM_OUT_FD, LVM_ERR_FD and LVM_REPORT_FD so that the different types
do not interleave with the json/json_std output.
2024-07-24 09:50:26 +00:00
David Teigland
f8aa073a8d Revert "dev-cache: move global variables into cmd struct"
This reverts commit 77be3250d9.
2024-07-08 15:32:41 -05:00
David Teigland
39e65c8f59 Revert "bcache: move from global variable to cmd struct"
This reverts commit 5bf4efbab5.
2024-07-08 15:32:35 -05:00
David Teigland
5bf4efbab5 bcache: move from global variable to cmd struct 2024-07-03 12:58:18 -05:00
David Teigland
77be3250d9 dev-cache: move global variables into cmd struct
The cmd struct is now required in many more functions, and
it's added as a function arg for most direct dev-cache function
calls.  The cmd struct is added to struct device (dev->cmd) so
that it can be accessed in many other cases where dev-cache
functions are being called from places where getting the cmd
struct is too difficult.
2024-07-03 11:52:32 -05:00
David Teigland
990f4f7c4f devices: dm uuid related function names
In the context of dm, 'device' refers to a dm device, but
in the context of lvm, 'device' refers to struct device.
Change some lvm function names to make that difference clearer.

dev_manager_get_device_list() -> dev_manager_get_dm_active_devices()
get_device_list() -> get_dm_active_devices()
device_get_uuid() -> dev_dm_uuid(), devno_dm_uuid()
2024-06-28 14:05:53 -05:00
David Teigland
680f7bd676 lvmlockd: vgchange systemid doen't need global lock
The comment explained that the ex global lock was just
used to trigger global cache invalidation, which is no
longer needed.  This extra locking can cause problems
with LVM-activate when local and shared VGs are mixed
(and the incorrect exit code for errors was causing
problems.)
2024-06-27 13:29:03 -05:00
David Teigland
943e979079 lvmlockd: parse lockopt string into flags 2024-06-27 13:29:03 -05:00
David Teigland
9ea5ff3db5 lvmlockd: remove unused paramater
start_init option has never been used
2024-06-27 13:29:03 -05:00
David Teigland
4d8fb10af2 vgchange: improve some lvmlockd lockstart messages
Stop printing "Skipping global lock: lockspace not found or started"
for vgchange --lockstart, since it's generally an inherent limitation
that the global lock isn't available until after locking is started.

Update the start delay warning to "a few seconds".
2024-06-27 13:29:03 -05:00
David Teigland
58e75f6178 lvmlockd: skip more vgremove steps with lockopt force
vgremove with --lockopt force should skip lvmlockd-related
steps and allow a forced vg cleanup, in addition to using
--nolocking to skip normal locking calls.
2024-06-27 13:29:03 -05:00
David Teigland
4dc009c872 lvmlockd: allow forced vgchange locktype from none
vgchange --locktype sanlock|dlm --lockopt force <vgname>
can be used to change the lock type without lvmlockd or
the lock manager involved.
2024-06-27 13:29:03 -05:00
David Teigland
bf60cb4da2 lvmlockd: avoid lockd_vg for local VGs
Previously, a command would call lockd_vg() for a local VG,
which would go to lvmlockd, which would send back ENOLS,
and the command would not care when it saw the VG was local.
The pointless back-and-forth to lvmlockd for local VGs can
be avoided by checking the VG lock_type in lvmcache (which
label_scan now saves there; this wasn't the case back when
the original lockd_vg logic was added.)  If the lock_type
saved during label_scan indicates a local VG, then the
lockd_vg step is skipped.
2024-06-27 13:29:03 -05:00
Zdenek Kabelac
524df486b3 cov: annotate already validated lv name 2024-06-03 15:30:05 +02:00
Zdenek Kabelac
896410b393 cleanup: use _ for static var
Add missing '_' for some static vars.
2024-06-03 15:30:05 +02:00
Zdenek Kabelac
cd0f5ee36c cleanup: remove unneded headers
As the common code was refactored to toollib, this header file
no longer needs to be included here.
2024-06-03 15:30:05 +02:00
Zdenek Kabelac
915dd18361 typo: fix typos
Typo and indent.
2024-06-03 15:30:05 +02:00
Zdenek Kabelac
85e0636623 cleanup: some more MAJOR MINOR unsigned
Finish remaing missing cases where MAJOR/MINOR was casted to (int)
while we can now use it directly as 'unsigned'.
2024-06-03 15:30:05 +02:00
Zdenek Kabelac
91502446ac lvremove: reuse existing dm_build_dm_uuid
Use existing dm_build_dm_uuid() to generate LV's DM UUID.
2024-06-03 15:30:05 +02:00
David Teigland
a8b8e1f074 vgimportdevices: skip global lockd locking
Fix commit b65a2c3f3a "vgimportdevices: skip lvmlockd locking"
which intended to disable lvmlockd locking, but the lockd_gl_disable
flag was mistakenly set after lock_global() so it wasn't effective.
This caused vgimportdevices to fail unless locking was started.
2024-05-30 14:53:46 -05:00
Zdenek Kabelac
2c8ff67470 args: generate configurable path 2024-05-28 14:55:53 +02:00
Zdenek Kabelac
533a87d0ea lvremove: initilize struct list 2024-05-27 18:23:26 +02:00
Zdenek Kabelac
80fa3511be lvremove: check for handle
Get lvremove_params from non NULL handle.
Introduced in commit 47f8bda05.
TODO: any more thing needed ?
2024-05-27 17:03:37 +02:00
Zdenek Kabelac
9dfe5ce2bc cov: replace enum report_type_t with unsigned
Another enum used as bitfield mask.
2024-05-27 16:35:23 +02:00
Zdenek Kabelac
403ecb46fa cov: annotate known use of validated lv name 2024-05-27 16:35:23 +02:00
Zdenek Kabelac
1b90865843 cleanup: remove blank spaces 2024-05-27 16:35:23 +02:00
Zdenek Kabelac
88e0060aa8 cleanup: refactor common code
Refactor shared code from _get_rootvg_dev() between vgchange
and vgimportdevices to get_rootvg_dev_uuid() in toollib.c
2024-05-27 16:35:00 +02:00
Zdenek Kabelac
e1fd179dc5 cleanup: replace strlen with sizeof
Use the string size from compile time.
2024-05-27 15:35:58 +02:00
Zdenek Kabelac
45c06025da cleanup: some typos
Collection of some typos or invalid uppercase or doublespace cases.
2024-05-27 15:35:57 +02:00
Zdenek Kabelac
01e014a246 device: use device_get_uuid
Replace call to get_dm_uuid_from_sysfs() with use of
device_get_uuid() which gets the same information,
but instead of several syscalls it need either 1 or even 0
when the information is cached with newer kernels.
2024-05-27 15:35:57 +02:00
Zdenek Kabelac
aad1add77f command: reorder vals order
Keep most frequently used val names in front.
2024-05-27 15:16:26 +02:00
Zdenek Kabelac
314c759a09 command: store val_name with its size
Compile length of val_name during compilation.
2024-05-27 15:16:26 +02:00