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

16761 Commits

Author SHA1 Message Date
Zdenek Kabelac
414f903cdc WHATS_NEW: update 2019-10-04 17:31:55 +02:00
Zdenek Kabelac
ca70dc4540 vdo: add lvs fields to query vdo volume properties
Add lots of vdo fields:

    vdo_operating_mode       - For vdo pools, its current operating mode.
    vdo_compression_state    - For vdo pools, whether compression is running.
    vdo_index_state          - For vdo pools, state of index for deduplication.
    vdo_used_size            - For vdo pools, currently used space.
    vdo_saving_percent       - For vdo pools, percentage of saved space.
    vdo_compression          - Set for compressed LV (vdopool).
    vdo_deduplication        - Set for deduplicated LV (vdopool).
    vdo_use_metadata_hints   - Use REQ_SYNC for writes (vdopool).
    vdo_minimum_io_size      - Minimum acceptable IO size (vdopool).
    vdo_block_map_cache_size - Allocated caching size (vdopool).
    vdo_block_map_era_length - Speed of cache writes (vdopool).
    vdo_use_sparse_index     - Sparse indexing (vdopool).
    vdo_index_memory_size    - Allocated indexing memory (vdopool).
    vdo_slab_size            - Increment size for growing (vdopool).
    vdo_ack_threads          - Acknowledging threads (vdopool).
    vdo_bio_threads          - IO submitting threads (vdopool).
    vdo_bio_rotation         - IO enqueue (vdopool).
    vdo_cpu_threads          - CPU threads for compression and hashing (vdopool).
    vdo_hash_zone_threads    - Threads for subdivide parts (vdopool).
    vdo_logical_threads      - Logical threads for subdivide parts (vdopool).
    vdo_physical_threads     - Physical threads for subdivide parts (vdopool).
    vdo_max_discard          - Maximum discard size volume can recieve (vdopool).
    vdo_write_policy         - Specified write policy (vdopool).
    vdo_header_size          - Header size at front of vdopool.

Previously only 'lvdisplay -m' was exposing them.
2019-10-04 17:31:55 +02:00
Zdenek Kabelac
862aa06e5e vdo: remember configure VDO write policy in metadata
Store write_policy in vdopool metadata.
In case it's not present 'auto' is selected.
2019-10-04 17:31:55 +02:00
Zdenek Kabelac
7ca9be034f vdo: field update 2019-10-04 17:31:55 +02:00
Zdenek Kabelac
cf8aee096f vdo: introduce get_vdo_write_policy_name 2019-10-04 17:31:55 +02:00
Zdenek Kabelac
c756f76802 vdo: correct internal API for set_vdo_write_policy
This is 'setting' function.
2019-10-04 17:31:55 +02:00
Zdenek Kabelac
9d8a028e8c vdo: keep minimum_io_size in sectors 2019-10-04 17:31:55 +02:00
Zdenek Kabelac
aad91330fe vdo: raise VDO default bio threads to 4
Since 'vdo create' tends to use this setting,
update lvm2 to provide same default.
2019-10-04 17:31:55 +02:00
Zdenek Kabelac
98419e0667 display: try to show status for inactive vdopool
Since we now support activation of 'vdo' volume
without explicit activation of 'vdopool' it's now possible
to have active layer vdopool (-vpool) volume and
having vdopool itself inactive - yet still in this
case we can show available stats for this volume.
But we need to show correct activation status and other
standard info.
2019-10-04 17:31:55 +02:00
Zdenek Kabelac
6a9a4b4534 resize: continue change for getting vdo status before resize
Continue commit a98b77c164.
There needs to be error reported when status can't be obtained.
2019-10-04 17:31:55 +02:00
Zdenek Kabelac
cb5f0bdba9 cache: report for succesful status 2019-10-04 17:31:55 +02:00
Mikulas Patocka
667b33dd3b dm: introduce DM_GET_TARGET_VERSION
Adds support for the DM_GET_TARGET_VERSION to dmsetup.
It introduces a new comman "target-version" that will accept list
of targets and print their version.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
2019-10-04 17:31:55 +02:00
Zdenek Kabelac
ebc9274be0 cmirrord: deamon links libdm
Correct included header files for this outdated tool since
it's linked with libdm, it need to use header files from this dir.
2019-10-04 17:31:55 +02:00
David Teigland
a68258339d lvmlockd: set failure flag for test mode
Set a failure flag when vg_read returns an error
for test mode.  The caller can segfault if there's
an error with no flag set.
2019-10-04 10:09:49 -05:00
Marian Csontos
b20b23dfc6 spec: Fix lvm2-activation-generator man page handling
lvm2-activation-generator is not installed when systemd is not in the
system.
2019-10-04 16:29:38 +02:00
David Teigland
d693041149 tests: add wipefs wrapper
which falls back to using dd on old systems without
the wipefs command
2019-10-02 14:11:08 -05:00
David Teigland
c2ff8876f9 tests: update to md dev name
Use /dev/md33 instead of /dev/md0 to reduce chances of
conflicting with an existing name.

Only call 'mdadm --stop /dev/md33' for cleanup and don't
use 'mdadm --stop --scan' to avoid stopping other md devs.
2019-10-02 14:09:51 -05:00
Heinz Mauelshagen
b138a87f43 test: increase size of raid10 LV allowing tests to succeed on fast storage
Also add health char check.
2019-10-02 15:25:43 +02:00
Heinz Mauelshagen
242e2dccc3 test: add RAID lvextend resynchronization test
Due to a dm-raid target flaw fixed in target version 1.15.0,
extents of raid sets don't get resynchronized when new MD bitmp
pages have to be allocated due to the extension.

Introduce lvextend-raid.sh to test this flaw.

Related: rhbz1671964
2019-10-02 15:25:41 +02:00
Heinz Mauelshagen
c4aba47dd0 test: add checks for not 100% sync ratio after initiation of check/repair
Related: rhbz1640630
2019-10-02 15:25:30 +02:00
David Teigland
7368cf8e7d pvck: handle PVs with zero metadata copies 2019-09-30 16:20:17 -05:00
David Teigland
1bfae5bf8e tests: update duplicate md tests
adjust to recent improvements in duplicate handling
2019-09-30 11:38:10 -05:00
David Teigland
f836fe3836 scan: use PV device name hint for choosing duplicate PV
Prefer a device if its name matches the PV device name hint.
2019-09-30 11:38:10 -05:00
David Teigland
4910a31f6d scan: use PV size for choosing duplicate PV
Prefer a device if it matches the size of the PV.
2019-09-30 11:38:10 -05:00
David Teigland
f3084ee2e5 scan: add PV summary info to lvmcache
Expand the lvmcache info that is saved by the scan to
include PV info from the metadata.
2019-09-30 11:38:10 -05:00
David Teigland
0c23d3fc84 pvscan: use quick activation only with matching PV device names
When the PV device names in the VG metadata do not match the
current PV device names seen on the system, do not use the
optimized activation function (that avoids extra device scanning.)

When the device names do not match, it's a clue that there could
be duplicate PVs, in which case we want to scan all devicess to
find any duplicates and stop the activation if found.

This does not prevent autoactivating a VG from the incorrect
duplicate PV, because the incorrect duplicate may appear by itself
first.  At that point its duplicate PV does not exist to be seen.
(A future enhancement could use the WWID to strengthen this
detection.)
2019-09-30 11:38:10 -05:00
David Teigland
3a8e41a67b metadata: import device name hint from metadata
Start by using it in a comment for a missing PV.
2019-09-30 11:38:10 -05:00
David Teigland
fcfabb26a5 metadata: add args to metadata import functions
instead of getting them through fid arg
no functional change
2019-09-30 11:38:10 -05:00
Bryn M. Reeves
8f02f8dcd7 dmsetup: do not treat no groups as an error in dmstats list --group
Analogous to the case of a device with no regions, it is not an
error to attempt to list the stats groups on a device that has no
configured groups: just return success and continue.
2019-09-30 17:10:05 +01:00
Zdenek Kabelac
5c0264d689 vdo: restore monitoring of vdo pool
Switch to -vpool layered name needs to monitor proper device.
2019-09-30 13:34:34 +02:00
Zdenek Kabelac
a98b77c164 vdo: properly check percentage for resize
Avoid checking 'lv_is_active()' since special LV types does this
validation anyway what calling  _percent() function  and call it
ONLY when none of special types is queried.

This restores support for VDO resize (as with support for
separate VDO pool activation, plain query for lv_is_active()
is not working in this case).
2019-09-30 13:34:34 +02:00
Zdenek Kabelac
c813db8fc2 vdo: deactivate forgotten vdo pool
If the linear mapping is lost (for whatever reason, i.e.
test suite forcible  'dmsetup remove' linear LV,
lvm2 had hard times figuring out how to deactivate such DM table.

So add function which is in case inactive VDO pool LV checks if
the pool is actually still active (-vpool device present) and
it has open count == 0.  In this case deactivation is allowed
to continue and cleanup DM table.
2019-09-30 13:34:34 +02:00
David Teigland
fd5b8b72da tests: mdadm stop in test cleanup
try to clear any existing md devs remaining after
a test
2019-09-27 12:51:34 -05:00
David Teigland
9680fd6d78 tests: skip md tests if system not clean 2019-09-27 12:40:42 -05:00
David Teigland
0673d13518 tests: writecache-split check have_writecache 2019-09-26 10:45:53 -05:00
Marian Csontos
90fe4b106b spec: enable writecache 2019-09-25 08:40:30 +02:00
Marian Csontos
dc3f0e067d build: make generate 2019-09-25 08:27:49 +02:00
David Teigland
9a8e6ad014 lvconvert: enable --uncache with dm-writecache cachevol
splitcache followed by an automatic lvremove of
the cachevol LV
2019-09-24 15:51:05 -05:00
David Teigland
26596ce7fa writecache: allow removing LV with attached writecache 2019-09-24 15:51:05 -05:00
David Teigland
76dd9b2b51 writecache: move code into new file
put writecache specific code in writecache_manip.c

should be no functional change
2019-09-24 15:51:05 -05:00
David Teigland
56aadd7fe2 lvremove: remove attached cachevol with removed LV
When an LV is removed that has an attached cachevol,
also remove the cachevol LV.
2019-09-24 15:51:05 -05:00
David Teigland
3b36de573e tests: update cache-single-split
add some uncache commands
2019-09-24 15:51:05 -05:00
David Teigland
f27625f005 lvconvert: enable --uncache with dm-cache cachevol
splitcache followed by an automatic lvremove of
the cachevol LV
2019-09-24 15:50:58 -05:00
David Teigland
4464004362 lvconvert: separate splitcache and uncache functions
Reorg code so there are separate functions for splitcache
and uncache for both cachepool and cachevol.  Should be no
functional change.
2019-09-24 13:55:21 -05:00
David Teigland
e35cf0f623 tests: add writecache-split 2019-09-23 16:35:01 -05:00
David Teigland
4fe4c30e7a lvconvert: allow --cache shortcut for --type cache with cachevol 2019-09-23 14:21:09 -05:00
David Teigland
a353bfdd9f tests: update cache-single-split
enable splitting while LV is active which works
again since the cvol suffix was dropped.
2019-09-23 14:21:09 -05:00
David Teigland
5191057d9d drop cvol dm uuid suffix for cachevol LVs
The "-cvol" suffix on the uuid is interfering with
activation code, so drop the suffix for now.
2019-09-23 14:13:31 -05:00
David Teigland
338a60bb41 tests: update cache-single-split
the new use of uuid suffixes on internal dm devs
has impacted splitting when an LV is active,
so temporarily disable that until fixed.
2019-09-20 16:36:14 -05:00
David Teigland
27c3c1d7c8 writecache: display layout and role fields 2019-09-20 14:55:11 -05:00