]> sourceware.org Git - lvm2.git/log
lvm2.git
3 years agomakefiles: improved hyphenation replacement
Zdenek Kabelac [Wed, 14 Apr 2021 12:39:17 +0000 (14:39 +0200)]
makefiles: improved hyphenation replacement

Sed replacements script missed to properly replace several '-' to '\-'.
Replace it with simpler set of regexes.

Also add new target 'make checksed' for testing with examples,
where the replacement should or should not occure for easier testing.

3 years agoremove unused flag DEV_UDEV_INFO_MISSING
David Teigland [Fri, 16 Apr 2021 21:01:19 +0000 (16:01 -0500)]
remove unused flag DEV_UDEV_INFO_MISSING

3 years agoman/help: change LV type listing
David Teigland [Wed, 14 Apr 2021 21:34:04 +0000 (16:34 -0500)]
man/help: change LV type listing

Previously, accepted LV types were presented as a series of suffixes
after the "LV" on the command line.  The addition of many new types
resulted in this becoming too long, e.g

  lvconvert --type cache --cachepool LV LV_linear_striped_thinpool_vdo_vdopool_vdopooldata_raid

For man pages, move these types from the command line to a new line
dedicated to listing accepted LV types:

  lvconvert --type cache --cachepool LV LV1
  ...

  LV1 types: linear striped thinpool vdo vdopool vdopooldata raid

The special "LV1" is used as a reference to avoid confusion
with other LVs that may appear on the command line.  There
are currently no commands with more than one typed LV, but
if there are cases with more, then "LV2" could also be used.

For command line usage/-h output, drop the LV types from the
command line specification.  The more detailed is not needed
in the help output and can be found in the man page.

3 years agoman: typography
Zdenek Kabelac [Tue, 13 Apr 2021 13:26:54 +0000 (15:26 +0200)]
man: typography

With to use .TP where it's easy and doesn't change layout
(since .HP is marked as deprecated) - but .TP is not always perfetc match.

Avoid submitting empty lines to troff and replace them mostly with .P
and use '.' at line start to preserve 'visual' presence of empty line
while editing man page manually when there is no extra space needed.

Fix some markup.

Add some missing SEE ALSO section.

Drop some white-space at end-of-lines.

Improve hyphenation logic so we do not split options.

Use '.IP numbers' only with first one the row (others in row
automatically derive this value)

Use automatic enumeration for .SH titles.

Guidelines in-use:
https://man7.org/linux/man-pages/man7/groff.7.html
https://www.gnu.org/software/groff/manual/html_node/Man-usage.html
https://www.gnu.org/software/groff/manual/html_node/Lists-in-ms.html

3 years agomakefiles: fix replacing path for LVM_PATH
Zdenek Kabelac [Tue, 13 Apr 2021 13:26:05 +0000 (15:26 +0200)]
makefiles: fix replacing path for LVM_PATH

Man pages were generated with incorrect LVM_PATH.

3 years agoWHATS_NEW: update
Zdenek Kabelac [Wed, 14 Apr 2021 08:28:37 +0000 (10:28 +0200)]
WHATS_NEW: update

3 years agoRevert "thinpool: support lvconvert without zeroing"
Zdenek Kabelac [Wed, 14 Apr 2021 08:26:16 +0000 (10:26 +0200)]
Revert "thinpool: support lvconvert without zeroing"

This reverts commit 8e7690b7980ad3bc6e7c38d6e2028f885751c355.

Actully this was bad idea - to make it on pair.
-Zn for thin-pools is already used - so here user must have
create new pool and swap existing thin-pool metadata into.

So reverting this commit to avoid any possible regression.

3 years agoRevert "tests: add check for lvconvert without zeroing"
Zdenek Kabelac [Wed, 14 Apr 2021 08:53:21 +0000 (10:53 +0200)]
Revert "tests: add check for lvconvert without zeroing"

This reverts commit accf324ccba681ad06cd8bcb27ead17ec191a471.

3 years agotests: race on md raid still being hit on 5.12-rc6
Zdenek Kabelac [Mon, 12 Apr 2021 10:04:50 +0000 (12:04 +0200)]
tests: race on md raid still being hit on 5.12-rc6

Still hits the race in initialization:

kernel BUG at drivers/md/raid5.c:7549!
invalid opcode: 0000 [#1] SMP PTI
CPU: 0 PID: 525149 Comm: dmsetup Tainted: G           OEi
    --------- ---  5.12.0-0.rc6.184.fc35.x86_64 #1
Hardware name: Red Hat KVM, BIOS 0.5.1 01/01/2007
RIP: 0010:raid5_run+0x40b/0x4b0 [raid456]
Code: 00 8b 83 3c 01 00 00 39 83 bc 00 00 00 0f 85 ac 00 00 00
      48 c7 44 24 08 00 00 00 00 8b bb 30 01 00 00 85 ff 0f 84
      88 fd ff ff <0f> 0b 48 8b 43 48 48 c7 c6 40 93 92 c0 48
      c7 c7 70 2c 93 c0 48 85
Call Trace:
 md_run+0x4d6/0xbc0
 ? super_validate+0x2e1/0x4b0 [dm_raid]
 raid_ctr+0x133e/0x281b [dm_raid]
 dm_table_add_target+0x167/0x330
 table_load+0x103/0x350
 ctl_ioctl+0x1b4/0x430
 ? dev_suspend+0x2c0/0x2c0
 dm_ctl_ioctl+0xa/0x10
 __x64_sys_ioctl+0x82/0xb0
 do_syscall_64+0x33/0x40
 entry_SYSCALL_64_after_hwframe+0x44/0xae

3 years agomake: generate
Zdenek Kabelac [Mon, 12 Apr 2021 09:11:51 +0000 (11:11 +0200)]
make: generate

Oops, previous generate was not correct.

3 years agotests: enable for 5.12+ kernels
Zdenek Kabelac [Mon, 12 Apr 2021 08:47:06 +0000 (10:47 +0200)]
tests: enable for 5.12+ kernels

Should not longer kill kernel.

3 years agomakefiles: add devmapper for devmapper-event
Zdenek Kabelac [Mon, 12 Apr 2021 08:35:55 +0000 (10:35 +0200)]
makefiles: add devmapper  for devmapper-event

Older linkers do not take this dependency automatically from
libdevmapper-event so need to be passed with linker command.

3 years agoWHATS_NEW: updates
Zdenek Kabelac [Mon, 12 Apr 2021 07:49:23 +0000 (09:49 +0200)]
WHATS_NEW: updates

3 years agomake: generate
Zdenek Kabelac [Thu, 8 Apr 2021 19:08:48 +0000 (21:08 +0200)]
make: generate

3 years agoman: hyphenation improvements
Zdenek Kabelac [Sat, 10 Apr 2021 22:15:51 +0000 (00:15 +0200)]
man: hyphenation improvements

3 years agoman-generator: spaces
Zdenek Kabelac [Sun, 11 Apr 2021 18:10:21 +0000 (20:10 +0200)]
man-generator: spaces

3 years agoman-generator: option description indented
Zdenek Kabelac [Sun, 11 Apr 2021 17:53:16 +0000 (19:53 +0200)]
man-generator: option description indented

Left indention is needed only for options, but is actually
unwanted for decription itself.

3 years agoman-generator: remove ',' between some options
Zdenek Kabelac [Sun, 11 Apr 2021 12:28:51 +0000 (14:28 +0200)]
man-generator: remove ',' between some options

It would be complicated to handle ',' alignment after hyphenation
changes ATM, but these commas seems to be there rather unneeded
so remove them and make the man output more clear.

3 years agoman-generator: improve hyphenation for longer option list
Zdenek Kabelac [Sat, 10 Apr 2021 22:47:00 +0000 (00:47 +0200)]
man-generator: improve hyphenation for longer option list

Disable hyphenation around longer option lists (>42 chars)
and use \: to markup places for line splits.

The code ATM is somewhat mixtured so it's not easy to encapsulate
section .nh ... .hy.

ATM global _was_hyphen is used to properly finish sections after
disabled hyphenation.

3 years agoman: use commas in SEE ALSO
Zdenek Kabelac [Sun, 11 Apr 2021 19:11:02 +0000 (21:11 +0200)]
man: use commas in SEE ALSO

Add ',' between each ref.
Use left alignment and no hyphenation.

3 years agomakefiles: no need for double Q
Zdenek Kabelac [Sun, 11 Apr 2021 20:29:04 +0000 (22:29 +0200)]
makefiles: no need for double Q

We already use $(Q) while calling macros

3 years agomakefiles: reuse CSCOPE_DIRS for ctags
Zdenek Kabelac [Fri, 9 Apr 2021 13:27:12 +0000 (15:27 +0200)]
makefiles: reuse CSCOPE_DIRS for ctags

Create ctags only from real source files.

3 years agomakefiles: deps also for cxx
Zdenek Kabelac [Fri, 9 Apr 2021 23:21:33 +0000 (01:21 +0200)]
makefiles: deps also for cxx

Generate deps also for .cxx.
Remove include dir deps - there is nothing to build.

3 years agolibdm: replace deprecated security_context_t
Zdenek Kabelac [Sat, 10 Apr 2021 19:55:19 +0000 (21:55 +0200)]
libdm: replace deprecated security_context_t

Use 'char *' instead of deprecated security_context_t.
In more details i.e.:

https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1776

3 years agoconfigure: make aio optional
Zdenek Kabelac [Sat, 10 Apr 2021 20:09:32 +0000 (22:09 +0200)]
configure: make aio optional

Add support for external AIO_CFLAGS and AIO_LIBS so user
can point to his own build - this might be useful when
user wants to use own libaio library.

3 years agoconfigure: better support for use of --without
Zdenek Kabelac [Thu, 8 Apr 2021 19:29:44 +0000 (21:29 +0200)]
configure: better support for use of --without

When --with-... option is used as --without-... it gets
assigned value 'no' - so support it better where we can.

Also remove 'shared' from help as it's not supported.

3 years agomakefiles: static linking enhancements
Zdenek Kabelac [Thu, 8 Apr 2021 17:44:53 +0000 (19:44 +0200)]
makefiles: static linking enhancements

3 years agotests: skip autoactivation-metadata with lvmlockd
David Teigland [Thu, 8 Apr 2021 21:08:45 +0000 (16:08 -0500)]
tests: skip autoactivation-metadata with lvmlockd

shared vgs are not autoactivated

3 years agoAdd metadata-based autoactivation property for VG and LV
David Teigland [Thu, 1 Apr 2021 22:20:00 +0000 (17:20 -0500)]
Add metadata-based autoactivation property for VG and LV

The autoactivation property can be specified in lvcreate
or vgcreate for new LVs/VGs, and the property can be changed
by lvchange or vgchange for existing LVs/VGs.

 --setautoactivation y|n
 enables|disables autoactivation of a VG or LV.

Autoactivation is enabled by default, which is consistent with
past behavior.  The disabled state is stored as a new flag
in the VG metadata, and the absence of the flag allows
autoactivation.

If autoactivation is disabled for the VG, then no LVs in the VG
will be autoactivated (the LV autoactivation property will have
no effect.)  When autoactivation is enabled for the VG, then
autoactivation can be controlled on individual LVs.

The state of this property can be reported for LVs/VGs using
the "-o autoactivation" option in lvs/vgs commands, which will
report "enabled", or "" for the disabled state.

Previous versions of lvm do not recognize this property.  Since
autoactivation is enabled by default, the disabled setting will
have no effect in older lvm versions.  If the VG is modified by
older lvm versions, the disabled state will also be dropped from
the metadata.

The autoactivation property is an alternative to using the lvm.conf
auto_activation_volume_list, which is still applied to to VGs/LVs
in addition to the new property.

If VG or LV autoactivation is disabled either in metadata or in
auto_activation_volume_list, it will not be autoactivated.

An autoactivation command will silently skip activating an LV
when the autoactivation property is disabled.

To determine the effective autoactivation behavior for a specific
LV, multiple settings would need to be checked:
the VG autoactivation property, the LV autoactivation property,
the auto_activation_volume_list.  The "activation skip" property
would also be relevant, since it applies to both normal and auto
activation.

3 years agolibdm: fix compiling with older gcc
Zdenek Kabelac [Tue, 6 Apr 2021 20:31:23 +0000 (22:31 +0200)]
libdm: fix compiling with older gcc

3 years agoWHATS_NEW: updates
Zdenek Kabelac [Tue, 6 Apr 2021 19:20:18 +0000 (21:20 +0200)]
WHATS_NEW: updates

3 years agotests: pvmove updates
Zdenek Kabelac [Thu, 1 Apr 2021 09:33:40 +0000 (11:33 +0200)]
tests: pvmove updates

Switch to plain 'kill' we should no longer need SIGKILL
as polling can be interrupted.

Resolve problem in aux wait_pvmove_lv_ready() that was using
lvm command to check for UUID - but this was interferring with
VG lock and it's been delaying confirmation.

So reducing slow-down of test - so it can run faster.

3 years agolib: remove unused macros
Zdenek Kabelac [Sat, 3 Apr 2021 19:25:26 +0000 (21:25 +0200)]
lib: remove unused macros

Internally lvm2 is not using versioning for device-mapper.

3 years agomakefiles: remove unneeded var changes
Zdenek Kabelac [Sun, 4 Apr 2021 11:13:38 +0000 (13:13 +0200)]
makefiles: remove unneeded var changes

3 years agomakefiles: cscope only predefined dirs
Zdenek Kabelac [Sun, 4 Apr 2021 09:25:54 +0000 (11:25 +0200)]
makefiles: cscope only predefined dirs

Avoid scanning for source duplicates in various build dirs.

3 years agomakefiles: plugins can be build after shared library
Zdenek Kabelac [Sat, 3 Apr 2021 20:55:20 +0000 (22:55 +0200)]
makefiles: plugins can be build after shared library

3 years agopolldaemon: improve support for interruptions
Zdenek Kabelac [Tue, 6 Apr 2021 12:57:42 +0000 (14:57 +0200)]
polldaemon: improve support for interruptions

Enhance handling of interruptions of polling process and lvmpoll daemon.
Daemon should now react much faster on interrups (i.e. shutdown
sequence) and avoid taking lenghty sleep waiting on pvmove signaling.

3 years agomirror_percent: support interruptible check
Zdenek Kabelac [Tue, 6 Apr 2021 12:47:11 +0000 (14:47 +0200)]
mirror_percent: support interruptible check

When checking for mirror percentage with WAITEVENT (i.e. during pvmove)
handle intrruption (^C) of such wait.

3 years agodaemon-server: handle reaping threads better
Zdenek Kabelac [Thu, 1 Apr 2021 09:32:47 +0000 (11:32 +0200)]
daemon-server: handle reaping threads better

Avoid sleeping in pselect when thread missed reap() handling.
This speedup handling of daemon shutdown sequences.

3 years agosignals: support also SIGTERM for breaking command
Zdenek Kabelac [Thu, 1 Apr 2021 09:32:29 +0000 (11:32 +0200)]
signals: support also SIGTERM for breaking command

If we are signaled with SIGTERM it should be at least as good
as with SIGINT - as the command should stop ASAP.
So when lvm2 command allows signal handling we also
enable SIGTERM handling. If there are some other signals
we should handle equally -  we could just extend array.

3 years agolvreduce: support --yes
Zdenek Kabelac [Tue, 6 Apr 2021 10:26:42 +0000 (12:26 +0200)]
lvreduce: support --yes

Missed support for --yes with 'lvreduce' to answer 'y' to prompt.

3 years agolibdm: eliminate some abi-dumper errors
Zdenek Kabelac [Sat, 3 Apr 2021 12:25:56 +0000 (14:25 +0200)]
libdm: eliminate some abi-dumper errors

ABI dumper does not like missing enum/union/struct names,
so add them with _e, _u suffix.

Usage reference:

https://doc.dpdk.org/guides-16.04/contributing/versioning.html

3 years agosymver: sorting
Zdenek Kabelac [Sun, 4 Apr 2021 09:26:45 +0000 (11:26 +0200)]
symver: sorting

3 years agosymver: restore and uncomment some symbols
Zdenek Kabelac [Sat, 3 Apr 2021 19:51:06 +0000 (21:51 +0200)]
symver: restore and uncomment some symbols

3 years agomakefiles: add check for versioned symbols
Zdenek Kabelac [Tue, 6 Apr 2021 12:39:44 +0000 (14:39 +0200)]
makefiles: add check for versioned symbols

Simple check produced library has the latest symbol as well as its versioned
older version with check for dm_stats_create_region().

3 years agomakefiles: slight change in .export.sym
Zdenek Kabelac [Sun, 4 Apr 2021 11:06:09 +0000 (13:06 +0200)]
makefiles: slight change in .export.sym

Avoid emitting Local symbol and sort symbols from
start and add dependency on previous version
Should not change anything, just better followup
linkage guidlines.

3 years agolibdm: move dm_task_get_info_with_deferred_remove
Zdenek Kabelac [Fri, 2 Apr 2021 22:01:00 +0000 (00:01 +0200)]
libdm: move dm_task_get_info_with_deferred_remove

Version is only needed for dm_task_get_info().
dm_task_get_info_with_deferred_remove() shall be compiled for
non-versioned library as well.

3 years agolibdm: symbol versioning with -flto
Zdenek Kabelac [Sat, 3 Apr 2021 19:49:37 +0000 (21:49 +0200)]
libdm: symbol versioning with -flto

Gcc10 introduced different strategy how to build
shared libraries with their new LTO optimizer.

Insired by:

https://akkadia.org/drepper/symbol-versioning
https://sourceware.org/pipermail/elfutils-devel/attachments/20200414/1c0c2903/attachment.bin
https://github.com/InBetweenNames/gentooLTO/issues/459
https://github.com/linux-rdma/rdma-core/blob/master/util/symver.h
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48200

3 years agohints: don't use hints when --sysinit is used
David Teigland [Thu, 1 Apr 2021 19:37:24 +0000 (14:37 -0500)]
hints: don't use hints when --sysinit is used

Devices are not in a steady state during system init,
so hints are repeatedly invalidated, and hardly used,
so maintaining them is wasted effort.

3 years agoall: fix typos
Samanta Navarro [Sat, 3 Oct 2020 11:52:37 +0000 (11:52 +0000)]
all: fix typos

3 years agoman: show config options with comments
Zdenek Kabelac [Tue, 30 Mar 2021 11:01:31 +0000 (13:01 +0200)]
man: show config options with comments

3 years agoman: describe profile support lvmcache.7
Zdenek Kabelac [Mon, 29 Mar 2021 16:55:47 +0000 (18:55 +0200)]
man: describe profile support lvmcache.7

Add missing description for profile usage with cache pool.
List cache-pools as first option for dm-cache as it provides
better performance and more functionality over cachevols.

3 years agoman: writecache missed for --type
Zdenek Kabelac [Tue, 30 Mar 2021 09:22:27 +0000 (11:22 +0200)]
man: writecache missed for --type

Add missing writecache type into man pages.

3 years agolibdm: use libdm header util.h
Zdenek Kabelac [Mon, 29 Mar 2021 20:43:36 +0000 (22:43 +0200)]
libdm: use libdm header util.h

Avoid using lvm header for libdm build.

3 years agodevice_mapper: remove unused lines
Zdenek Kabelac [Mon, 29 Mar 2021 20:02:45 +0000 (22:02 +0200)]
device_mapper: remove unused lines

No need for versioning history in internal version.

3 years agoconfigure: support builds without versioning
Zdenek Kabelac [Mon, 29 Mar 2021 19:46:12 +0000 (21:46 +0200)]
configure: support builds without versioning

Not all libc (like musl, uclibc dietlibc) libraries support full symbol
version resolution in runtime like glibc.
Add support to not generate symbol versions when compiling against them.

Additionally libdevmapper.so was broken when compiled against
uclibc. Runtime linker loader caused calling dm_task_get_info_base()
function recursively, leading to segmentation fault.

Introduce --with-symvers=STYLE option, which allows to choose
between gnu and disabled symbol versioning. By default gnu symbol
versioning is used.
__GNUC__ check is replaced now with GNU_SYMVER.
Additionally ld version script is included only in
case of gnu option, which slightly reduces output size.

Providing --without-symvers to configure script when building against
uclibc library fixes segmentation fault error described above, due to
lack of several versions of the same symbol in libdevmapper.so
library.

Based on:
https://patchwork.kernel.org/project/dm-devel/patch/20180831144817.31207-1-m.niestroj@grinn-global.com/

Suggested-by: Marcin Niestroj <m.niestroj@grinn-global.com>
3 years agotests: sleep tunning
Zdenek Kabelac [Sun, 28 Mar 2021 10:18:40 +0000 (12:18 +0200)]
tests: sleep tunning

Check different sleep properties for lvmpolld.
Use aux remove_dm_devs.

3 years agotests: add aux remove_dm_devs
Zdenek Kabelac [Sun, 28 Mar 2021 11:29:44 +0000 (13:29 +0200)]
tests: add aux remove_dm_devs

Add function to remove DM devices and dies
if some device can't be removed.

3 years agotests: bash quotes
Zdenek Kabelac [Sun, 28 Mar 2021 00:09:42 +0000 (01:09 +0100)]
tests: bash quotes

3 years agotests: test_pv_symlinks works only with /dev dir
Zdenek Kabelac [Sat, 27 Mar 2021 23:18:38 +0000 (00:18 +0100)]
tests: test_pv_symlinks works only with /dev dir

Skip test with LVM_TEST_DEVDIR != /dev

3 years agotests: fix unfinished check for 4.18 kernel
Zdenek Kabelac [Sat, 27 Mar 2021 23:16:54 +0000 (00:16 +0100)]
tests: fix unfinished check for 4.18 kernel

3 years agotests: ensure raid is synchronized
Zdenek Kabelac [Sat, 27 Mar 2021 22:15:54 +0000 (23:15 +0100)]
tests: ensure raid is synchronized

3 years agotests: reoder killing order
Zdenek Kabelac [Sat, 27 Mar 2021 21:33:37 +0000 (22:33 +0100)]
tests: reoder killing order

We need to stop pvmove while still in progress,
so restart lvmpolld after pvmoving devices are gone

3 years agotests: fight with losetup creation error
Zdenek Kabelac [Sat, 27 Mar 2021 20:59:23 +0000 (21:59 +0100)]
tests: fight with losetup creation error

Try losetup few times in loop if we can succeed.

3 years agotests: restore removed prefix
Zdenek Kabelac [Sat, 27 Mar 2021 20:58:33 +0000 (21:58 +0100)]
tests: restore removed prefix

During debugging this prefix was unintentionally lost, restore.

3 years agotests: use known path for test in find
Zdenek Kabelac [Sat, 27 Mar 2021 20:33:28 +0000 (21:33 +0100)]
tests: use known path for test in find

Actually make sure which 'test' binary is executed.
Since we used to have 'test' binary in tests.

3 years agotests: for 4.18 use already 1.20 logic
Zdenek Kabelac [Sat, 27 Mar 2021 18:28:43 +0000 (19:28 +0100)]
tests: for 4.18 use already 1.20 logic

Looks like there was some missed versioning increase during devel.
So with kernel >= 4.18 version 1.19 is enough to look like 1.20

However backported 1.19 targets seems to not provide all
the capabilities.

3 years agotests: correct thin-pool version
Zdenek Kabelac [Fri, 26 Mar 2021 23:33:18 +0000 (00:33 +0100)]
tests: correct thin-pool version

Use thin-pool target version 1.20 for changed behavior.

3 years agotests: increase mirror throttling
Zdenek Kabelac [Fri, 26 Mar 2021 23:29:28 +0000 (00:29 +0100)]
tests: increase mirror throttling

3 years agotests: more skipped tests for lvmpolld
Zdenek Kabelac [Fri, 26 Mar 2021 21:13:37 +0000 (22:13 +0100)]
tests: more skipped tests for lvmpolld

3 years agotests: use shell comment
Zdenek Kabelac [Fri, 26 Mar 2021 21:12:42 +0000 (22:12 +0100)]
tests: use shell comment

3 years agotests: update dbus test_nesting
Zdenek Kabelac [Fri, 26 Mar 2021 19:21:57 +0000 (20:21 +0100)]
tests: update dbus test_nesting

Test has to use PV with suffix  pv[0..9]  otherwise
it's ignored by test suite filter.

Better fix for VG names to use prefix LVMTEST.

Skip the test for runs without LVM_TEST_DEVDIR != /dev

3 years agotests: update for newer thin-pool
Zdenek Kabelac [Fri, 26 Mar 2021 15:53:18 +0000 (16:53 +0100)]
tests: update for newer thin-pool

Newer thin-pool handle metadata read-only recovery better.

3 years agotests: use blkid without caching
Zdenek Kabelac [Fri, 26 Mar 2021 15:12:47 +0000 (16:12 +0100)]
tests: use blkid without caching

Always use blkid without caching to avoid poluting
cache stored in /run/blkid or /etc on older distros

3 years agotests: use aux mdadm_assemble wrapper
Zdenek Kabelac [Fri, 26 Mar 2021 15:07:24 +0000 (16:07 +0100)]
tests: use aux mdadm_assemble wrapper

3 years agotests: add aux mdadm_assemble
Zdenek Kabelac [Fri, 26 Mar 2021 15:05:42 +0000 (16:05 +0100)]
tests: add aux mdadm_assemble

Wrapper for slowed version of mdadm --assemble

3 years agotests: better reporting of problematic services
Zdenek Kabelac [Fri, 26 Mar 2021 15:06:46 +0000 (16:06 +0100)]
tests: better reporting of problematic services

3 years agotests: skip more tests for lvmpolld pass
Zdenek Kabelac [Fri, 26 Mar 2021 15:05:28 +0000 (16:05 +0100)]
tests: skip more tests for lvmpolld pass

These test do not test polling, so skip them for lvmpolld pass.

3 years agotests: add commented example
Zdenek Kabelac [Fri, 26 Mar 2021 12:16:44 +0000 (13:16 +0100)]
tests: add commented example

How to run individual test.

3 years agotests: dbus update
Zdenek Kabelac [Fri, 26 Mar 2021 12:13:26 +0000 (13:13 +0100)]
tests: dbus update

Always use  PREFIX for vg header - all tests must use this prefix,
VGs without are not allowed.

Modify pv_symlink test - as the test was checking unsupportable
combination - since lvm2 commands withing testsuite are only
allowed to manipulate with /dev/mapper/LVMTESTXXXX path -
nothing else allowed and fails on being filtered.

3 years agotests: try to observe some unusual problem
Zdenek Kabelac [Fri, 26 Mar 2021 10:36:22 +0000 (11:36 +0100)]
tests: try to observe some unusual problem

Lets see, why it's very occasionaly able to active LV.

3 years agotests: move setting of dmeventd pid
Zdenek Kabelac [Fri, 26 Mar 2021 10:16:32 +0000 (11:16 +0100)]
tests: move setting of dmeventd pid

Added comment the  'lvs' already initiates dmeventd

Note: we don't have any query mechanism to check if dmeventd
is already running except access of socket which basically
starts dmeventd if it's not running.

3 years agotests: add basic validation of running services
Zdenek Kabelac [Fri, 26 Mar 2021 10:13:56 +0000 (11:13 +0100)]
tests: add basic validation of running services

For determinist test results lvm2/dm service shall not be present
and running in the system as it may randomize test results.

In case they are found present, this test ends with warning (not failure).

3 years agotests: add should for racy test
Zdenek Kabelac [Thu, 25 Mar 2021 23:43:44 +0000 (00:43 +0100)]
tests: add should for racy test

Depending on kernel, the race may or may not happen.

3 years agotests: add workaround for older mdadm
Zdenek Kabelac [Thu, 25 Mar 2021 23:35:28 +0000 (00:35 +0100)]
tests: add workaround for older mdadm

Some older instancies of 'mdadm' opened legs in RW and
closed and opened again and expected exlusive access.
But here udev rule can be fired - so on these versions
slow down whole mdadm runtime by using strace, to
give system a bit more time to finish udev rule.

3 years agotests: aux fix check_lvmpolld_init_rq_count
Zdenek Kabelac [Thu, 25 Mar 2021 23:33:21 +0000 (00:33 +0100)]
tests: aux fix check_lvmpolld_init_rq_count

Make check_lvmpolld_init_rq_count() more compatible with older gawk,
where some functionality was not working properly.
Also change 'not not' condition.

3 years agoWHATS_NEW: updates
Zdenek Kabelac [Wed, 24 Mar 2021 15:30:23 +0000 (16:30 +0100)]
WHATS_NEW: updates

3 years agotests: improve check raid_leg_status
Zdenek Kabelac [Wed, 24 Mar 2021 15:05:03 +0000 (16:05 +0100)]
tests: improve  check raid_leg_status

Enhance function to wait until raid status gets consisten
(shifts from 0/xxxxx to something else)

If it would took too long fail the check.

3 years agotests: handle case of missing /dev/disk
Zdenek Kabelac [Wed, 24 Mar 2021 14:52:14 +0000 (15:52 +0100)]
tests: handle case of missing /dev/disk

In case there is no symlink - udev can optimize /dev/disk away,
thus find would fail in teardown.

3 years agotests: check fsadm with missing filesystem
Zdenek Kabelac [Wed, 24 Mar 2021 15:33:16 +0000 (16:33 +0100)]
tests: check fsadm with missing filesystem

3 years agofsadm: handle error from blkid
Zdenek Kabelac [Wed, 24 Mar 2021 15:26:17 +0000 (16:26 +0100)]
fsadm: handle error from blkid

Fsadm wants to print its own error message when it can't detect
type of the filesystem on a block device.
Otherwise fsadm exits with no message on an unused block device.

3 years agofsadm: fix condition when using --getsize64
Zdenek Kabelac [Wed, 24 Mar 2021 15:11:55 +0000 (16:11 +0100)]
fsadm: fix condition when using --getsize64

When blocksize --getsize64 gives empty result we want to fallback
to ancient  --getsize * --getss  calculation (RHBZ #1942486).

Reported by: ajschorr@alumni.princeton.edu

3 years agotests: ignore incosistent raid status
Zdenek Kabelac [Wed, 24 Mar 2021 11:08:40 +0000 (12:08 +0100)]
tests: ignore incosistent raid status

Just like lvm command ignores  0/xxxx report from judging the status.
Avoid using infinite loop and limit report checking to 100 checks.
If it would need more - something is not right.

3 years agotests: skip stray testing on real dev dir
Zdenek Kabelac [Wed, 24 Mar 2021 10:57:46 +0000 (11:57 +0100)]
tests: skip stray testing on real dev dir

Do not modify /dev dir maintained by udev.

3 years agotests: remove more file in teardonw
Zdenek Kabelac [Tue, 23 Mar 2021 23:39:01 +0000 (00:39 +0100)]
tests: remove more file in teardonw

Our tests may result in producation of huge set of
invalid links in /dev/disk directory depeding on version
of udev and various kinds of failures.

Also we happen to invoke some on-system pvscans generating
local /etc/lvm/archive & backups - remove them when
test is finished.

3 years agotests: query info instead of table
Zdenek Kabelac [Tue, 23 Mar 2021 23:37:24 +0000 (00:37 +0100)]
tests: query info instead of table

No need to access table when we just check presence,
so generate smaller error message about missing device.

3 years agotests: this test has race in it depending on kernel
Zdenek Kabelac [Tue, 23 Mar 2021 20:32:51 +0000 (21:32 +0100)]
tests: this test has race in it depending on kernel

Some kernel seems to keep 'lvextend' busy so long,
that actual resize already happens.

So ATM use 'should'  until something better is invented.

3 years agotests: aux clean DM on top of MD
Zdenek Kabelac [Tue, 23 Mar 2021 20:28:28 +0000 (21:28 +0100)]
tests: aux clean DM on top of MD

Before cleaning MD, try to remove any DM on top such MD.
Check is made through DM table check.
Maybe parse /proc/mdstat for this???

3 years agotests: wipefs with udev_wait
Zdenek Kabelac [Tue, 23 Mar 2021 13:57:10 +0000 (14:57 +0100)]
tests: wipefs with udev_wait

Try to synchronize with colliding udev.
Also retry once if there is some failure with some
sleep between next retry.

Use oflag=direct for wipping without wipefs.

3 years agotests: increase required version
Zdenek Kabelac [Tue, 23 Mar 2021 13:39:13 +0000 (14:39 +0100)]
tests: increase required version

Seems like version 1.13.2 remains crashing kernel - so increase
the required version for this reshaping test.

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