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

17231 Commits

Author SHA1 Message Date
David Teigland
12667e9897 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.
2021-02-18 11:42:32 -06:00
Marian Csontos
3cba071254 tests: Skip test killing kernel
Bug 1916891
2021-02-17 13:28:56 +01:00
Zdenek Kabelac
26a09c84c9 WHATS_NEW: updates 2021-02-17 11:53:19 +01:00
Zdenek Kabelac
2c5e034cd3 make: generate 2021-02-17 11:53:19 +01:00
Zdenek Kabelac
b9846bdc3e 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'.
2021-02-17 11:53:19 +01:00
Zdenek Kabelac
868b733588 lvmlocdk: correct creation of dm path vg sanlock LV
Vgname may contain '-' and needs escaping '--' for /dev/mapper path.
2021-02-17 11:53:19 +01:00
Zdenek Kabelac
fbaf5a32bb tests: lvconvert vdo profile support 2021-02-17 11:53:19 +01:00
Zdenek Kabelac
9c0ce4daa2 man: vdo drop resize restriction comment
lvm2 supports resize of cached vdo pool volumes.
2021-02-17 11:53:19 +01:00
Zdenek Kabelac
19e1373580 tests: check resize of cached vdopool 2021-02-17 11:53:18 +01:00
Zdenek Kabelac
5bf1dba9eb vdo: just one probe is enough
target_present_version() can handle modprobing no need to try it
twice.
2021-02-17 11:21:35 +01:00
Zdenek Kabelac
a7cb25c877 lvconvert: VDO kernel support before converting
Early check for kernel support of VDO target before starting any
conversion work.
2021-02-17 11:21:35 +01:00
Zdenek Kabelac
a915cd5a46 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.
2021-02-17 11:21:35 +01:00
Zdenek Kabelac
f87ff95e32 lvchange: remove unneeded call
Sync is already happining in activate_and_wipe_lvlist().
2021-02-17 11:21:35 +01:00
Zdenek Kabelac
096edeee71 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.
2021-02-17 11:21:35 +01:00
Zdenek Kabelac
3ef0861355 tests: lvdisplay does not crash for merged thin 2021-02-17 11:21:35 +01:00
Zdenek Kabelac
14008ead2a 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.
2021-02-17 11:21:35 +01:00
Zdenek Kabelac
3af61d8646 tests: lvconvert thin profile conversion 2021-02-17 11:21:35 +01:00
Zdenek Kabelac
53666d6ee3 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.
2021-02-17 11:21:35 +01:00
David Teigland
4486f08d51 include lvm version in debug output 2021-02-12 10:51:41 -06:00
David Teigland
c94d78f068 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.
2021-02-10 15:34:45 -06:00
Zdenek Kabelac
f49bedc029 WHATS_NEW: update 2021-02-10 15:39:03 +01:00
Zdenek Kabelac
04cd4df847 gcc: drop unused assingment 2021-02-10 15:39:03 +01:00
Zdenek Kabelac
a1e2541333 gcc: ensure pointer is always defined 2021-02-10 15:39:03 +01:00
Zdenek Kabelac
82bffa99ad libdm: simplify line emitter checking 2021-02-10 15:39:03 +01:00
Zdenek Kabelac
4b371246f5 device_mapper: simplify line emitter checking 2021-02-10 15:39:03 +01:00
Zdenek Kabelac
a383586177 label: avoid rescaning unusable DM devices 2021-02-10 15:39:03 +01:00
Zdenek Kabelac
f90082ce8f 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,
2021-02-10 15:39:03 +01:00
Zdenek Kabelac
2895180058 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.
2021-02-10 15:39:03 +01:00
Zdenek Kabelac
3cc9efc0ed snapshot: create origin of virtual snap read only
When creating old fashioned way thick virtual snapshot,
use read-only 'zero' _vorigin device.
2021-02-10 15:39:03 +01:00
Zdenek Kabelac
96910de4c7 dev-cache: remove duplicated allocation
Merge mistake missed to remove allocation that is now postponed
until it's really needed.
2021-02-10 15:38:18 +01:00
David Teigland
f74f94c2dd dev_get_primary_dev: fix invalid path check
Fix commit bee9f4efdd "filter-mpath: work with nvme devices"
which removed setting the path for readlink.
2021-02-09 09:52:53 -06:00
Zdenek Kabelac
427121efc7 dev-type: sysfs attrs without sectors
Split function for reading attrs in sectors.
2021-02-09 00:49:14 +01:00
Zdenek Kabelac
ef2e0d3d68 typo: fixes
forgotten merge from last batch.
2021-02-08 23:53:41 +01:00
Zdenek Kabelac
d280999b62 WHATS_NEW: updates 2021-02-08 23:43:38 +01:00
Zdenek Kabelac
d422aa7924 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.
2021-02-08 23:43:38 +01:00
Zdenek Kabelac
3bf2ca11d9 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.
2021-02-08 23:43:38 +01:00
Zdenek Kabelac
e429e69b65 dev-type: dev_is_pmem reuses topology read code 2021-02-08 23:43:38 +01:00
Zdenek Kabelac
2c597c73a8 dev-cache: better code reuse for _add_alias
Move path copying into _add_alish together with hashing.
Remove duplicated code.
2021-02-08 23:43:38 +01:00
Zdenek Kabelac
be9b731f44 dev-cache: check for nvme name while adding alias
Instead of repeated list retest, compare name once during add of alias.
2021-02-08 23:43:38 +01:00
Zdenek Kabelac
9b173bb931 targets: use target_present_version
Skip duplicated  dm version   ioctl() on every startup.
2021-02-08 23:43:38 +01:00
Zdenek Kabelac
6373f39092 tests: check event_activation can be disabled 2021-02-08 23:43:38 +01:00
Zdenek Kabelac
b86eb913c1 tests: support for resized cached LVs
Support for cached LVs is now enabled.
2021-02-08 23:43:38 +01:00
Zdenek Kabelac
5ec24dfb0b 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.
2021-02-08 23:43:10 +01:00
Zdenek Kabelac
39dec26508 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.
2021-02-08 23:18:44 +01:00
Zdenek Kabelac
bdc2f4c704 lv_resize: use 'bad' code path for error case 2021-02-08 23:18:44 +01:00
Zdenek Kabelac
eed060f040 thin: check for overprovisioning only once 2021-02-08 23:18:44 +01:00
Zdenek Kabelac
99e168162a thinpool: use lv_config_profil for crop_metadata
Better support for thin-pools with individual profiles introduced
in the recent patch b4212be2e7.
2021-02-08 23:18:44 +01:00
Zdenek Kabelac
2be585b79c 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:
117160b27e

When user sets lvm.conf global/event_activation=0
pvscan service will no longer auto activate any LVs on appeared PVs.
2021-02-08 23:18:44 +01:00
David Teigland
018bba897c fix for md component detection changes
And some fine tuning of when the checks are applied
in "start" mode.
2021-02-08 11:23:42 -06:00
David Teigland
df4c50396b lvmcache: remove unused variable from last commit 2021-02-08 10:22:56 -06:00