]> sourceware.org Git - lvm2.git/log
lvm2.git
4 years ago[bcache] add unit test
Joe Thornber [Tue, 29 Oct 2019 10:33:31 +0000 (10:33 +0000)]
[bcache] add unit test

abort-forces-read

4 years ago[label] Use bcache_abort_fd() to ensure blocks are no longer in the cache.
Joe Thornber [Mon, 28 Oct 2019 15:01:47 +0000 (15:01 +0000)]
[label] Use bcache_abort_fd() to ensure blocks are no longer in the cache.

The return value from bcache_invalidate_fd() was not being checked.

So I've introduced a little function, _invalidate_fd() that always
calls bcache_abort_fd() if the write fails.

4 years ago[bcache] add bcache_abort()
Joe Thornber [Mon, 28 Oct 2019 14:29:47 +0000 (14:29 +0000)]
[bcache] add bcache_abort()

This gives us a way to cope with write failures.

4 years agoWHATS_NEW
Zdenek Kabelac [Fri, 25 Oct 2019 22:48:00 +0000 (00:48 +0200)]
WHATS_NEW

4 years agotests: explicit testing of thin snapshot
Zdenek Kabelac [Fri, 25 Oct 2019 22:15:31 +0000 (00:15 +0200)]
tests: explicit testing of thin snapshot

Check merging of old snapshot of thin LV.

4 years agosnapshot: use single merging sequence
Zdenek Kabelac [Fri, 25 Oct 2019 21:29:16 +0000 (23:29 +0200)]
snapshot: use single merging sequence

The resume of 'released' 'COW' should preceed the resume of origin.
The fact we need to do the sequence differently for merge was
cause by bugs fixed in 2 previous commits - so we no longer need
to recognize 'merging' and we should always go with single
sequence.

The importance of this order is - to properly remove  '-real' device
from origin LV. When COW is activated as 2nd. '-real' device is
kept in table as it cannot be removed during 1st. resume of origin,
and later activation of COW LV no longer builds tree associated
with origin LV.

4 years agosnapshot: fix checking of merged thin volume
Zdenek Kabelac [Fri, 25 Oct 2019 21:30:26 +0000 (23:30 +0200)]
snapshot: fix checking of merged thin volume

When merging of thin snapshot is taking place, the origin target will
be of thin type.

4 years agosnapshot: correctly check device id of merged thin
Zdenek Kabelac [Fri, 25 Oct 2019 21:31:08 +0000 (23:31 +0200)]
snapshot: correctly check device id of merged thin

When checking device id of a thin device that is just being
merged - the snapshot actually could have been already finished
which means  '-real' suffix for the LV is already gone and just LV
is there - so check explicitely for this condition and use
correct UUID for this case.

4 years agolvmlockd: fix cachevol locking
David Teigland [Thu, 24 Oct 2019 22:09:00 +0000 (17:09 -0500)]
lvmlockd: fix cachevol locking

When a cachevol LV is attached, have the LV keep it's lock
allocated.  The lock on the cachevol won't be used while
it's attached.  When the cachevol is split a new lock does
not need to be allocated.  (Applies to cachevol usage by
both dm-cache and dm-writecache.)

4 years agotests: lvmlockd-lv-types handle new cpool renaming
David Teigland [Thu, 24 Oct 2019 18:26:33 +0000 (13:26 -0500)]
tests: lvmlockd-lv-types handle new cpool renaming

4 years agoman lvmthin: change wording about mounting xfs
David Teigland [Thu, 24 Oct 2019 15:09:41 +0000 (10:09 -0500)]
man lvmthin: change wording about mounting xfs

4 years agopost-release
Marian Csontos [Wed, 23 Oct 2019 07:47:26 +0000 (09:47 +0200)]
post-release

4 years agopre-release v2_03_06
Marian Csontos [Wed, 23 Oct 2019 07:46:23 +0000 (09:46 +0200)]
pre-release

4 years agocov: Fix memory leak
Marian Csontos [Wed, 28 Aug 2019 08:45:04 +0000 (10:45 +0200)]
cov: Fix memory leak

4 years agobuild: make generate
Marian Csontos [Wed, 23 Oct 2019 07:51:07 +0000 (09:51 +0200)]
build: make generate

4 years agoimprove command definition matching using type
David Teigland [Mon, 21 Oct 2019 21:42:06 +0000 (16:42 -0500)]
improve command definition matching using type

When a user includes "--type foo" in a command, only
look at command definitions with matching type, as
opposed to using matching/mismatching --type as a
vote for/against a given command def.  This means a
command with --type foo will prioritize a command def
with --type foo over other command defs that have
more matching options but an unmatching type.  This
makes it more likely that a closely matching command
def will be recommended.

4 years agocache: _cpool is protected suffix now
Zdenek Kabelac [Tue, 22 Oct 2019 14:07:21 +0000 (16:07 +0200)]
cache: _cpool is protected suffix now

4 years agotests: enable with 6.2.1
Zdenek Kabelac [Tue, 22 Oct 2019 14:06:19 +0000 (16:06 +0200)]
tests: enable with 6.2.1

Package vdo-6.2.2.18  goes with  kvdo version 6.2.1
Hopefully will get fixed soon.
Meanwhile to get test coverage...

4 years agodm: fix compilation of dmsetup
Marian Csontos [Mon, 21 Oct 2019 14:31:53 +0000 (16:31 +0200)]
dm: fix compilation of dmsetup

Fix: 889c88e9dab33195efc4dc0400a4b0aaa3383948
Use correct enum DM_DEVICE_GET_TARGET_VERSION.

4 years agotests: more suffixes
Zdenek Kabelac [Tue, 22 Oct 2019 11:31:23 +0000 (13:31 +0200)]
tests: more suffixes

4 years agogcc: older version can't see udev is always set
Zdenek Kabelac [Tue, 22 Oct 2019 08:43:11 +0000 (10:43 +0200)]
gcc: older version can't see udev is always set

4 years agovgchange: remove bogus option restriction
David Teigland [Mon, 21 Oct 2019 18:27:29 +0000 (13:27 -0500)]
vgchange: remove bogus option restriction

for -A with -a

4 years agocachevol: use cachepool code for metadata size
David Teigland [Mon, 21 Oct 2019 17:13:33 +0000 (12:13 -0500)]
cachevol: use cachepool code for metadata size

Based on a more detailed calculation, but because of
extent size rounding, the final result is about the
same.

4 years agoman: lvmcache naming updates
David Teigland [Mon, 21 Oct 2019 16:35:28 +0000 (11:35 -0500)]
man: lvmcache naming updates

4 years agogcc: avoid warning: declaration of xxx shadows a global declaration
Zdenek Kabelac [Mon, 21 Oct 2019 10:32:11 +0000 (12:32 +0200)]
gcc: avoid warning: declaration of xxx shadows a global declaration

Fix some gcc complaints again shadowing global declarations

4 years agogcc: all paths will set ret
Zdenek Kabelac [Mon, 21 Oct 2019 10:25:04 +0000 (12:25 +0200)]
gcc: all paths will set ret

Set success on common path.
Fixes random failure on writecache uncaching path.

4 years agogcc: older compiler is happier with this initilizer
Zdenek Kabelac [Mon, 21 Oct 2019 10:24:40 +0000 (12:24 +0200)]
gcc: older compiler is happier with this initilizer

4 years agotests: used cache_pool adds _cpool
Zdenek Kabelac [Mon, 21 Oct 2019 13:11:51 +0000 (15:11 +0200)]
tests: used cache_pool adds _cpool

4 years agocache: use _cpool for used cache-pools
Zdenek Kabelac [Mon, 21 Oct 2019 10:03:19 +0000 (12:03 +0200)]
cache: use _cpool for used cache-pools

When LV gets cached and uses cache-pool - such cache-pool
will now get _cpool suffix automatically.

Thus 'Pool' column for cached LV will now show either _cvol
or _cpool LV.

4 years agocache: drop _cpool suffix from unused cache-pool
Zdenek Kabelac [Mon, 21 Oct 2019 07:22:32 +0000 (09:22 +0200)]
cache: drop _cpool suffix from unused cache-pool

Drop _cpool prefix if present and cache-pool is going to be unused.

4 years agolvconvert: use new functions
Zdenek Kabelac [Mon, 21 Oct 2019 07:18:34 +0000 (09:18 +0200)]
lvconvert: use new functions

4 years agolvm-string: add drop_lvname_suffix
Zdenek Kabelac [Mon, 21 Oct 2019 07:17:57 +0000 (09:17 +0200)]
lvm-string: add drop_lvname_suffix

Internal function to drop suffix out of lvname.

4 years agolv_manip: add lv_uniq_rename_update
Zdenek Kabelac [Mon, 21 Oct 2019 07:16:45 +0000 (09:16 +0200)]
lv_manip: add lv_uniq_rename_update

Add function to rename LV to either passed name or if
the name is already in use, generate new lvol% name.

4 years agopvck: dump metadata search
David Teigland [Thu, 17 Oct 2019 22:24:22 +0000 (17:24 -0500)]
pvck: dump metadata search

Improve the implementation of extracting all text metadata
copies from the metadata area.  Use this for the existing
metadata_all dump option.

Add a new metadata_search dump option which does not use
lvm headers to find metadata, but looks in standard
locations.  This is useful if headers are damaged and
can't be used to locate metadata.

Adding '-v' to metadata_all or metadata_search will add
the description and creation_time to the printed list of
metadata instances that are found.

5 years agotests: cachevol needs FORMAT2
Zdenek Kabelac [Wed, 16 Oct 2019 19:58:57 +0000 (21:58 +0200)]
tests: cachevol needs FORMAT2

FORMAT2 is mandatory with cachevols...

5 years agotests: skip when raid is not present
Zdenek Kabelac [Wed, 16 Oct 2019 19:58:39 +0000 (21:58 +0200)]
tests: skip when raid is not present

5 years agocachevol: support removal of cachevol
Zdenek Kabelac [Thu, 17 Oct 2019 10:48:56 +0000 (12:48 +0200)]
cachevol: support removal of cachevol

Removal of cachevol is equivalent of lvconvert --uncache
and works the same way as with cachepool.

5 years agocache: single code for removal of cached volume
Zdenek Kabelac [Thu, 17 Oct 2019 10:53:54 +0000 (12:53 +0200)]
cache: single code for removal of cached volume

Use same routine for dropping cached LV for cachevol and cachepool.

5 years agodebug: missing trace
Zdenek Kabelac [Thu, 17 Oct 2019 10:40:13 +0000 (12:40 +0200)]
debug: missing trace

5 years agocachevol: move cvol rename
Zdenek Kabelac [Wed, 16 Oct 2019 10:10:47 +0000 (12:10 +0200)]
cachevol: move cvol rename

Move rename of CVOL after archive().

5 years agocachevol: move flag setting after taking archive
Zdenek Kabelac [Wed, 16 Oct 2019 19:22:20 +0000 (21:22 +0200)]
cachevol: move flag setting after taking archive

Before 'archive()' is called, lvm2 must not touch/modify metadata.
So move setting  CACHE_VOL related flags past this point.

Also make sure reading of cache segtype always restores this
flag properly (even if compatible flag would be lost).

5 years agocache: drop validation check
Zdenek Kabelac [Wed, 16 Oct 2019 16:47:20 +0000 (18:47 +0200)]
cache: drop validation check

Since now we can cache either with cache-pool LV or
any other LV (being used as cachevol LV) drop the
validation condition.

5 years agocache: add more comments for min meta size
Zdenek Kabelac [Wed, 16 Oct 2019 16:46:03 +0000 (18:46 +0200)]
cache: add more comments for min meta size

Enhance source code with better explanation how the minimal
metadata size is evaluated from data size and chunk size.

5 years agocachevol: use CVOL UUID for cdata and cmeta layered devices
Zdenek Kabelac [Wed, 16 Oct 2019 14:05:51 +0000 (16:05 +0200)]
cachevol: use CVOL UUID for cdata and cmeta layered devices

Since code is using -cdata and -cmeta UUID suffixes, it does not need
any new 'extra' ID to be generated and stored in metadata.

Since introduce of new 'segtype' cache+CACHE_USES_CACHEVOL we can
safely assume 'new' cache with cachevol will now be created
without extra metadata_id and data_id in metadata.

For backward compatibility, code still reads them in case older
version of metadata have them - so it still should be able
to activate such volumes.

Bonus is lowered size of lv structure used to store info about LV
(noticable with big volume groups).

5 years agotests: metadata-zero-space long vgnames
David Teigland [Wed, 16 Oct 2019 14:46:48 +0000 (09:46 -0500)]
tests: metadata-zero-space long vgnames

In the hex dump output, grep for the vgname
followed by one space.  This allows for test pids
with up to seven digits, which are used to contruct
the variable vgname used by the test.  Otherwise
the long vgname wraps to the next line and fails to
match in grep.

5 years agowritecache: add cvol suffix to attached cachevol
David Teigland [Tue, 15 Oct 2019 21:03:34 +0000 (16:03 -0500)]
writecache: add cvol suffix to attached cachevol

When an LV is used as a writecache cachevol, give
it the LV name a _cvol suffix.  Remove the suffix
when the cachevol is detached, restoring the
original LV name.

5 years agocache: change default cachevol metadata sizes
David Teigland [Tue, 15 Oct 2019 19:16:14 +0000 (14:16 -0500)]
cache: change default cachevol metadata sizes

The first part of a cachevol LV is used for metadata,
and the rest of the space is used for data.  The
division of space between metadata and data depends
on the total size of the cachevol.

The previous division gave more space than needed to
metadata, it was:

cachevol size 8M to 128M -> metadata size 16M *
cachevol size 128M to 1G -> metadata size 32M
cachevol size 1G and up  -> metadata size 64M

(* if this resulted in over half the LV used as
metadata, then half the cachevol would be used
for metadata, and the other half for data.)

The division of space now gives less space to
metadata, it is:

cachevol size 8M to 16M  -> metadata size 4M
cachevol size 16M to 4G  -> metadata size 8M
cachevol size 4G to 16G  -> metadata size 16M
cachevol size 16G to 32G -> metadata size 32M
cachevol size 32G and up -> metadata size 64M

5 years agoallow activating known LVs when other LVs have unknown segtypes
David Teigland [Mon, 14 Oct 2019 20:51:35 +0000 (15:51 -0500)]
allow activating known LVs when other LVs have unknown segtypes

When a VG contains some LVs with unknown segtypes, the user
should still be allowed to activate other LVs in the VG that
are understood.

$ lvs foo
  WARNING: Unrecognised flag CACHE_USES_CACHEVOL in segment type cache+CACHE_USES_CACHEVOL.
  WARNING: Unrecognised segment type cache+CACHE_USES_CACHEVOL
  LV    VG  Attr       LSize
  lvol0 foo -wi-------  4.00m
  other foo vwi---u--- 48.00m

$ lvcreate -l1 foo
  WARNING: Unrecognised flag CACHE_USES_CACHEVOL in segment type cache+CACHE_USES_CACHEVOL.
  WARNING: Unrecognised segment type cache+CACHE_USES_CACHEVOL
  Cannot change VG foo with unknown segments in it!
  Cannot process volume group foo

$ lvchange -ay foo/lvol0
  WARNING: Unrecognised flag CACHE_USES_CACHEVOL in segment type cache+CACHE_USES_CACHEVOL.
  WARNING: Unrecognised segment type cache+CACHE_USES_CACHEVOL

$ lvchange -ay foo/other
  WARNING: Unrecognised flag CACHE_USES_CACHEVOL in segment type cache+CACHE_USES_CACHEVOL.
  WARNING: Unrecognised segment type cache+CACHE_USES_CACHEVOL
  Refusing activation of LV foo/other containing an unrecognised segment.

$ lvs foo
  WARNING: Unrecognised flag CACHE_USES_CACHEVOL in segment type cache+CACHE_USES_CACHEVOL.
  WARNING: Unrecognised segment type cache+CACHE_USES_CACHEVOL
  LV    VG  Attr       LSize
  lvol0 foo -wi-a-----  4.00m
  other foo vwi---u--- 48.00m

5 years agocache: change cachevol flags for backward compat
David Teigland [Mon, 14 Oct 2019 20:32:13 +0000 (15:32 -0500)]
cache: change cachevol flags for backward compat

A cachevol LV had the CACHE_VOL status flag in metadata,
and the cache LV using it had no new flag.  This caused
problems if the new metadata was used by an old version
of lvm.  An old version of lvm would have two problems
processing the new metadata:

. The old lvm would return an error when reading the VG
  metadata when it saw the unknown CACHE_VOL status flag.

. The old lvm would return an error when reading the VG
  metadata because it would not find an expected cache pool
  attached to the cache LV (since the cache LV had a
  cachevol attached instead.)

Change the use of flags:

. Change the CACHE_VOL flag to be a COMPATIBLE flag (instead
  of a STATUS flag) so that old versions will not fail when
  they see it.

. When a cache LV is using a cachevol, the cache LV gets
  a new SEGTYPE flag CACHE_USES_CACHEVOL.  This flag is
  appended to the segtype name, so that old lvm versions
  will fail to use the LV because of an unknown segtype,
  as opposed to failing to read the VG.

5 years agotests: cvol
Zdenek Kabelac [Sat, 12 Oct 2019 22:02:58 +0000 (00:02 +0200)]
tests: cvol

5 years agotests: drop manipulation with 'internal' LV
Zdenek Kabelac [Sat, 12 Oct 2019 21:56:55 +0000 (23:56 +0200)]
tests: drop manipulation with 'internal' LV

Cachevol LV is 'internal' LV and should not be 'maintained'  this way
while it's being used as cachevol.

5 years agocachevol: drop no longer needed functions
Zdenek Kabelac [Mon, 14 Oct 2019 08:23:51 +0000 (10:23 +0200)]
cachevol: drop no longer needed functions

Code is no longer used/needed.

5 years agocachevol: use lv_cache_remove
Zdenek Kabelac [Mon, 14 Oct 2019 08:25:31 +0000 (10:25 +0200)]
cachevol: use lv_cache_remove

Use same routine for dropping cache.

5 years agocachevol: improve manipulation with dm tree
Zdenek Kabelac [Mon, 14 Oct 2019 08:31:38 +0000 (10:31 +0200)]
cachevol: improve manipulation with dm tree

Enhance activation of cached devices using cachevol.
Correctly instatiace  cachevol -cdata & -cmeta devices with
'-' in name (as they are only layered devices).
Code is also a bit more compacted (although still not ideal,
as the usage of extra UUIDs stored in metadata is troublesome
and will be repaired later).

NOTE: this patch my brink potentially minor incompatiblity for 'runtime' upgrade

5 years agocachevol: put _cvol as protected suffix.
Zdenek Kabelac [Mon, 7 Oct 2019 12:58:26 +0000 (14:58 +0200)]
cachevol: put _cvol as protected suffix.

This revert "drop cvol dm uuid suffix for cachevol LVs"
commit 5191057d9df3e5b92db3f80c412b99aea1074358.
Start using -cvol for  DM UUID.

5 years agocachevol: use writethrough for partial removal
Zdenek Kabelac [Sat, 12 Oct 2019 21:38:56 +0000 (23:38 +0200)]
cachevol: use writethrough for partial removal

Instead of using 'noflush' option, switch cache_mode into WRITETHROUGH
which does not require flushing, when user confirmed he does not
want flushing for WRITEBACK (because of (partially) missing caching PV)

5 years agocachevol: drop LV_CACHE_VOL on detach automatically
Zdenek Kabelac [Mon, 14 Oct 2019 08:45:10 +0000 (10:45 +0200)]
cachevol: drop LV_CACHE_VOL on detach automatically

Move dropping of cachevol flag into detach function.
TODO: this flag should be internal to lvm2.

5 years agocachevol: rename converted LV to _cvol
Zdenek Kabelac [Sat, 12 Oct 2019 21:37:17 +0000 (23:37 +0200)]
cachevol: rename converted LV to _cvol

When converting existing public LV to internally used
'CacheVol' LV - rename LV to LV_cvol.

When splitting CacheVol, remove _cvol suffix.

5 years agocachevol: wipe 'normal' device
Zdenek Kabelac [Fri, 11 Oct 2019 13:27:41 +0000 (15:27 +0200)]
cachevol: wipe 'normal' device

For wiping we activate and clear 'regular' devices,
since in case of whole process interuption (i.e. kill -9)
we leave metadata & DM table and workable state all the time.

5 years agocache: enhance removal function to work with cvol
Zdenek Kabelac [Mon, 14 Oct 2019 08:43:04 +0000 (10:43 +0200)]
cache: enhance removal function to work with cvol

To keep things simple, use same code for all cache removal functions,
not just for cachepools but also cachevols.

5 years agocache: correct condition
Zdenek Kabelac [Sat, 12 Oct 2019 21:40:58 +0000 (23:40 +0200)]
cache: correct condition

5 years agocache: recognize cachevol with lv_cache_remove
Zdenek Kabelac [Sat, 12 Oct 2019 21:40:15 +0000 (23:40 +0200)]
cache: recognize cachevol with lv_cache_remove

5 years agocache: reload only when switched to cleaner policy
Zdenek Kabelac [Sat, 12 Oct 2019 09:12:11 +0000 (11:12 +0200)]
cache: reload only when switched to cleaner policy

Reload cache target only when lvm2 reload table with
cache with clearer policy.

5 years agolvconvert: use struct initializer
Zdenek Kabelac [Mon, 14 Oct 2019 09:53:59 +0000 (11:53 +0200)]
lvconvert: use struct initializer

Always good to keep rest of structure initilized with zeros.

5 years agotests: disable caching of VDO
Zdenek Kabelac [Wed, 9 Oct 2019 13:27:44 +0000 (15:27 +0200)]
tests: disable caching of VDO

Disable until vdo gets fixed, then require fixed version.
Otherwise test kills kernel

5 years agolvconvert: fix return value when zeroing fails
Zdenek Kabelac [Mon, 14 Oct 2019 09:54:49 +0000 (11:54 +0200)]
lvconvert: fix return value when zeroing fails

Use correct error return code for fail path.

5 years agovgck: let updatemetadata repair mismatched metadata
David Teigland [Tue, 8 Oct 2019 19:44:24 +0000 (14:44 -0500)]
vgck: let updatemetadata repair mismatched metadata

Let vgck --updatemetadata repair cases where different mdas
hold indepedently valid but unmatching copies of the metadata,
i.e. different text metadata checksums or text metadata sizes.

5 years agovgck: fix updatemetadata writing different descriptions
David Teigland [Tue, 8 Oct 2019 19:36:55 +0000 (14:36 -0500)]
vgck: fix updatemetadata writing different descriptions

vgck --updatemetadata would write the same correct
metadata to good mdas, and then to bad mdas, but the
sequence of vg_write/vg_commit calls betwen good and
bad mdas could cause a different description field to
be generated for good/bad mdas. (The description field
describing the command was recently included in the
ondisk copy of the metadata text.)

5 years agopvmove: remove some cmirror related code
David Teigland [Fri, 11 Oct 2019 16:12:11 +0000 (11:12 -0500)]
pvmove: remove some cmirror related code

which is no longer used

5 years agotest: Minimize data written by metadata-zero-space
Marian Csontos [Wed, 9 Oct 2019 13:11:03 +0000 (15:11 +0200)]
test: Minimize data written by metadata-zero-space

The test is checking only 2 megabytes, but is rewriting much more. Bad
for limited ramdisk.

5 years agoman: lvmcache note dm-cache block size issue
David Teigland [Tue, 8 Oct 2019 14:59:38 +0000 (09:59 -0500)]
man: lvmcache note dm-cache block size issue

5 years agovgremove: remove internal lvmlock LV
David Teigland [Fri, 4 Oct 2019 17:01:30 +0000 (12:01 -0500)]
vgremove: remove internal lvmlock LV

If a VG is forcibly changed from lock_type sanlock to
lock_type none, the internal lvmlock LV is left behind.
If that LV is not removed before vgremove is run on the
VG, then an internal check will be triggered by the
hidden lvmlock LV.  So, check for and remove a left over
lvmlock LV during vgremove.

5 years agotests: improve lib wipefs_a
David Teigland [Fri, 4 Oct 2019 16:04:44 +0000 (11:04 -0500)]
tests: improve lib wipefs_a

in wipefs fallback, use limited dd and mdadm --zero-superblock
to avoid writing to entire dev in case dev space is provisioned
on write.

5 years agoWHATS_NEW: update
Zdenek Kabelac [Fri, 4 Oct 2019 15:30:52 +0000 (17:30 +0200)]
WHATS_NEW: update

5 years agovdo: add lvs fields to query vdo volume properties
Zdenek Kabelac [Fri, 4 Oct 2019 15:02:20 +0000 (17:02 +0200)]
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.

5 years agovdo: remember configure VDO write policy in metadata
Zdenek Kabelac [Fri, 4 Oct 2019 13:09:11 +0000 (15:09 +0200)]
vdo: remember configure VDO write policy in metadata

Store write_policy in vdopool metadata.
In case it's not present 'auto' is selected.

5 years agovdo: field update
Zdenek Kabelac [Mon, 30 Sep 2019 13:29:01 +0000 (15:29 +0200)]
vdo: field update

5 years agovdo: introduce get_vdo_write_policy_name
Zdenek Kabelac [Fri, 4 Oct 2019 12:59:00 +0000 (14:59 +0200)]
vdo: introduce get_vdo_write_policy_name

5 years agovdo: correct internal API for set_vdo_write_policy
Zdenek Kabelac [Fri, 4 Oct 2019 12:59:25 +0000 (14:59 +0200)]
vdo: correct internal API for set_vdo_write_policy

This is 'setting' function.

5 years agovdo: keep minimum_io_size in sectors
Zdenek Kabelac [Fri, 4 Oct 2019 12:58:18 +0000 (14:58 +0200)]
vdo: keep minimum_io_size in sectors

5 years agovdo: raise VDO default bio threads to 4
Zdenek Kabelac [Fri, 4 Oct 2019 12:52:40 +0000 (14:52 +0200)]
vdo: raise VDO default bio threads to 4

Since 'vdo create' tends to use this setting,
update lvm2 to provide same default.

5 years agodisplay: try to show status for inactive vdopool
Zdenek Kabelac [Fri, 4 Oct 2019 14:57:54 +0000 (16:57 +0200)]
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.

5 years agoresize: continue change for getting vdo status before resize
Zdenek Kabelac [Wed, 2 Oct 2019 12:50:12 +0000 (14:50 +0200)]
resize: continue change for getting vdo status before resize

Continue commit a98b77c16455ee97f5bd4b89536a3ae4efd8e009.
There needs to be error reported when status can't be obtained.

5 years agocache: report for succesful status
Zdenek Kabelac [Tue, 1 Oct 2019 11:31:36 +0000 (13:31 +0200)]
cache: report for succesful status

5 years agodm: introduce DM_GET_TARGET_VERSION
Mikulas Patocka [Mon, 16 Sep 2019 09:58:10 +0000 (05:58 -0400)]
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>
5 years agocmirrord: deamon links libdm
Zdenek Kabelac [Fri, 4 Oct 2019 15:23:34 +0000 (17:23 +0200)]
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.

5 years agolvmlockd: set failure flag for test mode
David Teigland [Fri, 4 Oct 2019 15:07:24 +0000 (10:07 -0500)]
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.

5 years agospec: Fix lvm2-activation-generator man page handling
Marian Csontos [Fri, 4 Oct 2019 14:29:38 +0000 (16:29 +0200)]
spec: Fix lvm2-activation-generator man page handling

lvm2-activation-generator is not installed when systemd is not in the
system.

5 years agotests: add wipefs wrapper
David Teigland [Wed, 2 Oct 2019 19:11:08 +0000 (14:11 -0500)]
tests: add wipefs wrapper

which falls back to using dd on old systems without
the wipefs command

5 years agotests: update to md dev name
David Teigland [Wed, 2 Oct 2019 17:51:17 +0000 (12:51 -0500)]
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.

5 years agotest: increase size of raid10 LV allowing tests to succeed on fast storage
Heinz Mauelshagen [Wed, 2 Oct 2019 12:59:17 +0000 (14:59 +0200)]
test: increase size of raid10 LV allowing tests to succeed on fast storage

Also add health char check.

5 years agotest: add RAID lvextend resynchronization test
Heinz Mauelshagen [Wed, 2 Oct 2019 12:54:00 +0000 (14:54 +0200)]
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

5 years agotest: add checks for not 100% sync ratio after initiation of check/repair
Heinz Mauelshagen [Wed, 2 Oct 2019 12:48:53 +0000 (14:48 +0200)]
test: add checks for not 100% sync ratio after initiation of check/repair

Related: rhbz1640630

5 years agopvck: handle PVs with zero metadata copies
David Teigland [Mon, 30 Sep 2019 21:20:17 +0000 (16:20 -0500)]
pvck: handle PVs with zero metadata copies

5 years agotests: update duplicate md tests
David Teigland [Fri, 27 Sep 2019 19:18:35 +0000 (14:18 -0500)]
tests: update duplicate md tests

adjust to recent improvements in duplicate handling

5 years agoscan: use PV device name hint for choosing duplicate PV
David Teigland [Fri, 27 Sep 2019 16:34:55 +0000 (11:34 -0500)]
scan: use PV device name hint for choosing duplicate PV

Prefer a device if its name matches the PV device name hint.

5 years agoscan: use PV size for choosing duplicate PV
David Teigland [Fri, 27 Sep 2019 16:11:57 +0000 (11:11 -0500)]
scan: use PV size for choosing duplicate PV

Prefer a device if it matches the size of the PV.

5 years agoscan: add PV summary info to lvmcache
David Teigland [Thu, 26 Sep 2019 16:27:38 +0000 (11:27 -0500)]
scan: add PV summary info to lvmcache

Expand the lvmcache info that is saved by the scan to
include PV info from the metadata.

5 years agopvscan: use quick activation only with matching PV device names
David Teigland [Wed, 4 Sep 2019 20:59:49 +0000 (15:59 -0500)]
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.)

5 years agometadata: import device name hint from metadata
David Teigland [Wed, 4 Sep 2019 19:13:14 +0000 (14:13 -0500)]
metadata: import device name hint from metadata

Start by using it in a comment for a missing PV.

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