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

19724 Commits

Author SHA1 Message Date
Peter Rajnoha
32ab91e528
udev: create /dev/disk/by-diskseq/<DISKSEQ> symlink for public DM devices
All block devices have a disk sequence number assigned (an ever-increasing 64 bit
sequence number) since kernel v5.15 (February 2021). The number is exported through
/sys/block/<disk>/diskseq property and also as DISKSEQ udev event variable.
The diskseq helps with referencing a device throughout its existence in
race-free way.

By default, the /usr/lib/udev/rules.d/60-persistent-storage.rules set
/dev/disk/by-diskseq/<diskseq> symlink for each block device. However,
these rules do not apply for DM devices because we manage the symlinks
ourselves in 13-dm-disk.rules where it properly follows the
DM_UDEV_DISABLE_DISK_RULES flag, among other things.

Add a rule to 13-dm-disk.rules to create the /dev/disk/by-diskseq/<diskseq>.
2024-12-09 13:17:46 +01:00
Marian Csontos
85014fcd6d post-release 2024-12-09 12:57:57 +01:00
Marian Csontos
32cfcfd151 pre-release 2.03.29 2024-12-09 12:57:57 +01:00
Zdenek Kabelac
3c365e6c5c WHATS_NEW: update 2024-12-06 17:23:01 +01:00
Zdenek Kabelac
4a18f89736 make: generate 2024-12-06 17:23:01 +01:00
Zdenek Kabelac
2b82e882ed configure: autoreconf 2024-12-06 17:22:57 +01:00
Zdenek Kabelac
d8726b07c3 lvmlockd: utilize SD_NOTIFY_SUPPORT
Update makefile and code to better utilize SD_NOTIFY_SUPPORT var.
2024-12-06 17:16:55 +01:00
Su Yue
ee97c5c633 configure.ac: add option disable/enable-sd-notify
Since commit d106ac04ab ("configure.ac: use LIBSYSTEMD"),
lvmlockd is not built with SD_NOTIFY by default but depending
on LIBSYSTEMD_LIBS. There are three prerequisites of
nonempty LIBSYSTEMD_LIBS:
NOTIFYDBUS_SUPPORT, SYSTEMD_JOURNAL_SUPPORT and SYSTEMD_JOURNAL_SUPPORT.

If ./configure is called with options ' --disable-systemd-journal
--disable-app-machineid --enable-lvmlockd-sanlock
--disable-notify-dbus', the lvmlockd built is without sd_notify
support which causes hang of start lvmlockd service in notify type.

This commit adds options disable-sd-notify and enable-sd-notify.
The default value is autodetected and when the lvm2 is build with
systemd then sd-notify is enabled.
If systemd/sd-daemon.h is existed, call PKG_CHECK_MODULES libsystemd.

Signed-off-by: Su Yue <glass.su@suse.com>
Modified-by: Zdenek Kabelac <zkabelac@redhat.com>
2024-12-06 17:14:58 +01:00
David Teigland
f08d1caf47 vgdisplay: remove command def for activevolumegroups
too minor to care about separating
2024-12-06 09:18:23 -06:00
David Teigland
acd7cfbc08 pvdisplay, vgdisplay, lvdisplay: changed listed order
List the common form first, followed by the others.
2024-12-05 16:09:19 -06:00
David Teigland
6c5e8ee18b vgdisplay: add command def for activevolumegroups
This variant does not accecpt positional args like
the others.
2024-12-05 16:03:24 -06:00
David Teigland
017c668fd0 vgdisplay: split code for variants using command defs 2024-12-05 15:31:55 -06:00
David Teigland
ccde015712 pvdisplay: split code for variants using command defs
Also fix the use of --all that was mistakenly included
as an accepted option for vgdisplay and two cases of pvdisplay
in commit "tools: enhance lvdisplay vgdisplay pvdisplay"
2024-12-05 15:31:55 -06:00
David Teigland
9beea2db69 lvdisplay: split code for variants using command defs 2024-12-05 15:31:55 -06:00
Marian Csontos
275c9666b6 doc: Amend 2.03.27 and 28 release notes' date 2024-12-05 14:40:42 +01:00
Zdenek Kabelac
d791f160a8 tests: make reshape bug more easier to hit
Seems this delay_dev usage exposing some reshape window creation bug.
So make delay bigger to hit the error easier.
2024-12-04 16:14:22 +01:00
Zdenek Kabelac
75907f0e80 tests: do not use noudevsync with udev system
Remove --noudevsync option - as this breaks synchronization with
udev which is necessary when trying to i.e. create  _rmeta_3
and wipe it - as the symlinks must be present for wiping.

So if there was some other issue  (behind the comment) - we need to
check for the problem elsewhere instead of disabling udev sync.
2024-12-04 16:14:22 +01:00
Zdenek Kabelac
45344262cc debug: missing stack 2024-12-04 16:14:22 +01:00
Marian Csontos
c695c7a252 doc: Update WHATS_NEW and Release notes 2024-12-03 13:07:03 +01:00
Zdenek Kabelac
94da2c9792 configure: autoreconf 2024-11-26 14:39:09 +01:00
Zdenek Kabelac
ce8e6c8c63 configure.ac: build lvmlockd with notify
Automatically use --enable-notify-dbus when building lvmlockd
if not configured otherwise by a configure user -
as the lvmlockd.service is notify based.
2024-11-26 14:38:23 +01:00
Marian Csontos
60cd279f96 test: Prevent incorrect value propagating into test
In case dbus-send is not present previous random value of i was tested.
2024-11-26 13:25:49 +01:00
Marian Csontos
25638f6a87 spec: Remove [Build]Requires for cluster 2024-11-26 10:59:05 +01:00
David Teigland
47c4f737c9 lvmlockd: allow test mode when dlm is not built 2024-11-25 12:08:43 -06:00
David Teigland
a6e918cd48 man: lvmraid integrity updates 2024-11-25 10:22:43 -06:00
Vojtech Trefny
c77f2697ee dbus: Add function for running lconvert --repair on RAID LVs 2024-11-25 14:22:29 +00:00
Zdenek Kabelac
9259892627 tests: increase mirror size
On fast machines mirror throttling starts to react much later
so try bigger mirror size to fight with race in test.
2024-11-25 14:16:55 +01:00
Zdenek Kabelac
2c06950888 man: update display fields
The --sort option belongs to  '-C' columned output only.
Also add short commmand description for specialized
vg/pv/lvdisplay command.
2024-11-25 14:03:51 +01:00
Zdenek Kabelac
5893ca17da make: generate 2024-11-22 14:25:54 +01:00
Zdenek Kabelac
e8e4324d68 tools: enhance lvdisplay vgdisplay pvdisplay
Split description for display commands so we can better describe
it's usage and combination of individual options in man page.

Now we can separately describe:

lvdisplay, lvdisplay -c, lvdisplay -C
vgdisplay, vgdisplay -c, vgdisplay -C
pvdisplay, pvdisplay -c, pvdisplay -C

TODO: Drop validation from command code itself.
2024-11-22 14:25:54 +01:00
Zdenek Kabelac
502543ffed args: add colon and column for pv/vg/lvdisplay
Better description for --colon and --column option for
pvdisplay, vgdisplay, lvdisplay.
2024-11-22 14:25:54 +01:00
Zdenek Kabelac
03a3863804 man: clean
Both branches printed new line.
2024-11-22 14:25:54 +01:00
Zdenek Kabelac
ebadd3ccc6 man: refactor check for variant
Remove unnecessary checks and move the comment to the 1st. check.
2024-11-22 14:25:54 +01:00
Zdenek Kabelac
c4d4bddfce man: refactor printing option
When generating man pages, use a single function to print
option with its short & long name.
2024-11-22 14:25:54 +01:00
Zdenek Kabelac
efe5af819a man: enhance handling of option description
Update the _print_man_option_desc() to also handle common parts
as the initial text without any specified section and also
add support for '#\n' to be able to revert to common part.
2024-11-22 14:25:54 +01:00
Zdenek Kabelac
ca5d258376 test: shellcheck: use quotation marks 2024-11-15 14:11:30 +01:00
Zdenek Kabelac
4c31e6d56a test: shellcheck: add shell directive
Also add forgotten standard copyright message with shell reference.
2024-11-15 14:10:49 +01:00
Zdenek Kabelac
51a684ef0f shellcheck: separate declaration and assign
So the error exit code can be processed if needed...
2024-11-15 14:10:39 +01:00
Zdenek Kabelac
dfc132a514 shellcheck: validate cd success 2024-11-15 14:10:31 +01:00
Zdenek Kabelac
473e93fbff WHATS_NEW: update 2024-11-13 13:06:15 +01:00
Zdenek Kabelac
270f9306bc tests: improve tracing messages
Avoid printing lvm2 command trace, if the test finds the 'dmeventd'
was started unxpectedly during testing as the last command is hardly
ever responsible for this

Also reorder some messages when doing teardown of devices.

Do not print 'help' message from hostname command, when it does
not support option '-I'.
2024-11-13 13:00:42 +01:00
Zdenek Kabelac
7b9bdcb4d4 tests: check _tdata conversion to raid1 2024-11-13 13:00:42 +01:00
Zdenek Kabelac
c2f41c1a59 raid: fix name rotation
Since we now keep lv names valid all the time (as they are part
of radix_tree) - there is a problem with this renaming code, that
for a moment used duplicated name in vg struct.

Fix it by interating LVs backwared - which avoids breaking consitency
and also actually makes code more simple.
2024-11-13 13:00:42 +01:00
Zdenek Kabelac
cbfc31ee2b tests: aux check for leaked symlinks
Add check for 'leaked' symlinks after test and trap
the case when some 'danglink' links are present.
This might be some problem with udev synchronization
or some other strange race.

All such symlinks will be also removed so they will not
influence following tests.
2024-11-08 19:41:50 +01:00
Zdenek Kabelac
dcac774f09 tests: check vdo minimum_io_size 2024-11-08 19:41:50 +01:00
Zdenek Kabelac
e4b5f8a485 debug: remove unused define 2024-11-08 19:41:50 +01:00
Zdenek Kabelac
c3ed3f28a2 device_mapper: suppress warns about inactive query
When command prints warning about suppressing query
for inactive table, because this is not supported
by kernel - 1 printed message is just enough, no
reason to 'spam' command output all the time, message
will remain only in debug log.

Also drop 'WARNING:' from real 'error' message.
WARNIGS are supposed to be just warning and command
then exists with 'success'.
2024-11-08 19:41:50 +01:00
Zdenek Kabelac
158d3243b6 vdo: fix input units for minimim_io_size
When specifying minimum_io_size with --vdosettings,
command assumed wrong unit (sectors).

So '--vdosettings minimum_io_size=512|4096' resulted into
an error that only 512 or 4096 values are allowed, but
at the same time values  1 or 8 were accepted.

So fix by converting any number >= 512 to 'sectors' and
keep input of 1 or 8 still valid if anyone has been using
this before.

So now we take  512 or 4096  and still also  1 or 8 with the
same effect.

Also correct the 'error' message when invalid minimum_io_size
is specified.
2024-11-08 19:41:18 +01:00
Peter Rajnoha
44a04b71f8
WHATS_NEW: update 2024-11-07 07:57:34 +01:00
Peter Rajnoha
a2ca20dad9
tests: remove superfluous -a option for df used in lvresize-xfs.sh
The df -a looks at whole system and it returns an error code in case
there's an inaccessible fs which is not even part of the testing environment.
The -a for df is not actually needed here in the lvresize-xfs test, so remove it.
2024-11-07 07:57:34 +01:00