]> sourceware.org Git - lvm2.git/log
lvm2.git
3 years agoallocation: report allocation error instead of crash
Zdenek Kabelac [Mon, 1 Feb 2021 09:24:19 +0000 (10:24 +0100)]
allocation: report allocation error instead of crash

Current allocation limitation requires to fit metadata/log LV on
a single PV. This is usually not a big problem, but since
thin-pool and cache-pool is using this for allocating extents
for their metadata LVs it might be eventually causing errors
where the remaining free spaces for large metadata size is spread
over several PV.

3 years agopvmove: automatically resolve whole stacked LV
Zdenek Kabelac [Mon, 25 Jan 2021 00:17:14 +0000 (01:17 +0100)]
pvmove: automatically resolve whole stacked LV

When passing 'pvmove --name arg' try to automatically move
all associated dependencies with given LV.

i.e. 'pvmove --name thinpool vg vgnew'
moves all thins and data and metadata LV into a new VG vgnew.

3 years agocache: reuse code for metadata min_max
Zdenek Kabelac [Sat, 30 Jan 2021 15:32:51 +0000 (16:32 +0100)]
cache: reuse code for metadata min_max

Use update_pool_metadata_min_max() which is shared with
thin-pool metadata min-max updating.

Gives improved messages when converting volumes to metadata.

3 years agopool: limit pmspare to 16GiB
Zdenek Kabelac [Fri, 29 Jan 2021 22:20:18 +0000 (23:20 +0100)]
pool: limit pmspare to 16GiB

There is not much point to let allocate more then this size
even when i.e. converted LV is bigger then 16GiB (%extent_size)
ATM neither thin-pool nor cache-pool supports bigger metadata.

3 years agothin: improve 16g support for thin pool metadata
Zdenek Kabelac [Tue, 12 Jan 2021 16:59:29 +0000 (17:59 +0100)]
thin: improve 16g support for thin pool metadata

Initial support for thin-pool used slightly smaller max size 15.81GiB
for thin-pool metadata. However the real limit later settled at 15.88GiB
(difference is ~64MiB - 16448 4K blocks).

lvm2 could not simply increase the size as it has been using hard cropping
of the loaded metadata device to avoid warnings printing warning of kernel
when the size was bigger (i.e. due to bigger extent_size).

This patch adds the new lvm.conf configurable setting:
allocation/thin_pool_crop_metadata
which defaults to 0 -> no crop of metadata beyond 15.81GiB.
Only user with these sizes of metadata will be affected.

Without cropping lvm2 now limits metadata allocation size to 15.88GiB.
Any space beyond is currently not used by thin-pool target.
Even if i.e. bigger LV is used for metadata via lvconvert,
or allocated bigger because of to large extent size.

With cropping enabled (=1) lvm2 preserves the old limitation
15.81GiB and should allow to work in the evironement with
older lvm2 tools (i.e. older distribution).

Thin-pool metadata with size bigger then 15.81G is now using CROP_METADATA
flag within lvm2 metadata, so older lvm2 recognizes an
incompatible thin-pool and cannot activate such pool!

Users should use uncropped version as it is not suffering
from various issues between thin_repair results and allocated
metadata LV as thin_repair limit is 15.88GiB
Users should use cropping only when really needed!

Patch also better handles resize of thin-pool metadata and prevents resize
beoyond usable size 15.88GiB. Resize beyond 15.81GiB automatically
switches pool to no-crop version. Even with existing bigger thin-pool
metadata command 'lvextend -l+1 vg/pool_tmeta' does the change.

Patch gives better controls 'coverted' metadata LV and
reports less confusing message during conversion.

Patch set also moves the code for updating min/max into pool_manip.c
for better sharing with cache_pool code.

3 years agoman: update lvmthin
Zdenek Kabelac [Fri, 22 Jan 2021 23:40:52 +0000 (00:40 +0100)]
man: update lvmthin

Add few more notes about thin-pool repair.
Fix couple typos.

3 years agowritecache: use cleaner message instead of table reload
David Teigland [Wed, 27 Jan 2021 22:23:00 +0000 (16:23 -0600)]
writecache: use cleaner message instead of table reload

When detaching writecache, make the first stage send a message
to dm-writecache to set the cleaner option.  This is instead of
reloading the dm table with the cleaner option set.  Reloading
the table causes udev to process/probe the dm dev, which gets
stalled because of the writeback activity, and the stalled udev
in turn stalls the lvconvert command when it tries to sync with
udev events.

When getting writecache status we do not need to get
open_count or read_head info, which can cause extra steps.

3 years agolvdisplay: enhance LV status output for raid(0)
Heinz Mauelshagen [Tue, 26 Jan 2021 18:32:24 +0000 (19:32 +0100)]
lvdisplay: enhance LV status output for raid(0)

In case legs of a raid0 LV are removed, the lvdisplay command still
reports 'available' though raid0 is not providing any resilience
compared to the other raid levels.

Also lvdisplay does not display '(partial)' in case of missing raid0
legs as oposed to the lvs command.

Enhance lvdisplay to report "NOT available" for any RaidLV type in case
too many legs are inaccessible hence causing data loss.  I.e. any leg
for raid0, all for raid1, more than 1 for raid4/5, more than 2 for raid6
and in case of completely lost mirror groups for raid10.

Add test/shell/lvdisplay-raid.sh.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1872678

3 years agoWHATS_NEW: update
Zdenek Kabelac [Fri, 22 Jan 2021 15:09:38 +0000 (16:09 +0100)]
WHATS_NEW: update

3 years agopvscan: ensure read buffer ends with 0
Zdenek Kabelac [Thu, 21 Jan 2021 20:15:33 +0000 (21:15 +0100)]
pvscan: ensure read buffer ends with 0

Read buffersize - 1 so the last byte is always 0.
Simplify init of 0 buffers.
Check snprintf result for error and report internal error as it could
happen only via bad compile parameters.

3 years agofilters: avoid duplicated //
Zdenek Kabelac [Tue, 19 Jan 2021 23:41:23 +0000 (00:41 +0100)]
filters: avoid duplicated //

sysfs_dir already goes with '/sys/'.

3 years agopvscan: make ret value defined
Zdenek Kabelac [Tue, 19 Jan 2021 21:38:17 +0000 (22:38 +0100)]
pvscan: make ret value defined

3 years agotests: check support for online vdo rename
Zdenek Kabelac [Fri, 22 Jan 2021 14:07:43 +0000 (15:07 +0100)]
tests: check support for online vdo rename

kvdo 6.2.3 module version supports online rename.
Add cache and raid stacked renames.

3 years agovdo: support online rename
Zdenek Kabelac [Thu, 21 Jan 2021 20:18:05 +0000 (21:18 +0100)]
vdo: support online rename

New VDO targets v6.2.3 corrects support for online rename of VDO device.
If needed if can be disable via new lvm.conf setting:

vdo_disabled_features = [ "online_rename" ]

3 years agopools: fix removal of spare volume
Zdenek Kabelac [Fri, 22 Jan 2021 13:31:12 +0000 (14:31 +0100)]
pools: fix removal of spare volume

When removing pool LV from a stacked LV setup, it's been possible
to leak _pmspare and such hidden LV then required manual
user removal.

Fix it by moving automatic removal into _lv_reduce().

3 years agoconfig: avoid printing spaces before end of line
Zdenek Kabelac [Thu, 21 Jan 2021 20:51:20 +0000 (21:51 +0100)]
config: avoid printing spaces before end of line

Empty comments were generating unnecessary space char before new line.

3 years agopvck: fix warning and exit code for non-4k mda1 offset
David Teigland [Tue, 19 Jan 2021 17:21:20 +0000 (11:21 -0600)]
pvck: fix warning and exit code for non-4k mda1 offset

Print a warning if mda1 is not 4k, 8k or 64k.
Don't exit with an error for any unexpected mda1 offset.

3 years agolabel_scan: fix missing free of filtered_devs
David Teigland [Mon, 18 Jan 2021 22:26:02 +0000 (16:26 -0600)]
label_scan: fix missing free of filtered_devs

missing free of devl entries on filtered_devs list in
commit 2c9bb676048fda86867df165aa297f7078dffc4b

3 years agomake: generate
Marian Csontos [Mon, 18 Jan 2021 13:46:22 +0000 (14:46 +0100)]
make: generate

3 years agodevs: remove invalid path name aliases
David Teigland [Thu, 14 Jan 2021 19:26:42 +0000 (13:26 -0600)]
devs: remove invalid path name aliases

Make dev_cache_get() verify aliases and drop any
that are invalid before returning a dev for a given
name.

3 years agointegrity: fix segfault on error path when replacing images
David Teigland [Wed, 13 Jan 2021 19:33:19 +0000 (13:33 -0600)]
integrity: fix segfault on error path when replacing images

When adding replacement raid+integrity images (lvconvert --repair
after a raid image is lost), various errors can cause the function
to exit with an error.  On this exit path, the function attempts
to revert new images that had been created but not yet used.  The
cleanup failed to account for the fact that not all images needed
to be reverted.

3 years agotests: check full zeroing of thin-pool metadata
Zdenek Kabelac [Tue, 12 Jan 2021 23:19:38 +0000 (00:19 +0100)]
tests: check full zeroing of thin-pool metadata

Check zeroing works on whole thin-pool metadata device.

3 years agotests: check thin-pool corner case allocs
Zdenek Kabelac [Tue, 12 Jan 2021 22:26:16 +0000 (23:26 +0100)]
tests: check thin-pool corner case allocs

3 years agoalloc: enhance estimation of sufficient_pes_free
Zdenek Kabelac [Tue, 12 Jan 2021 14:58:07 +0000 (15:58 +0100)]
alloc: enhance estimation of sufficient_pes_free

Since commit 77fdc17d70e62cab75efaaf0dad02493b948610d always include
log_len size into needed extents - however now we may need sometimes
more extents then necessary - mainly when multiple PVs are involved
into allocation.

Add logs_still_needed into calculation of sufficient_pes_free()

3 years agolvmlockd: sscanf buffer size warnings
David Teigland [Fri, 8 Jan 2021 17:59:28 +0000 (11:59 -0600)]
lvmlockd: sscanf buffer size warnings

3 years agopost-release
Marian Csontos [Thu, 7 Jan 2021 17:09:07 +0000 (18:09 +0100)]
post-release

3 years agopre-release v2_03_11
Marian Csontos [Thu, 7 Jan 2021 16:22:29 +0000 (17:22 +0100)]
pre-release

3 years agolvconvert: chunksize option was missing with cachedevice
David Teigland [Thu, 7 Jan 2021 19:30:48 +0000 (13:30 -0600)]
lvconvert: chunksize option was missing with cachedevice

3 years agopartial flag for writecache and integrity
David Teigland [Fri, 11 Dec 2020 21:56:04 +0000 (15:56 -0600)]
partial flag for writecache and integrity

When a writecache sublv or an integrity metadata sublv
are partial (missing a dev), set the partial flag on
the upper level LV also, as is done for other sublvs.

3 years agoconfigure: update
Marian Csontos [Fri, 11 Dec 2020 11:16:16 +0000 (12:16 +0100)]
configure: update

3 years agowritecache: fix uncache for two step detach
David Teigland [Thu, 10 Dec 2020 21:37:23 +0000 (15:37 -0600)]
writecache: fix uncache for two step detach

Fix the two-step writecache detach in commit c32d7fed4f78b.
In the case of uncache, the cachevol is removed after
detaching the writecache.  When the detach is finished
in the second step, the remove must wait until then.

3 years agocache: activation cache_check on cachevol
David Teigland [Wed, 9 Dec 2020 23:36:09 +0000 (17:36 -0600)]
cache: activation cache_check on cachevol

When using cache with a cachevol, the cache_check tool was
not being run on the cache metadata during activation.
cache_check clears the needs_check flag in the cache
metadata, so if the flag was set due to an unclean
shutdown, the activation would fail.

3 years agotests: few more fsadm checks
Zdenek Kabelac [Mon, 7 Dec 2020 15:20:00 +0000 (16:20 +0100)]
tests: few more fsadm checks

3 years agofsadm: fix unbound variable usage
Zdenek Kabelac [Mon, 7 Dec 2020 15:16:55 +0000 (16:16 +0100)]
fsadm: fix unbound variable usage

When 'fsadm resize vg/lv' is used without size, it should just
resize filesystem to match device - but since we now check
for unbound variable in bash - the previous usage no longer
works and needs explicit check.

3 years agoman: update lvmvdo
Zdenek Kabelac [Mon, 7 Dec 2020 16:04:49 +0000 (17:04 +0100)]
man: update lvmvdo

Fix vdo example.
Update some sentences.

3 years agoman lvmcache: add writecache cleaner info
David Teigland [Wed, 2 Dec 2020 21:29:21 +0000 (15:29 -0600)]
man lvmcache: add writecache cleaner info

3 years agoman: update writing style of the lvmvdo man page
Marek Suchánek [Fri, 27 Nov 2020 11:03:53 +0000 (12:03 +0100)]
man: update writing style of the lvmvdo man page

This patch improves the clarity, writing style, and language
of the lvmvdo(7) man page.

See https://bugzilla.redhat.com/show_bug.cgi?id=1855804.

3 years agobuild: make generate
Marian Csontos [Thu, 26 Nov 2020 16:37:32 +0000 (17:37 +0100)]
build: make generate

3 years agoudev rule: remove lvmetad comments
David Teigland [Wed, 25 Nov 2020 22:57:54 +0000 (16:57 -0600)]
udev rule: remove lvmetad comments

3 years agolvm.conf: remove reference to locking_type
David Teigland [Tue, 17 Nov 2020 17:19:55 +0000 (11:19 -0600)]
lvm.conf: remove reference to locking_type

3 years agoman: vgsplit source and destination VGs
David Teigland [Tue, 17 Nov 2020 17:00:40 +0000 (11:00 -0600)]
man: vgsplit source and destination VGs

make clearer which is source and which is destination

3 years agolvchange: fix error for foreign vg activation
David Teigland [Tue, 17 Nov 2020 15:22:40 +0000 (09:22 -0600)]
lvchange: fix error for foreign vg activation

was using ECMD_FAILED instead of 0.

3 years agotests: integrity mismatch checks for all raid levels
David Teigland [Wed, 11 Nov 2020 21:13:46 +0000 (15:13 -0600)]
tests: integrity mismatch checks for all raid levels

Verify that corruption is corrected for raid levels other
than raid1.  For other raid levels, attempt to corrupt the
given file pattern on each underlying device, since we don't
know which device contains the file being corrupted.
This ensures that corruption is actually be introduced
when testing the other raid levels.

Verify that corruption is being corrected by checking
the integritymismatches count is non-zero for the raid LV,
which includes the total from all images (since we don't
know which image will have the corruption.)

3 years agointegrity: display total mismatches at raid LV level
David Teigland [Wed, 11 Nov 2020 21:10:15 +0000 (15:10 -0600)]
integrity: display total mismatches at raid LV level

Each integrity image in a raid LV reports its own number
of integrity mismatches, e.g.

lvs -o integritymismatches vg/lv_rimage_0
lvs -o integritymismatches vg/lv_rimage_1

In addition to this, allow the total number of integrity
mismatches from all images to be displayed for the raid LV.

lvs -o integritymismatches vg/lv

shows the number of mismatches from both lv_rimage_0 and
lv_rimage_1.

3 years agotests: update integrity tests
David Teigland [Tue, 10 Nov 2020 23:41:04 +0000 (17:41 -0600)]
tests: update integrity tests

simplified the method of corrupting data, the old method
was not working reliably.  moved syncation tests to a
different file

3 years agowritecache: supported in dm-writecache version 3
David Teigland [Mon, 9 Nov 2020 15:47:01 +0000 (09:47 -0600)]
writecache: supported in dm-writecache version 3

not version 2

3 years agoman: update vdo
Zdenek Kabelac [Tue, 3 Nov 2020 15:32:14 +0000 (16:32 +0100)]
man: update vdo

Enhance VDO man page with description of memory usage
and space requirements chapter.

Remove some unneeded blank lines in man page.

Use more precise terminology.

Correct examples since  cpool and vpool are protected names.

3 years agopvck: fix previous commit
David Teigland [Wed, 28 Oct 2020 21:50:47 +0000 (16:50 -0500)]
pvck: fix previous commit

line to setup bcache was misplaced in
commit 5a94126e7a28

3 years agoRevert "tests: revert lvm shell use in pvck-dump"
David Teigland [Wed, 28 Oct 2020 21:45:04 +0000 (16:45 -0500)]
Revert "tests: revert lvm shell use in pvck-dump"

This reverts commit 05d23b2dd80919ebd2239cfd7f8e08d5de9ebace.

this required enabling editline in configure

3 years agotests: revert lvm shell use in pvck-dump
David Teigland [Tue, 27 Oct 2020 20:44:56 +0000 (15:44 -0500)]
tests: revert lvm shell use in pvck-dump

doesn't work on my machine

3 years agopvck: fix dev filtering
David Teigland [Tue, 27 Oct 2020 20:42:08 +0000 (15:42 -0500)]
pvck: fix dev filtering

filters needing io weren't being run because bcache
wasn't set up.  Read the first 4k of the device
before doing filtering or reading ondisk structs to
reduce reads.

3 years agopvck: handle first mda at non-4096 offset
David Teigland [Tue, 27 Oct 2020 19:28:54 +0000 (14:28 -0500)]
pvck: handle first mda at non-4096 offset

It's possible for a machine with a non-4k page size
to create a PV with an mda_header at an offset other
than 4k.  Fix pvck --dump to work with these other
mda offsets.  pvck --repair will write a new first
mda at 4096 but lvm with other page sizes will work
with this.

3 years agowritecache: disallow partial or degraded activation
David Teigland [Mon, 26 Oct 2020 20:35:23 +0000 (15:35 -0500)]
writecache: disallow partial or degraded activation

when either main or fast lvs are incomplete

3 years agolvchange: allow syncaction check with integrity
David Teigland [Mon, 26 Oct 2020 17:27:18 +0000 (12:27 -0500)]
lvchange: allow syncaction check with integrity

syncaction check will detect and correct integrity checksum mismatches.

3 years agopvcreate: clean up opening and filtering of args
David Teigland [Fri, 23 Oct 2020 18:53:52 +0000 (13:53 -0500)]
pvcreate: clean up opening and filtering of args

The args for pvcreate/pvremove (and vgcreate/vgextend
when applicable) were not efficiently opened, scanned,
and filtered.  This change reorganizes the opening
and filtering in the following steps:

- label scan and filter all devs
  . open ro
  . standard label scan at the start of command

- label scan and filter dev args
  . open ro
  . uses full md component check
  . typically the first scan and filter of pvcreate devs

- close and reopen dev args
  . open rw and excl

- repeat label scan and filter dev args
  . using reopened rw excl fd

- wipe and write new headers
  . using reopened rw excl fd

3 years agogcc: cleanup warns from older gcc
Zdenek Kabelac [Sun, 25 Oct 2020 20:56:02 +0000 (21:56 +0100)]
gcc: cleanup warns from older gcc

3 years agotests: minor update
Zdenek Kabelac [Sun, 25 Oct 2020 19:23:41 +0000 (20:23 +0100)]
tests: minor update

3 years agofsadm: better check for getsize64 support
Zdenek Kabelac [Sun, 25 Oct 2020 19:19:31 +0000 (20:19 +0100)]
fsadm: better check for getsize64 support

Older blockdev tool return failure error code with --help,
and since now the tool abort on command failure, lets
detect missing --getsize64 support directly by running
command and check if it returns something usable.

It's likely very hard to have the system with
such old blockdev tool and newer lvm2 compiled.

3 years agoWHATS_NEW: update
Zdenek Kabelac [Fri, 23 Oct 2020 23:40:55 +0000 (01:40 +0200)]
WHATS_NEW: update

3 years agoman: regenerate
Zdenek Kabelac [Mon, 19 Oct 2020 10:34:36 +0000 (12:34 +0200)]
man: regenerate

3 years agoman: more precise UNIT
Zdenek Kabelac [Mon, 19 Oct 2020 10:32:46 +0000 (12:32 +0200)]
man: more precise UNIT

Since 'kilobytes' could be seen in 2 way - SI as '1000',
while all programmers sees it as '1024' - switch to
commonly acceptted  KiB, MiB....

Resolves RHBZ 1496255.

3 years agolv_manip: add space into message
Zdenek Kabelac [Mon, 19 Oct 2020 08:28:06 +0000 (10:28 +0200)]
lv_manip: add space into message

Just add space between %s(.

3 years agotests: fsadm test continue after fs repair
Zdenek Kabelac [Fri, 23 Oct 2020 22:29:45 +0000 (00:29 +0200)]
tests: fsadm test continue after fs repair

Test case where filesystem has been corrected via fsck.
In such case fsck returns '1' as success and should be
handled in a same way as '0' since fs is correct.

3 years agofsadm: enhance error handling
Zdenek Kabelac [Fri, 23 Oct 2020 23:13:42 +0000 (01:13 +0200)]
fsadm: enhance error handling

Set more secure bash failure mode for pipilines.
Avoid using unset variables.
Enhnace error reporting for failing command.
Avoid using error via 'case..esac || error'.

3 years agofsadm: handle fsck return 1 for corrected fs
Zdenek Kabelac [Fri, 23 Oct 2020 22:42:31 +0000 (00:42 +0200)]
fsadm: handle fsck return 1 for corrected fs

3 years agofsadm: use NULL
Zdenek Kabelac [Fri, 23 Oct 2020 22:40:34 +0000 (00:40 +0200)]
fsadm: use NULL

Use consistently $NULL as in other places.

3 years agoget dev size when setting pv device
David Teigland [Wed, 21 Oct 2020 21:21:50 +0000 (16:21 -0500)]
get dev size when setting pv device

In some cases the dev size may not have been read yet
in set_pv_devices().  In this case get the dev size
before comparing the dev size with the pv size.

3 years agopvscan: rework to improve PVs without metadata
David Teigland [Thu, 15 Oct 2020 19:11:08 +0000 (14:11 -0500)]
pvscan: rework to improve PVs without metadata

Restructure the pvscan code, and add new temporary files
that list pvids in a VG, used for processing PVs that
have no metadata.

The new temp files, in /run/lvm/pvs_lookup/<vgname>, allow a
proper pvscan --cache to be done on PVs that have no metadata.
pvscan --cache <dev> is only supposed to read <dev>, but when
<dev> has no metadata, this had not been possible.  The
command had to fall back to scanning all devices to read all
VG metadata to get the list of all PVIDs needed to check for
a complete VG.  Now, the temp file can be used in place of
reading metadata from all PVs on the system.

3 years agoadd label_scan_devs_cached
David Teigland [Wed, 21 Oct 2020 17:20:17 +0000 (12:20 -0500)]
add label_scan_devs_cached

label_scan_devs without invalidating data first
for cases where the caller wants to use any
bcache data they have already read.

3 years agoadd label_read_pvid
David Teigland [Thu, 15 Oct 2020 19:05:45 +0000 (14:05 -0500)]
add label_read_pvid

To read the lvm headers and set dev->pvid if the
device is a PV.  Difference from label_scan_ functions
is this does not read any vg metadata or add any info
to lvmcache.

3 years agolvmcache: rename label_read label_scan_dev
David Teigland [Thu, 15 Oct 2020 17:56:36 +0000 (12:56 -0500)]
lvmcache: rename label_read label_scan_dev

for consistent naming with other similar functions

3 years agolvmcache: add lvmcache_get_dev_mda
David Teigland [Thu, 15 Oct 2020 17:53:01 +0000 (12:53 -0500)]
lvmcache: add lvmcache_get_dev_mda

for future patch

3 years agoscanning: improve filtering control
David Teigland [Tue, 20 Oct 2020 20:10:08 +0000 (15:10 -0500)]
scanning: improve filtering control

Filtering in label_scan was controlled indirectly by
the fact that bcache was not yet set up when label_scan
first ran.  The result is that filters that needed data
would not run and would return -EAGAIN, which would
result in the dev flag FILTER_AFTER_SCAN being set.
After the dev header was read for checking the label,
filters would be rechecked because of FILTER_AFTER_SCAN.
All filters would be checked this time because bcache
was now set up, and the filters needing data would
largely use data already scanned for reading the label.
This design worked but is hard to adjust for future
cases where bcache is already set up.

Replace this method (based on setting up bcache, or not)
with a new cmd flag filter_nodata_only.  When this flag
is set filters that need data will not run.  This allows
the same label_scan behavior when bcache has been set up.
There are no expected changes in behavior.

3 years agofilters: nodata option
David Teigland [Mon, 19 Oct 2020 21:46:20 +0000 (16:46 -0500)]
filters: nodata option

When filter_nodata_only is set, a filter that uses
data is skipped.

3 years agofilters: allow filter wipe for one device
David Teigland [Tue, 20 Oct 2020 20:17:56 +0000 (15:17 -0500)]
filters: allow filter wipe for one device

as passes_filter already does

3 years agotests: writecache-misc disable with lvmlockd
David Teigland [Wed, 21 Oct 2020 17:47:28 +0000 (12:47 -0500)]
tests: writecache-misc disable with lvmlockd

in a shared vg pvmove requires a named lv

3 years agotests: check dmevent with bigger reserved_stack
Zdenek Kabelac [Tue, 20 Oct 2020 20:28:58 +0000 (22:28 +0200)]
tests: check dmevent with bigger reserved_stack

Check dmeventd remains working when reserved_stack
is above 300KiB.

3 years agomemlock: allocate at most halve of rlimit stack
Zdenek Kabelac [Tue, 20 Oct 2020 20:26:44 +0000 (22:26 +0200)]
memlock: allocate at most halve of rlimit stack

Touch of stack allocation validated given size with rlimit
and if the reserved_stack was above rlimit, its been completely
ignored - now we will always touch stack upto rlimit/2 size.

3 years agolvmcmdlib: lvm2_init_threaded
Zdenek Kabelac [Tue, 20 Oct 2020 20:22:52 +0000 (22:22 +0200)]
lvmcmdlib:  lvm2_init_threaded

cmd context has 'threaded' value that used be set
by clvmd - and allowed proper memory locking management.
Reuse same bit for dmeventd.

Since dmeventd is using 300KiB stack per thread,
we will ignore any user settings for allocation/reserved_stack
until some better solution is find.
This avoids crashing of dmevend when user changes this value
and because in most cases lvm2 should work ok with 64K stack
size, this change should not cause any problems.

3 years agolibdm: relocate code for sending messages
Zdenek Kabelac [Mon, 19 Oct 2020 14:48:04 +0000 (16:48 +0200)]
libdm: relocate code for sending messages

To be able to send messages for recently resumed devices,
move code into inner loop.
Matching commit c1a6b10d09aae6179e4f08c7d8c03d5e3068ad94.

3 years agocov: split check for type assignment
Zdenek Kabelac [Mon, 19 Oct 2020 14:43:50 +0000 (16:43 +0200)]
cov: split check for type assignment

Check that type is always defined, if not make it explicit internal
error (although logged as debug - so catched only with proper lvm.conf
setting).
This ensures later type being NULL can't be dereferenced with coredump.

3 years agodm: remove created devices on error path
Zdenek Kabelac [Fri, 16 Oct 2020 18:58:58 +0000 (20:58 +0200)]
dm: remove created devices on error path

DM tree keeps track of created device while preloading a device tree.
When fail occures during such preload, it will now try to remove
all created and preloaded device. This makes it easier to maintain
stacking of device, since we do not need to check in-depth for
existance of all possible created devices during the failure.

3 years agodebug: shorten error message
Zdenek Kabelac [Mon, 19 Oct 2020 12:28:58 +0000 (14:28 +0200)]
debug: shorten error message

Just check for sigint during log_error().

3 years agolibdm: validate thin-pool before sending messages
Zdenek Kabelac [Mon, 28 Sep 2020 21:12:48 +0000 (23:12 +0200)]
libdm: validate thin-pool before sending messages

Alhtough lvm2 does validation on its side, ensure DM code
is not sending messages to failed thin pool.

3 years agolibdm: enhance error message
Zdenek Kabelac [Fri, 25 Sep 2020 17:10:30 +0000 (19:10 +0200)]
libdm: enhance error message

3 years agolibdm: split code for sending message
Zdenek Kabelac [Sat, 23 Jun 2018 19:00:40 +0000 (21:00 +0200)]
libdm: split code for sending message

Move message sending from _thin_pool_node_message to
new _node_message for possible better code sharing.

3 years agoproperties: fix data_usage typo
Zdenek Kabelac [Fri, 16 Oct 2020 15:51:23 +0000 (17:51 +0200)]
properties: fix data_usage typo

Patch 4de6f58085c533c79ce2e0db6cdeb6ed06fe05f8 introduce typo,
we need to use data_usage.

Note: this code was used by lvmapp library and currently is unused.

3 years agotests: extend area covered by error target
Zdenek Kabelac [Tue, 6 Oct 2020 13:45:19 +0000 (15:45 +0200)]
tests: extend area covered by error target

Since 'BLKZEROOUT' streams out more block at once, at can easily
zero-out larger set of blocks after 1st. failing one.

So the test is adapted to fully 'hide' swap header under error target.

3 years agomake: generate
Marian Csontos [Thu, 15 Oct 2020 09:16:54 +0000 (11:16 +0200)]
make: generate

3 years agogitignore: ignore gcov files
Marian Csontos [Thu, 15 Oct 2020 09:13:13 +0000 (11:13 +0200)]
gitignore: ignore gcov files

3 years agoRevert "tests: Adapt RAID test to changes"
Marian Csontos [Tue, 13 Oct 2020 11:15:16 +0000 (13:15 +0200)]
Revert "tests: Adapt RAID test to changes"

The cpnversion of degraded RAID should still report a failure.

This reverts commit e12bdd591a1e60f055baee6cf5e9a144ea245a33.

3 years agorpm: bare words are no longer supported
Zdenek Kabelac [Fri, 2 Oct 2020 20:13:51 +0000 (22:13 +0200)]
rpm: bare words are no longer supported

Update for new rpm requirement and use "..." words.

3 years agotests: enable tests for lvmlockd
Zdenek Kabelac [Fri, 2 Oct 2020 19:35:44 +0000 (21:35 +0200)]
tests: enable tests for lvmlockd

3 years agotests: aux hides zero and error device
Zdenek Kabelac [Fri, 2 Oct 2020 17:19:30 +0000 (19:19 +0200)]
tests: aux hides zero and error device

When ERR_DEV and ZERO_DEV are used, they are automatically
taken down when the last user no longer needs them,
so hide them from 'forgotten' device check.

3 years agotests: rename shown debug trace
Zdenek Kabelac [Fri, 2 Oct 2020 17:17:36 +0000 (19:17 +0200)]
tests: rename shown debug trace

As there could be few invokes of stacktrace, avoid
repeatedly display logs from commands.
So after first display rename  debug.log* -> debug_log
so the file still can remain for reading in test dir.

3 years agodebug: drop vgid from debug
Zdenek Kabelac [Fri, 2 Oct 2020 20:22:25 +0000 (22:22 +0200)]
debug: drop vgid from debug

From the code can be seen the VGID will be always NULL here
as vgid != NULL is already handled before.
Thus drop from being displayed.

3 years agodebug: no backtrace
Zdenek Kabelac [Fri, 2 Oct 2020 09:14:18 +0000 (11:14 +0200)]
debug: no backtrace

As the path already printed verbose message drop backtrace.

3 years agodebug: show actually reason for taking this code path
Zdenek Kabelac [Fri, 2 Oct 2020 09:12:49 +0000 (11:12 +0200)]
debug: show actually reason for taking this code path

Instead of not so useful backtrace, report what was the reason.

3 years agodebug: drop FD from error message
Zdenek Kabelac [Fri, 2 Oct 2020 09:10:44 +0000 (11:10 +0200)]
debug: drop FD from error message

Since now the error path already has device close and set -1,
there is not much in printing this info - actually shouldn't be
there at all..

3 years agodebug: update messages
Zdenek Kabelac [Tue, 29 Sep 2020 21:48:45 +0000 (23:48 +0200)]
debug: update messages

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