]> sourceware.org Git - lvm2.git/log
lvm2.git
3 years agocleanup: improving message
Zdenek Kabelac [Sat, 20 Feb 2021 22:23:00 +0000 (23:23 +0100)]
cleanup: improving message

lvconvert -Z can be used with snaps & pools.

3 years agocleanup: simplify initilization
Zdenek Kabelac [Sat, 20 Feb 2021 21:44:06 +0000 (22:44 +0100)]
cleanup: simplify initilization

Simplier code and also drop duplicate check for active LV.

3 years agocleanup: simply code
Zdenek Kabelac [Sat, 20 Feb 2021 21:11:30 +0000 (22:11 +0100)]
cleanup: simply code

3 years agolvconvert: change errors to internal ones
Zdenek Kabelac [Sat, 20 Feb 2021 22:01:25 +0000 (23:01 +0100)]
lvconvert: change errors to internal ones

Since these errors should never happen, change them to  internal errors.

3 years agocache: fix warning test
Zdenek Kabelac [Sat, 20 Feb 2021 21:45:13 +0000 (22:45 +0100)]
cache: fix warning test

The cache here is not 'writethough' - so print proper state
(writeback or passthrough)

3 years agolvextend: enable resize of writecached LV
Zdenek Kabelac [Sat, 20 Feb 2021 21:22:51 +0000 (22:22 +0100)]
lvextend: enable resize of writecached LV

3 years agotests: remove local setting of LVM_BINARY
Zdenek Kabelac [Tue, 23 Feb 2021 13:42:47 +0000 (14:42 +0100)]
tests: remove local setting of LVM_BINARY

To better test actually fsadm in test suite - avoid setting
LVM_BINARY locally - since test setup already modifies
PATH to find test's lvm binary as the 1st. in path.

3 years agofsadm: avoid access to unbound variable
Zdenek Kabelac [Tue, 23 Feb 2021 13:14:16 +0000 (14:14 +0100)]
fsadm: avoid access to unbound variable

3 years agocommand defs: add missing commas
David Teigland [Mon, 22 Feb 2021 16:44:01 +0000 (10:44 -0600)]
command defs: add missing commas

even though the parser seems to work fine without them

3 years agofix check for md raid imsm signature on 4k devices
David Teigland [Thu, 18 Feb 2021 17:42:32 +0000 (11:42 -0600)]
fix check for md raid imsm signature on 4k devices

On devices with 4k logical block size, the imsm signature
is located 8k from the end of the device, not 1k as is
the case for devices with 512 LBS.

3 years agotests: Skip test killing kernel
Marian Csontos [Wed, 17 Feb 2021 12:26:06 +0000 (13:26 +0100)]
tests: Skip test killing kernel

Bug 1916891

3 years agoWHATS_NEW: updates
Zdenek Kabelac [Wed, 17 Feb 2021 10:27:57 +0000 (11:27 +0100)]
WHATS_NEW: updates

3 years agomake: generate
Zdenek Kabelac [Tue, 16 Feb 2021 20:30:06 +0000 (21:30 +0100)]
make: generate

3 years agotests: readonly snapshot thick origin can't be merged
Zdenek Kabelac [Wed, 17 Feb 2021 10:38:28 +0000 (11:38 +0100)]
tests: readonly snapshot thick origin can't be merged

When user sets snapshot thick origin as read-only - lvconvert --merge refuses
to merge until user swiches origin to 'read-write'.

3 years agolvmlocdk: correct creation of dm path vg sanlock LV
Zdenek Kabelac [Sun, 14 Feb 2021 16:47:08 +0000 (17:47 +0100)]
lvmlocdk: correct creation of dm path vg sanlock LV

Vgname may contain '-' and needs escaping '--' for /dev/mapper path.

3 years agotests: lvconvert vdo profile support
Zdenek Kabelac [Tue, 16 Feb 2021 20:30:40 +0000 (21:30 +0100)]
tests: lvconvert vdo profile support

3 years agoman: vdo drop resize restriction comment
Zdenek Kabelac [Mon, 15 Feb 2021 11:18:54 +0000 (12:18 +0100)]
man: vdo drop resize restriction comment

lvm2 supports resize of cached vdo pool volumes.

3 years agotests: check resize of cached vdopool
Zdenek Kabelac [Wed, 17 Feb 2021 10:50:27 +0000 (11:50 +0100)]
tests: check resize of cached vdopool

3 years agovdo: just one probe is enough
Zdenek Kabelac [Wed, 17 Feb 2021 10:12:11 +0000 (11:12 +0100)]
vdo: just one probe is enough

target_present_version() can handle modprobing no need to try it
twice.

3 years agolvconvert: VDO kernel support before converting
Zdenek Kabelac [Wed, 17 Feb 2021 10:13:19 +0000 (11:13 +0100)]
lvconvert: VDO kernel support before converting

Early check for kernel support of VDO target before starting any
conversion work.

3 years agolvconvert: vdo may convert already formated vdo
Zdenek Kabelac [Tue, 16 Feb 2021 20:26:35 +0000 (21:26 +0100)]
lvconvert: vdo may convert already formated vdo

User use 'lvconvert -Zn --type vdo-pool' to convert an existing
vdo formated volume and skip lvm2 internal formating.
This however requires user is passing proper matching parameters.
For them user can use --profile|--metadataprofile option whos
support has been also enhanced.

TODO: add support to read values directly from formated volume.

3 years agolvchange: remove unneeded call
Zdenek Kabelac [Sun, 14 Feb 2021 16:27:45 +0000 (17:27 +0100)]
lvchange: remove unneeded call

Sync is already happining in activate_and_wipe_lvlist().

3 years agolv_manip: avoid removing LV when converting
Zdenek Kabelac [Wed, 17 Feb 2021 10:09:41 +0000 (11:09 +0100)]
lv_manip: avoid removing LV when converting

In some cases we use 'creation' also during conversion.
Here it can be actually unwanted side effect we may remove
not just newly created layers - but also original converted LV.

So until we make clear how to properly revert from some errors
in middle of conversion, disable removal for any 'lvconvert' commands.

3 years agotests: lvdisplay does not crash for merged thin
Zdenek Kabelac [Sat, 13 Feb 2021 22:10:15 +0000 (23:10 +0100)]
tests: lvdisplay does not crash for merged thin

3 years agolvdisplay: fix show of merged thin snapshot
Zdenek Kabelac [Fri, 12 Feb 2021 14:11:48 +0000 (15:11 +0100)]
lvdisplay: fix show of merged thin snapshot

When lvdisplay was executed and thin snaphost has be merged to
thin origin and the operation has been postponed till devices
are closed, command crashed.

Check LV is COW before trying to check snapshot percentage.

3 years agotests: lvconvert thin profile conversion
Zdenek Kabelac [Tue, 16 Feb 2021 23:07:50 +0000 (00:07 +0100)]
tests: lvconvert thin profile conversion

3 years agolvconvert: thin errorwhenfull and recalculation
Zdenek Kabelac [Tue, 16 Feb 2021 23:10:32 +0000 (00:10 +0100)]
lvconvert: thin errorwhenfull and recalculation

When converting an existing LV to thin-pool,
user may now pass also '--errorwhenfull' option
like with 'lvcreate'.

Also recalculate chunksize when performace profile is
used with conversion (again matching lvcreate).

Adds missing flagging for uncropped metadata sizes.

3 years agoinclude lvm version in debug output
David Teigland [Fri, 12 Feb 2021 16:51:41 +0000 (10:51 -0600)]
include lvm version in debug output

3 years agoscan: wipe filters when dropping scanned data
David Teigland [Wed, 10 Feb 2021 20:06:58 +0000 (14:06 -0600)]
scan: wipe filters when dropping scanned data

Fix clearing persistent filter state when clearing all
the state from a label_scan.

label_scan reads devs and saves info in bcache, lvmcache,
and in the persistent filter.  In some uncommon cases, an
lvm command wants to clear all info from a prior label_scan,
and repeat label_scan from scratch.  In these cases, info
in lvmcache, bcache and the persistent filter all need to
be cleared before repeating label_scan.

By missing the persistent filter wiping, outdated persistent
filter info, from a prior label_scan, could cause lvm to
incorrectly filter devices that change between polling intervals.
(i.e. if the device changes in such a way that the filtering
results change.)

A case where lvm wants to do multiple label_scans is a
polling command (like lvconvert --merge), when lvmpolld
has been disabled, so that the command itself needs to
to do repeated polling checks.

3 years agoWHATS_NEW: update
Zdenek Kabelac [Wed, 10 Feb 2021 14:34:12 +0000 (15:34 +0100)]
WHATS_NEW: update

3 years agogcc: drop unused assingment
Zdenek Kabelac [Wed, 10 Feb 2021 13:55:35 +0000 (14:55 +0100)]
gcc: drop unused assingment

3 years agogcc: ensure pointer is always defined
Zdenek Kabelac [Wed, 10 Feb 2021 13:30:58 +0000 (14:30 +0100)]
gcc: ensure pointer is always defined

3 years agolibdm: simplify line emitter checking
Zdenek Kabelac [Wed, 10 Feb 2021 14:10:28 +0000 (15:10 +0100)]
libdm: simplify line emitter checking

3 years agodevice_mapper: simplify line emitter checking
Zdenek Kabelac [Wed, 10 Feb 2021 14:22:39 +0000 (15:22 +0100)]
device_mapper: simplify line emitter checking

3 years agolabel: avoid rescaning unusable DM devices
Zdenek Kabelac [Tue, 9 Feb 2021 23:43:40 +0000 (00:43 +0100)]
label: avoid rescaning unusable DM devices

3 years agolvconvert: read-only origin cannot be merged
Zdenek Kabelac [Tue, 9 Feb 2021 23:40:21 +0000 (00:40 +0100)]
lvconvert: read-only origin cannot be merged

When user sets snapshost origin as read-only,
lvm will not allow simple merge and user needs to
flip permission,

3 years agolvchange: snapshot thick origin permission rw/r
Zdenek Kabelac [Tue, 9 Feb 2021 23:38:37 +0000 (00:38 +0100)]
lvchange: snapshot thick origin permission rw/r

User is allowed to change permission for thick origin.
FIXME: it's not quite clear why few others are prohibited to change.

3 years agosnapshot: create origin of virtual snap read only
Zdenek Kabelac [Tue, 9 Feb 2021 21:31:31 +0000 (22:31 +0100)]
snapshot: create origin of virtual snap read only

When creating old fashioned way thick virtual snapshot,
use read-only 'zero' _vorigin device.

3 years agodev-cache: remove duplicated allocation
Zdenek Kabelac [Wed, 10 Feb 2021 13:33:17 +0000 (14:33 +0100)]
dev-cache: remove duplicated allocation

Merge mistake missed to remove allocation that is now postponed
until it's really needed.

3 years agodev_get_primary_dev: fix invalid path check
David Teigland [Tue, 9 Feb 2021 15:47:08 +0000 (09:47 -0600)]
dev_get_primary_dev: fix invalid path check

Fix commit bee9f4efdd81 "filter-mpath: work with nvme devices"
which removed setting the path for readlink.

3 years agodev-type: sysfs attrs without sectors
Zdenek Kabelac [Mon, 8 Feb 2021 23:43:13 +0000 (00:43 +0100)]
dev-type: sysfs attrs without sectors

Split function for reading attrs in sectors.

3 years agotypo: fixes
Zdenek Kabelac [Mon, 8 Feb 2021 22:51:56 +0000 (23:51 +0100)]
typo: fixes

forgotten merge from last batch.

3 years agoWHATS_NEW: updates
Zdenek Kabelac [Mon, 8 Feb 2021 22:16:54 +0000 (23:16 +0100)]
WHATS_NEW: updates

3 years agodev-type: convert to use log_warn
Zdenek Kabelac [Sun, 7 Feb 2021 13:06:12 +0000 (14:06 +0100)]
dev-type: convert to use log_warn

Keep log_error designated only for 'erroring' condition of command
and replace these errors with log_warn() WARNING.

Also do some indent changes.

3 years agodev-type: use fopen for sysfs file
Zdenek Kabelac [Sun, 7 Feb 2021 13:07:17 +0000 (14:07 +0100)]
dev-type: use fopen for sysfs file

Directly open sysfs files and save extra stat() call which
is not adding any extra safety in sysfs dir.

3 years agodev-type: dev_is_pmem reuses topology read code
Zdenek Kabelac [Sun, 7 Feb 2021 14:03:13 +0000 (15:03 +0100)]
dev-type: dev_is_pmem reuses topology read code

3 years agodev-cache: better code reuse for _add_alias
Zdenek Kabelac [Sun, 7 Feb 2021 18:30:26 +0000 (19:30 +0100)]
dev-cache: better code reuse for _add_alias

Move path copying into _add_alish together with hashing.
Remove duplicated code.

3 years agodev-cache: check for nvme name while adding alias
Zdenek Kabelac [Sun, 7 Feb 2021 13:04:58 +0000 (14:04 +0100)]
dev-cache: check for nvme name while adding alias

Instead of repeated list retest, compare name once during add of alias.

3 years agotargets: use target_present_version
Zdenek Kabelac [Sun, 7 Feb 2021 20:48:18 +0000 (21:48 +0100)]
targets: use target_present_version

Skip duplicated  dm version   ioctl() on every startup.

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.

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