]> sourceware.org Git - lvm2.git/log
lvm2.git
3 years agotests: check event_activation can be disabled
Zdenek Kabelac [Mon, 8 Feb 2021 21:27:59 +0000 (22:27 +0100)]
tests: check event_activation can be disabled

3 years agotests: support for resized cached LVs
Zdenek Kabelac [Sun, 7 Feb 2021 17:45:43 +0000 (18:45 +0100)]
tests: support for resized cached LVs

Support for cached LVs is now enabled.

3 years agolv_resize: support resizing of cached volumes
Zdenek Kabelac [Sun, 7 Feb 2021 19:12:00 +0000 (20:12 +0100)]
lv_resize: support resizing of cached volumes

Automatically figure out resizable layer in the LV stack and
resize it online.

Split check for reshaped raids and postpone removal of
unused space after finished reshaping after metadata archiving.

Drop warning about unsupported automatic resize of monitored thin-pool.

Currently there is not yet support for resize of writecache.

3 years agolv_manip: reuse function also during reduction
Zdenek Kabelac [Fri, 5 Feb 2021 10:37:52 +0000 (11:37 +0100)]
lv_manip: reuse function also during reduction

Move function _setup_lv_size() in front of _lv_reduce() so
it can be reused also in this function.
Avoid propagating 0 length to upper layer.

3 years agolv_resize: use 'bad' code path for error case
Zdenek Kabelac [Sat, 6 Feb 2021 23:39:13 +0000 (00:39 +0100)]
lv_resize: use 'bad' code path for error case

3 years agothin: check for overprovisioning only once
Zdenek Kabelac [Sat, 6 Feb 2021 23:37:37 +0000 (00:37 +0100)]
thin: check for overprovisioning only once

3 years agothinpool: use lv_config_profil for crop_metadata
Zdenek Kabelac [Thu, 4 Feb 2021 22:26:08 +0000 (23:26 +0100)]
thinpool: use lv_config_profil for crop_metadata

Better support for thin-pools with individual profiles introduced
in the recent patch b4212be2e7e8797bbf8f9a166347659cc39ba075.

3 years agopvscan: support disabled event_activation
Zdenek Kabelac [Mon, 8 Feb 2021 15:28:18 +0000 (16:28 +0100)]
pvscan: support disabled event_activation

In past we had this control with use_lvmetad check for
pvscan --cache -aay

Howerer this got lost with lvmetad removal commit:
117160b27e510dceb1ed6acf995115c040acd88d

When user sets lvm.conf global/event_activation=0
pvscan service will no longer auto activate any LVs on appeared PVs.

3 years agofix for md component detection changes
David Teigland [Mon, 8 Feb 2021 17:23:42 +0000 (11:23 -0600)]
fix for md component detection changes

And some fine tuning of when the checks are applied
in "start" mode.

3 years agolvmcache: remove unused variable from last commit
David Teigland [Mon, 8 Feb 2021 16:22:30 +0000 (10:22 -0600)]
lvmcache: remove unused variable from last commit

3 years agomd component detection changes
David Teigland [Fri, 5 Feb 2021 22:16:03 +0000 (16:16 -0600)]
md component detection changes

Move extra md component detection into the label scan phase.
It had been in set_pv_devices which was deep within the vg_read
phase, which wasn't a good place (better to detect that earlier.)
Now that pv metadata info is available in the scan phase, the pv
details (size and device_hint) can be used for extra md checking.

Use the device_hint from the pv metadata to trigger a full md
component check if the device_hint begins with /dev/md.

Stop triggering full md component checks based on missing
udev info for a dev.

Changes to tests to reflect that the code is now detecting
md components in some test case that it wasn't before.

3 years agodm: add debugging to include table differences
David Teigland [Wed, 3 Feb 2021 19:44:10 +0000 (13:44 -0600)]
dm: add debugging to include table differences

When dm tables are reloaded, include log_debug info
that will show the details of why the reload is needed.

3 years agohints: clean up comment and init settings
David Teigland [Tue, 2 Feb 2021 21:14:05 +0000 (15:14 -0600)]
hints: clean up comment and init settings

no behavior change

3 years agocachevol: allow forced detaching of damaged or invalid cachevol
David Teigland [Tue, 12 Jan 2021 17:53:02 +0000 (11:53 -0600)]
cachevol: allow forced detaching of damaged or invalid cachevol

A cachevol can be forcibly detached when it's missing devices.
Also allow this if it's damaged/invalid and unrepairable.
This would be needed to recover data from the origin LV after
a cachevol is lost or damaged beyond repair.

3 years agotest: check read_only_volume_list tagging works
Zdenek Kabelac [Tue, 2 Feb 2021 18:53:28 +0000 (19:53 +0100)]
test: check read_only_volume_list tagging works

3 years agolvcreate: use lv_passes_readonly_filter
Zdenek Kabelac [Tue, 2 Feb 2021 18:53:59 +0000 (19:53 +0100)]
lvcreate: use lv_passes_readonly_filter

Check if created LV is going to be activated read-only
because such LV cannot be zeroed (equals to use
option '-pr').

3 years agowritecache: let block_size setting override device block sizes
David Teigland [Tue, 12 Jan 2021 20:41:38 +0000 (14:41 -0600)]
writecache: let block_size setting override device block sizes

In cases where lvconvert does not detect a fs block size on the
device, it falls back to choosing a writecache block size based
on the device's LBS and PBS (tries to match those.)

If the user specifies a writecache block size on the command
line (--cachesettings block_size=4096|512), lvconvert currently
fails and reports an error if the user-specified value does not
match the value lvconvert would have chosen based on LBS and PBS.

The purpose of allowing a user-specified value on the command line
is to override what lvconvert would otherwise do, so change this
to just print a warning that the user value does not match the
value that would be chosen based on the LBS/PBS, and then take
the user-specified value as the writecache block size.

3 years agofilter-mpath: work with nvme devices
David Teigland [Thu, 3 Dec 2020 16:48:21 +0000 (10:48 -0600)]
filter-mpath: work with nvme devices

Recognize when a device is nvme, and apply filter-mpath to
nvme devices in addition to scsi devices.

3 years agotests: increase required target version
Zdenek Kabelac [Mon, 1 Feb 2021 19:10:07 +0000 (20:10 +0100)]
tests: increase required target version

Require 1.7.0 for raid0.

3 years agotests: avoid killing test machines with kernel bug
Zdenek Kabelac [Mon, 1 Feb 2021 14:02:38 +0000 (15:02 +0100)]
tests: avoid killing test machines with kernel bug

Bug 1916891  still applies:

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

3 years agotests: check for raid target support
Zdenek Kabelac [Mon, 1 Feb 2021 14:01:04 +0000 (15:01 +0100)]
tests: check for raid target support

3 years agogcc: hide uninitialized warning with older gcc
Zdenek Kabelac [Mon, 1 Feb 2021 13:54:49 +0000 (14:54 +0100)]
gcc: hide uninitialized warning with older gcc

3 years agolibdm: add dm_tree_node_add_thin_pool_target_v1
Zdenek Kabelac [Mon, 1 Feb 2021 13:06:31 +0000 (14:06 +0100)]
libdm: add dm_tree_node_add_thin_pool_target_v1

Supports thin-pool without crop.

3 years agoaux: update thin_restore_needs_more_volumes
Zdenek Kabelac [Fri, 22 Jan 2021 19:17:57 +0000 (20:17 +0100)]
aux: update thin_restore_needs_more_volumes

Version 0.8.5-2.el7 needs to return 0;

3 years agotests: check for cache support presence
Zdenek Kabelac [Fri, 22 Jan 2021 17:45:00 +0000 (18:45 +0100)]
tests: check for cache support presence

3 years agotests: update thin and cache checked messages
Zdenek Kabelac [Sat, 30 Jan 2021 12:13:17 +0000 (13:13 +0100)]
tests: update thin and cache checked messages

Slightly changed messages for allocation of pool metadata.

3 years agotests: check 16G thin pool metadata size
Zdenek Kabelac [Sat, 30 Jan 2021 12:13:34 +0000 (13:13 +0100)]
tests: check 16G thin pool metadata size

3 years agolvconvert: ensure device_name is defined
Zdenek Kabelac [Fri, 22 Jan 2021 20:45:05 +0000 (21:45 +0100)]
lvconvert: ensure device_name is defined

3 years agopvscan: enhance _count_pvid_files_from_lookup_file
Zdenek Kabelac [Fri, 22 Jan 2021 21:27:05 +0000 (22:27 +0100)]
pvscan: enhance _count_pvid_files_from_lookup_file

Ensure all vars are always properly defined in all paths.

3 years agowipe: reformat message for failure case
Zdenek Kabelac [Fri, 22 Jan 2021 18:21:55 +0000 (19:21 +0100)]
wipe: reformat message for failure case

Use the same error message layout to match BLKZEROUT look.
Makes testing easier.

3 years agoWHATS_NEW: updates
Zdenek Kabelac [Mon, 1 Feb 2021 11:12:23 +0000 (12:12 +0100)]
WHATS_NEW: updates

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

4 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

4 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

4 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.

4 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.)

4 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.

4 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

4 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

4 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.

4 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

4 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

4 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

4 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.

4 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.

4 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

4 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.

4 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

4 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

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

4 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.

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

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

4 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.

4 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(.

4 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.

4 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'.

4 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

4 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.

4 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.

4 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.

4 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.

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