]> sourceware.org Git - lvm2.git/log
lvm2.git
3 years agopost-release
Marian Csontos [Sun, 9 Aug 2020 14:16:39 +0000 (16:16 +0200)]
post-release

3 years agopre-release v2_03_10
Marian Csontos [Sun, 9 Aug 2020 14:15:31 +0000 (16:15 +0200)]
pre-release

3 years agoWHATS_NEW
Marian Csontos [Sun, 9 Aug 2020 14:15:13 +0000 (16:15 +0200)]
WHATS_NEW

3 years agobuild: make generate
Marian Csontos [Sun, 9 Aug 2020 13:20:22 +0000 (15:20 +0200)]
build: make generate

4 years agoWHATS_NEW: Add writecache lvmdbusd
Tony Asleson [Thu, 6 Aug 2020 20:42:49 +0000 (15:42 -0500)]
WHATS_NEW: Add writecache lvmdbusd

4 years agolvmdbusd: Bump LVM DBus API version
Vojtech Trefny [Wed, 1 Jul 2020 11:27:47 +0000 (13:27 +0200)]
lvmdbusd: Bump LVM DBus API version

So users can check for writecache support.

4 years agolvmdbusd: Add support for LVM writecache
Vojtech Trefny [Wed, 1 Jul 2020 11:27:46 +0000 (13:27 +0200)]
lvmdbusd: Add support for LVM writecache

4 years agotests: Adapt RAID test to changes
Marian Csontos [Tue, 28 Jul 2020 15:36:57 +0000 (17:36 +0200)]
tests: Adapt RAID test to changes

Change 3c9177fdc0b8 causes a conversion of raid1 volume to a raid1 with
the same number of legs succeed with a warning.

4 years agocachevol: add LV type restrictions to command defs
David Teigland [Thu, 23 Jul 2020 20:10:35 +0000 (15:10 -0500)]
cachevol: add LV type restrictions to command defs

LV type restrictions were missed on the command definitions.

4 years agocachevol: generate a unique name when creating
David Teigland [Thu, 23 Jul 2020 18:07:32 +0000 (13:07 -0500)]
cachevol: generate a unique name when creating

When a cachevol is automatically created, if the default name
conflicts with an existing name, generate a new unique name.

4 years agolvconvert: display warning if raid1 LV image count does not change
Heinz Mauelshagen [Mon, 20 Jul 2020 13:36:25 +0000 (15:36 +0200)]
lvconvert: display warning if raid1 LV image count does not change

Fix "lvconvert -mN $RaidLV" to display a warning in
case the same number of images is being requested.

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

4 years agointegrity: allow type option to be set when changing mirrors
David Teigland [Wed, 15 Jul 2020 15:57:05 +0000 (10:57 -0500)]
integrity: allow type option to be set when changing mirrors

Allow the optional '--type raid1' to be included in the lvconvert
command when adding or removing raid images with integrity.
It does not change the meaning of the command (specifying a type
that matches the current type is redundant but generally allowed.)

4 years agolvmdbusd: recognize lv attr letter g for integrity
David Teigland [Wed, 15 Jul 2020 15:07:28 +0000 (10:07 -0500)]
lvmdbusd: recognize lv attr letter g for integrity

4 years agolvconvert: preset raid1 in case of striped conversions
Heinz Mauelshagen [Thu, 9 Jul 2020 16:51:33 +0000 (18:51 +0200)]
lvconvert: preset raid1 in case of striped conversions

Fixed invoking "lvconvert -m+1 $StripedLV" to cause errors
(preset raid conversion implied by '-m').

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

4 years agodevices: simplify md superblock checking code
David Teigland [Thu, 19 Sep 2019 17:17:36 +0000 (12:17 -0500)]
devices: simplify md superblock checking code

4 years agodevices: detect md ddf and imsm superblocks
David Teigland [Thu, 19 Sep 2019 16:33:59 +0000 (11:33 -0500)]
devices: detect md ddf and imsm superblocks

4 years agolvconvert: fix conversion to 'mirrored' mirror log with larger regionsize
Heinz Mauelshagen [Thu, 9 Jul 2020 12:09:46 +0000 (14:09 +0200)]
lvconvert: fix conversion to 'mirrored' mirror log with larger regionsize

merge.c:_check_lv_segment() was checking regionsize vs. mirrored LV size on
any 'mirror/raid1/raid10' segment type including type 'mirrored' mirror logs.

Avoid the check only for 'mirrored' mirror logs to allow conversion from log
type 'disk' with regionsize > mirror log SubLV size.

As we disabled support for 'mirrored' mirror logs with
commit e82303fd6abc3ae43168f8032806c7c17d181a3e which still conditionally
allows to enable it via global/support_mirrored_mirror_logs=1,
patch is mandatory for all distributions.

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

4 years agodebug: missing stacktrace
Zdenek Kabelac [Wed, 8 Jul 2020 09:06:39 +0000 (11:06 +0200)]
debug: missing stacktrace

4 years agoraid: no wiping when zeroing raid metadata device
Zdenek Kabelac [Wed, 8 Jul 2020 08:59:51 +0000 (10:59 +0200)]
raid: no wiping when zeroing raid metadata device

Currently lvm2 is not wiping signatures when creating 'metadata' volumes
and raid _rmeta was the only exception - so make the behavior consistent
with other metadata devices and drop wiping ATM.
Drop also some extra debug since they are now more explanatory in
wipe_lv() function.
Also note - although lvm2 now does not wipe signatures - the error
from such wipping used to be actually 'ignored' before wipe_lv()
started to return error (with recent commit) and raid creation
continued with 'unzeroed' metadata device.

TODO: Several issues to resolve:

1. We may want to flip to wipping with all LVs (in that case we need to
support passing --yet & --force).

2. Also we may want to clear whole metadata device - however current
function is also used for wipping i.e. snapshot COW device which
is likely not a good candidate for full device zeroing.
We may also need to think about better logic when extent size is
enforcing very large LVs, when only a small portion of LV is ever
being used.

3. Using TRIM instead of zeroing metadata device might be worth to
implement.

mm

4 years agolvconvert: more support for yes conversion
Zdenek Kabelac [Wed, 8 Jul 2020 08:57:52 +0000 (10:57 +0200)]
lvconvert: more support for yes conversion

When converting volume to pool LV use also wiping of other signatures.
For writecache & pool conversion support --yet and --force
to bypass prompting for signature wiping.
For writecache drop unneded zero_sectors.

Note: currently we have lvconvert doing convertion and prompting
for confirmation of conversion - and then again wipe_lv() prompts
for removing i.e. filesystem signature - we should unify this
prompting into 1 message  - althought the 'filesystem' discovery
needs active volume - while the 1st. conversion prompt can
work without active converted volume.

4 years agowipe_lv: always zero at least 4K
Zdenek Kabelac [Wed, 8 Jul 2020 08:38:36 +0000 (10:38 +0200)]
wipe_lv: always zero at least 4K

When zero_sectors passed value like 1 - we could zero only 1 sector.
Reinstantiate we always zero at least 4K block.

4 years agowritecache: skip fs block size check in test mode
David Teigland [Tue, 7 Jul 2020 18:20:18 +0000 (13:20 -0500)]
writecache: skip fs block size check in test mode

if doing so requires activating the LV

4 years agointegrity: add initial size to metadata size
David Teigland [Tue, 30 Jun 2020 17:52:27 +0000 (12:52 -0500)]
integrity: add initial size to metadata size

The metadata device size needs to include space for
the dm-integrity "initial_sectors" which hold journals.

4 years agotests: check pool metadata are zeroed
Zdenek Kabelac [Wed, 24 Jun 2020 12:42:11 +0000 (14:42 +0200)]
tests: check pool metadata are zeroed

4 years agotests: failure of zeroing fails command
Zdenek Kabelac [Tue, 23 Jun 2020 12:10:18 +0000 (14:10 +0200)]
tests: failure of zeroing fails command

4 years agomake: make generate
Zdenek Kabelac [Tue, 23 Jun 2020 10:19:35 +0000 (12:19 +0200)]
make: make generate

update

4 years agoman: update cache page
Zdenek Kabelac [Tue, 23 Jun 2020 10:19:54 +0000 (12:19 +0200)]
man: update cache page

Few more sentences around migration threshold.

4 years agocov: avoid double call of free_hints() on error path
Zdenek Kabelac [Mon, 22 Jun 2020 09:07:34 +0000 (11:07 +0200)]
cov: avoid double call of free_hints() on error path

Since we 'free_hints()' on return error path from call of
_read_hint_file(), avoid calling it twice in the middle of
error path process.

4 years agocov: remove unused header
Zdenek Kabelac [Tue, 16 Jun 2020 14:38:15 +0000 (16:38 +0200)]
cov: remove unused header

4 years agocov: use 64bit arithmetic
Zdenek Kabelac [Wed, 10 Jun 2020 21:36:06 +0000 (23:36 +0200)]
cov: use 64bit arithmetic

Although values of VDO block_map_cache_size, index_memory_size, slab_size
should not overflow here - use proper 64bit math.

4 years agopool: zero metadata
Zdenek Kabelac [Wed, 24 Jun 2020 10:11:21 +0000 (12:11 +0200)]
pool: zero metadata

To avoid polution of metadata with some 'garbage' content or eventualy
some leak of stale data in case user want to upload metadata somewhere,
ensure upon allocation the metadata device is fully zeroed.

Behaviour may slow down allocation of thin-pool or cache-pool a bit
so the old behaviour can be restored with lvm.conf setting:
allocation/zero_metadata=0

TODO: add zeroing for extension of metadata volume.

4 years agowipe_lv: make error a fatal event
Zdenek Kabelac [Tue, 23 Jun 2020 11:56:15 +0000 (13:56 +0200)]
wipe_lv: make error a fatal event

Failure in wiping/zeroing stop the command.
If user wants to avoid command abortion he should use -Zn or -Wn
to avoid wiping.

Note: there is no easy way to distinguish which kind of failure has
happend - so it's safe to not proceed any futher.

4 years agobcache: support longer writes
Zdenek Kabelac [Wed, 24 Jun 2020 11:37:23 +0000 (13:37 +0200)]
bcache: support longer writes

When initiated larger write request, it may have happened, bcache
got out of free chunks - fix the loop, that is supposed to wait
until next free chunk becomes avain available.

4 years agolv{resize,extend,reduce}: also check for 2-legged raid4
Heinz Mauelshagen [Wed, 24 Jun 2020 12:02:29 +0000 (14:02 +0200)]
lv{resize,extend,reduce}: also check for 2-legged raid4

Users can also convert 2-legged raid1 to raid4 thus causing 'Bus error'
on resize requests.

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

4 years agolv{resize,extend,reduce}: reject size change on 2-legged raid5*
Heinz Mauelshagen [Wed, 24 Jun 2020 11:52:53 +0000 (13:52 +0200)]
lv{resize,extend,reduce}: reject size change on 2-legged raid5*

Reject size changing request in to avoid 'Bus error' and
display hint to convert to more stripes.

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

4 years agoman: lvmcache info about cachedevice usage
David Teigland [Thu, 11 Jun 2020 22:01:01 +0000 (17:01 -0500)]
man: lvmcache info about cachedevice usage

4 years agotests: cachevol-cachedevice
David Teigland [Fri, 10 Apr 2020 21:59:16 +0000 (16:59 -0500)]
tests: cachevol-cachedevice

4 years agolvcreate: new cache or writecache lv with single command
David Teigland [Fri, 10 Apr 2020 18:17:37 +0000 (13:17 -0500)]
lvcreate: new cache or writecache lv with single command

To create a new cache or writecache LV with a single command:

lvcreate --type cache|writecache
    -n Name -L Size --cachedevice PVfast VG [PVslow ...]

- A new main linear|striped LV is created as usual, using the
  specified -n Name and -L Size, and using the optionally
  specified PVslow devices.
- Then, a new cachevol LV is created internally, using PVfast
  specified by the cachedevice option.
- Then, the cachevol is attached to the main LV, converting the
  main LV to type cache|writecache.

Include --cachesize Size to specify the size of cache|writecache
to create from the specified --cachedevice PVs, otherwise the
entire cachedevice PV is used.  The --cachedevice option can be
repeated to create the cache from multiple devices, or the
cachedevice option can contain a tag name specifying a set of PVs
to allocate the cache from.

To create a new cache or writecache LV with a single command
using an existing cachevol LV:

lvcreate --type cache|writecache
    -n Name -L Size --cachevol LVfast VG [PVslow ...]

- A new main linear|striped LV is created as usual, using the
  specified -n Name and -L Size, and using the optionally
  specified PVslow devices.
- Then, the cachevol LVfast is attached to the main LV, converting
  the main LV to type cache|writecache.

In cases where more advanced types (for the main LV or cachevol LV)
are needed, they should be created independently and then combined
with lvconvert.

Example
-------

user creates a new VG with one slow device and one fast device:

$ vgcreate vg /dev/slow1 /dev/fast1

user creates a new 8G main LV on /dev/slow1 that uses all of
/dev/fast1 as a writecache:

$ lvcreate --type writecache --cachedevice /dev/fast1
    -n main -L 8G vg /dev/slow1

Example
-------

user creates a new VG with two slow devs and two fast devs:

$ vgcreate vg /dev/slow1 /dev/slow2 /dev/fast1 /dev/fast2

user creates a new 8G main LV on /dev/slow1 and /dev/slow2
that uses all of /dev/fast1 and /dev/fast2 as a writecache:

$ lvcreate --type writecache --cachedevice /dev/fast1 --cachedevice /dev/fast2
    -n main -L 8G vg /dev/slow1 /dev/slow2

Example
-------

A user has several slow devices and several fast devices in their VG,
the slow devs have tag @slow, the fast devs have tag @fast.

user creates a new 8G main LV on the slow devs with a
2G writecache on the fast devs:

$ lvcreate --type writecache -n main -L 8G
    --cachedevice @fast --cachesize 2G vg @slow

4 years agolvconvert: single step cachevol creation and attachment
David Teigland [Wed, 5 Feb 2020 19:42:36 +0000 (13:42 -0600)]
lvconvert: single step cachevol creation and attachment

To add a cache or writecache to a main LV with a single command:

lvconvert --type cache|writecache --cachedevice /dev/ssd vg/main

A cachevol LV will be allocated from the specified cache device,
then attached to the main LV.  Include --cachesize to specify the
size of cachevol to create, otherwise the entire cachedevice is
used.  The cachedevice option can be repeated to create a cachevol
from multiple devices.

Example
-------

A user has an existing main LV that they want to speed up
using a new ssd.

user adds the new ssd to the VG:

$ vgextend vg /dev/ssd

user attaches the new ssd their main LV:

$ lvconvert --type writecache --cachedevice /dev/ssd vg/main

Example
-------

A user has two existing main LVs that they want to speed up
with a new ssd.

user adds the new 16G ssd to the VG:

$ vgextend vg /dev/ssd

user attaches some of the new ssd to the first main LV,
using half of the space:

$ lvconvert --type writecache --cachedevice /dev/ssd
    --cachesize 8G vg/main1

user attaches some of the new ssd to the second main LV,
using the other half of the space:

$ lvconvert --type writecache --cachedevice /dev/ssd
    --cachesize 8G vg/main2

Example
-------

A user has an existing main LV that they want to speed up using
two new ssds.

user adds the new two ssds the VG:

$ vgextend vg /dev/ssd1
$ vgextend vg /dev/ssd2

user attaches both ssds their main LV:

$ lvconvert --type writecache
    --cachedevice /dev/ssd1 --cachedevice /dev/ssd2 vg/main

4 years agointegrity: wait for raid sync to complete
David Teigland [Tue, 16 Jun 2020 17:29:41 +0000 (12:29 -0500)]
integrity: wait for raid sync to complete

4 years agointegrity: avoid increasing logical block size of active LV
David Teigland [Tue, 16 Jun 2020 16:59:59 +0000 (11:59 -0500)]
integrity: avoid increasing logical block size of active LV

When adding integrity to an active LV, avoid choosing an
integrity block size that would result in increasing the
logical block size of the LV.

4 years agotests: integrity and block size
David Teigland [Mon, 15 Jun 2020 19:08:28 +0000 (14:08 -0500)]
tests: integrity and block size

4 years agoimprove get_fs_block_size string to number
David Teigland [Thu, 11 Jun 2020 20:05:47 +0000 (15:05 -0500)]
improve get_fs_block_size string to number

4 years agotests: fix typo in writecache-blocksize
David Teigland [Thu, 11 Jun 2020 18:15:38 +0000 (13:15 -0500)]
tests: fix typo in writecache-blocksize

4 years agotests: expand integrity-blocksize
David Teigland [Thu, 11 Jun 2020 17:46:47 +0000 (12:46 -0500)]
tests: expand integrity-blocksize

4 years agointegrity: fix block size check when inactive
David Teigland [Thu, 11 Jun 2020 17:43:52 +0000 (12:43 -0500)]
integrity: fix block size check when inactive

Checking fs block size requires the LV to be active.

4 years agofix libblkid BLOCK_SIZE check
David Teigland [Thu, 11 Jun 2020 17:43:07 +0000 (12:43 -0500)]
fix libblkid BLOCK_SIZE check

4 years agotests: writecache tests
David Teigland [Wed, 10 Jun 2020 21:08:28 +0000 (16:08 -0500)]
tests: writecache tests

backport updates from later commits

4 years agowritecache: activate to check block size
David Teigland [Wed, 10 Jun 2020 20:58:25 +0000 (15:58 -0500)]
writecache: activate to check block size

backport fixes from later commit

4 years agowritecache: allow snapshot of LV with writecache
David Teigland [Mon, 13 Apr 2020 20:58:28 +0000 (15:58 -0500)]
writecache: allow snapshot of LV with writecache

4 years agofix bad result from _cache_min_metadata_size
David Teigland [Fri, 10 Apr 2020 21:57:12 +0000 (16:57 -0500)]
fix bad result from _cache_min_metadata_size

fixes regression from switching to use _cache_min_metadata_size
(commit c08704cee7e34a96fdaa453faf900683283e8691) which returns
a bogus value when the cachevol size is 8MB.

4 years agotests: writecache-blocksize
David Teigland [Wed, 8 Apr 2020 20:33:30 +0000 (15:33 -0500)]
tests: writecache-blocksize

4 years agowritecache: add settings cleaner and max_age
David Teigland [Tue, 31 Mar 2020 19:14:50 +0000 (14:14 -0500)]
writecache: add settings cleaner and max_age

available in dm-writecache 1.2

4 years agowritecache: attach while active using fs block size
David Teigland [Mon, 30 Mar 2020 21:25:15 +0000 (16:25 -0500)]
writecache: attach while active using fs block size

Use libblkid to detect sector/block size of the fs on the LV.
Use this to choose a compatible writecache block size.
Enable attaching writecache to an active LV.

4 years agowritecache: cachesettings in lvchange and lvs
David Teigland [Wed, 26 Feb 2020 20:47:29 +0000 (14:47 -0600)]
writecache: cachesettings in lvchange and lvs

lvchange --cachesettings
lvs -o+cache_settings

4 years agowritecache: show error in lv_health_status and lv_attr
David Teigland [Tue, 25 Feb 2020 22:20:05 +0000 (16:20 -0600)]
writecache: show error in lv_health_status and lv_attr

lv_attr is 'E' and lv_health_status is 'error'
when dm-writecache status reports error.

4 years agowritecache: remove from an active lv
David Teigland [Mon, 24 Feb 2020 19:52:12 +0000 (13:52 -0600)]
writecache: remove from an active lv

4 years agoblkdeactivate: add missing VDO_AVAILABLE check in deactivate_vdo
Peter Rajnoha [Mon, 8 Jun 2020 13:41:35 +0000 (15:41 +0200)]
blkdeactivate: add missing VDO_AVAILABLE check in deactivate_vdo

4 years agoimprove info about vgck updatemetadata
David Teigland [Wed, 3 Jun 2020 17:38:27 +0000 (12:38 -0500)]
improve info about vgck updatemetadata

Add man page info about this option, and add log messages
pointing to this option.

4 years agoChange dev->bcache_fd default value from 0 to -1
Zhao Heming [Mon, 1 Jun 2020 17:22:15 +0000 (12:22 -0500)]
Change dev->bcache_fd default value from 0 to -1

This fix can avoid bcache_fd will mistakenly open/close in later.

Signed-off-by: Zhao Heming <heming.zhao@suse.com>
4 years agoRevert "pvck: dump headers_only to skip metadata text"
David Teigland [Fri, 29 May 2020 18:26:43 +0000 (13:26 -0500)]
Revert "pvck: dump headers_only to skip metadata text"

This reverts commit 5410dd5441aa827b381ff64dfc6be6e4589d87a1.

Accidental push.

4 years agointegrity: skip calling add when removing images
David Teigland [Fri, 29 May 2020 18:18:24 +0000 (13:18 -0500)]
integrity: skip calling add when removing images

When lvconvert is used to remove raid images, we can
skip calling lv_add_integrity_to_raid(), which finds
nothing to do, but the the blocksize validation would
be called unnecessarily and trigger spurious errors.

4 years agotests: integrity wait for sync
David Teigland [Fri, 29 May 2020 15:57:56 +0000 (10:57 -0500)]
tests: integrity wait for sync

The test was using a raid+integrity LV without
first waiting for the integrity sync, which could
cause the test to fail (depending on init speed)
where it depends on integrity to work in uninitialized
areas.

Also use cmp instead of diff.

4 years agopvck: dump headers_only to skip metadata text
David Teigland [Thu, 28 May 2020 20:51:59 +0000 (15:51 -0500)]
pvck: dump headers_only to skip metadata text

pvck --dump headers reads the metadata text area
to compute the text metadata checksum to compare
with the mda_header checksum.
The new header_only will skip reading the metadata
text and not validate the mda_header checksum.

4 years agotest: Warn and exit on problematic integrity device behavior
Marian Csontos [Thu, 28 May 2020 15:04:35 +0000 (17:04 +0200)]
test: Warn and exit on problematic integrity device behavior

The first leg of integrity enabled raid device sometimes does not get
recalculated.

4 years agolvconvert: error when using existing cachevol
David Teigland [Fri, 22 May 2020 18:44:33 +0000 (13:44 -0500)]
lvconvert: error when using existing cachevol

Check if LV is an existing cachevol before attempting
to use it again as a cachevol or cachepool.

4 years agotests: also udev wait on clean-up path
Zdenek Kabelac [Thu, 21 May 2020 13:19:31 +0000 (15:19 +0200)]
tests: also udev wait on clean-up path

4 years agotest: Use printf to generate data
Marian Csontos [Thu, 21 May 2020 13:33:24 +0000 (15:33 +0200)]
test: Use printf to generate data

...to avoid unnecessary dependency on python

4 years agotests: Use python single liner to generate data
Marian Csontos [Wed, 6 May 2020 10:10:50 +0000 (12:10 +0200)]
tests: Use python single liner to generate data

4 years agobuild: make generate
Marian Csontos [Thu, 21 May 2020 13:02:31 +0000 (15:02 +0200)]
build: make generate

4 years agotests: add wait on udev processing
Zdenek Kabelac [Fri, 15 May 2020 14:56:40 +0000 (16:56 +0200)]
tests: add wait on udev processing

Trying to avoid collision with udev watch rule preventing to
succeed 'dmsetup remove' becuase it keeps device open.

4 years agolist: use container_of
Zdenek Kabelac [Fri, 15 May 2020 12:41:23 +0000 (14:41 +0200)]
list:  use container_of

Reuse macro

4 years agopvck: set dump on one call
Zdenek Kabelac [Fri, 15 May 2020 13:05:39 +0000 (15:05 +0200)]
pvck: set dump on one call

arg_str_value() has built-in  arg_is_set().

Also this makes it obvious to coverity 'dump != NULL' & 'repair != NULL'
at the branch code path.

4 years agocov: lvconvert: missing check for function failure
Zdenek Kabelac [Sun, 17 May 2020 16:29:54 +0000 (18:29 +0200)]
cov: lvconvert: missing check for function failure

4 years agocov: check strdup for NULL
Zdenek Kabelac [Fri, 15 May 2020 15:22:18 +0000 (17:22 +0200)]
cov: check strdup for NULL

4 years agocov: check for deactivation failure
Zdenek Kabelac [Fri, 15 May 2020 15:44:03 +0000 (17:44 +0200)]
cov: check for deactivation failure

4 years agolvmcache: free vginfo lock_type
David Teigland [Thu, 14 May 2020 15:20:08 +0000 (10:20 -0500)]
lvmcache: free vginfo lock_type

4 years agohints: free hint structs on exit
David Teigland [Wed, 13 May 2020 22:19:41 +0000 (17:19 -0500)]
hints: free hint structs on exit

and free on a couple error paths.

4 years agodevs: add some checks for a dev with no path name
David Teigland [Wed, 13 May 2020 20:47:20 +0000 (15:47 -0500)]
devs: add some checks for a dev with no path name

It's possible for a dev-cache entry to remain after all
paths for it have been removed, and other parts of the
code expect that a dev always has a name.  A better fix
may be to remove a device from dev-cache after all paths
to it have been removed.

4 years agolvmlockd: use 4K sector size when any dev is 4K
David Teigland [Mon, 11 May 2020 18:08:39 +0000 (13:08 -0500)]
lvmlockd: use 4K sector size when any dev is 4K

When either logical block size or physical block size is 4K,
then lvmlockd creates sanlock leases based on 4K sectors,
but the lvm client side would create the internal lvmlock LV
based on the first logical block size it saw in the VG,
which could be 512.  This could cause the lvmlock LV to be
too small to hold all the sanlock leases. Make the lvm client
side use the same sizing logic as lvmlockd.

4 years agospec: Enable integrity
Marian Csontos [Tue, 5 May 2020 12:12:32 +0000 (14:12 +0200)]
spec: Enable integrity

4 years agolvmlockd: replace lock adopt info source
David Teigland [Mon, 4 May 2020 18:35:03 +0000 (13:35 -0500)]
lvmlockd: replace lock adopt info source

The lock adopt feature was disabled since it had used
lvmetad as a source of info.  This replaces the lvmetad
info with a local file and enables the adopt feature again
(enabled with lvmlockd --adopt 1).

4 years agoremove vg_read_error
David Teigland [Fri, 24 Apr 2020 16:14:29 +0000 (11:14 -0500)]
remove vg_read_error

Once converted results to error numbers but is now just a null check.

4 years agouse refresh_filters only where needed
David Teigland [Wed, 22 Apr 2020 19:08:54 +0000 (14:08 -0500)]
use refresh_filters only where needed

Filters are changed and need refresh in only one
place (vgimportclone), so avoid doing the refresh
for every other command that doesn't need it.

4 years agoFix scripts/lvmlocks.service.in using nonexistent --lock-opt autowait
Maxim Plotnikov [Tue, 21 Apr 2020 21:16:29 +0000 (00:16 +0300)]
Fix scripts/lvmlocks.service.in using nonexistent --lock-opt autowait

The --lock-opt autowait was dropped back in 9ab6bdce01,
and attempting to specify it has quite an opposite effect:
no waiting is done, which makes the unit almost useless.

4 years agolvmcache: rework handling of VGs with duplicate vgnames
David Teigland [Tue, 28 Jan 2020 17:47:37 +0000 (11:47 -0600)]
lvmcache: rework handling of VGs with duplicate vgnames

The previous method of managing duplicate vgnames prevented
vgreduce from working if a foreign vg with the same name
existed.

4 years agopass cmd struct through more functions
David Teigland [Tue, 28 Jan 2020 16:33:15 +0000 (10:33 -0600)]
pass cmd struct through more functions

no functional change

4 years agolvmcache_get_mda: remove unused function
David Teigland [Mon, 27 Jan 2020 19:15:27 +0000 (13:15 -0600)]
lvmcache_get_mda: remove unused function

4 years agovgrename: fix error value when name exists
David Teigland [Tue, 21 Apr 2020 14:33:56 +0000 (09:33 -0500)]
vgrename: fix error value when name exists

4 years agoWHATS_NEW: integrity with raid
David Teigland [Wed, 15 Apr 2020 16:04:12 +0000 (11:04 -0500)]
WHATS_NEW: integrity with raid

4 years agoAllow dm-integrity to be used for raid images
David Teigland [Wed, 20 Nov 2019 22:07:27 +0000 (16:07 -0600)]
Allow dm-integrity to be used for raid images

dm-integrity stores checksums of the data written to an
LV, and returns an error if data read from the LV does
not match the previously saved checksum.  When used on
raid images, dm-raid will correct the error by reading
the block from another image, and the device user sees
no error.  The integrity metadata (checksums) are stored
on an internal LV allocated by lvm for each linear image.
The internal LV is allocated on the same PV as the image.

Create a raid LV with an integrity layer over each
raid image (for raid levels 1,4,5,6,10):

lvcreate --type raidN --raidintegrity y [options]

Add an integrity layer to images of an existing raid LV:

lvconvert --raidintegrity y LV

Remove the integrity layer from images of a raid LV:

lvconvert --raidintegrity n LV

Settings

Use --raidintegritymode journal|bitmap (journal is default)
to configure the method used by dm-integrity to ensure
crash consistency.

Initialization

When integrity is added to an LV, the kernel needs to
initialize the integrity metadata/checksums for all blocks
in the LV.  The data corruption checking performed by
dm-integrity will only operate on areas of the LV that
are already initialized.  The progress of integrity
initialization is reported by the "syncpercent" LV
reporting field (and under the Cpy%Sync lvs column.)

Example: create a raid1 LV with integrity:

$ lvcreate --type raid1 -m1 --raidintegrity y -n rr -L1G foo
  Creating integrity metadata LV rr_rimage_0_imeta with size 12.00 MiB.
  Logical volume "rr_rimage_0_imeta" created.
  Creating integrity metadata LV rr_rimage_1_imeta with size 12.00 MiB.
  Logical volume "rr_rimage_1_imeta" created.
  Logical volume "rr" created.
$ lvs -a foo
  LV                  VG  Attr       LSize  Origin              Cpy%Sync
  rr                  foo rwi-a-r---  1.00g                     4.93
  [rr_rimage_0]       foo gwi-aor---  1.00g [rr_rimage_0_iorig] 41.02
  [rr_rimage_0_imeta] foo ewi-ao---- 12.00m
  [rr_rimage_0_iorig] foo -wi-ao----  1.00g
  [rr_rimage_1]       foo gwi-aor---  1.00g [rr_rimage_1_iorig] 39.45
  [rr_rimage_1_imeta] foo ewi-ao---- 12.00m
  [rr_rimage_1_iorig] foo -wi-ao----  1.00g
  [rr_rmeta_0]        foo ewi-aor---  4.00m
  [rr_rmeta_1]        foo ewi-aor---  4.00m

4 years agomove pv_list code into lib
David Teigland [Tue, 14 Jan 2020 20:12:20 +0000 (14:12 -0600)]
move pv_list code into lib

4 years agoblkdeactivate: add support for VDO in blkdeactivate script
Peter Rajnoha [Thu, 9 Apr 2020 13:23:58 +0000 (15:23 +0200)]
blkdeactivate: add support for VDO in blkdeactivate script

Make it possible to tear down VDO volumes with blkdeactivate if VDO is
part of a device stack (and if VDO binary is installed). Also, support
optional -o|--vdooptions configfile=file.

4 years agoWHATS_NEWS: update
Zdenek Kabelac [Wed, 8 Apr 2020 13:22:25 +0000 (15:22 +0200)]
WHATS_NEWS: update

4 years agotest: repair of thin-pool used by foreign apps
Zdenek Kabelac [Wed, 8 Apr 2020 13:20:33 +0000 (15:20 +0200)]
test: repair of thin-pool used by foreign apps

4 years agolvconvert: no validation for thin-pools not used by lvm2
Zdenek Kabelac [Wed, 8 Apr 2020 09:46:42 +0000 (11:46 +0200)]
lvconvert: no validation for thin-pools not used by lvm2

lvm2 supports thin-pool to be later used by other tools doing
virtual volumes themself (i.e. docker) - in this case we
shall not validate transaction Id - is this is used by
other tools and lvm2 keeps value 0 - so the transationId
validation need to be skipped in this case.

4 years agopost-release
Marian Csontos [Thu, 26 Mar 2020 11:22:09 +0000 (12:22 +0100)]
post-release

4 years agopre-release v2_03_09
Marian Csontos [Thu, 26 Mar 2020 11:21:16 +0000 (12:21 +0100)]
pre-release

4 years agovdo: make vdopool wrapping device is read-only
Zdenek Kabelac [Wed, 11 Mar 2020 11:57:44 +0000 (12:57 +0100)]
vdo: make vdopool wrapping device is read-only

When vdopool is activated standalone - we use a wrapping linear device
to hold actual vdo device active - for this we can set-up read-only
device to ensure there cannot be made write through this device to
actual pool device.

4 years agotest: Fix previous commit
Marian Csontos [Wed, 18 Mar 2020 17:03:12 +0000 (18:03 +0100)]
test: Fix previous commit

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