]> sourceware.org Git - lvm2.git/log
lvm2.git
5 years agoadd device hints to reduce scanning
David Teigland [Fri, 7 Dec 2018 20:35:22 +0000 (14:35 -0600)]
add device hints to reduce scanning

Save the list of PVs in /run/lvm/hints.  These hints
are used to reduce scanning in a number of commands
to only the PVs on the system, or only the PVs in a
requested VG (rather than all devices on the system.)

5 years agoraid: man regenerated
Zdenek Kabelac [Tue, 8 Jan 2019 12:06:03 +0000 (13:06 +0100)]
raid: man regenerated

5 years agomirror: regenerate config
Zdenek Kabelac [Tue, 8 Jan 2019 12:05:06 +0000 (13:05 +0100)]
mirror: regenerate config

Drop extra line in source file - since this line is auto-generated
and would appear twice in resuling .in file with 'make generate'.

5 years agovdo: regenerate config
Zdenek Kabelac [Tue, 8 Jan 2019 12:04:42 +0000 (13:04 +0100)]
vdo: regenerate config

5 years agoconfig: drop extra spaces
Zdenek Kabelac [Mon, 7 Jan 2019 16:39:55 +0000 (17:39 +0100)]
config: drop extra spaces

5 years agogenerators: avoid contacting syslog with generators
Zdenek Kabelac [Mon, 7 Jan 2019 14:48:39 +0000 (15:48 +0100)]
generators: avoid contacting syslog with generators

The systemd generators are executed very early during the switch
from initramfs to system partition and the syslog is not yet fully
operational - it may cause blocking, if some debug logging is enabled
at the same time in /etc/lvm/lvm.conf log{} section.

To avoid timeouting and killing this generator - rather enhance lvm
code to suppress any syslog communication when LVM_SUPPRESS_SYSLOG
envvar is set.

Use of this envvar is needed since the parsing of i.e. cmdline options
that could eventually override lvm.conf setting happens in this case
way too late and number of lines could have been already streamed to
syslog.

5 years agoscripts: lvm2-activation-generator fix lvmconfig call
Peter Rajnoha [Fri, 4 Jan 2019 10:11:13 +0000 (11:11 +0100)]
scripts: lvm2-activation-generator fix lvmconfig call

Fix a scenario where global/event_activation setting is not found. In
this case we need to take default value just like lvm tools do when
executed. So use "lvmconfig --type full".

Also, if we fail to execute lvmconfig for whatever reason, fallback to
generating the activation units as failsafe action.

Reported by: Bastian Blank <waldi debian org>

5 years agowritecache: use wipe_lv to warn about specific signatures
David Teigland [Thu, 3 Jan 2019 16:37:26 +0000 (10:37 -0600)]
writecache: use wipe_lv to warn about specific signatures

When initializing an LV to hold the writecache, use wipe_lv()
which looks for specific signatures on the LV.

Wiping signatures is not necessary, but printing a warning
that names a specific signature (in addition to the existing
generic warning/confirmation) may help if a user accidentally
specifies the wrong LV which contains something important.

5 years agowritecache: prompt before using an LV to hold cache
David Teigland [Wed, 2 Jan 2019 17:44:03 +0000 (11:44 -0600)]
writecache: prompt before using an LV to hold cache

5 years agoRevert "lvconvert: use standard wiping code"
David Teigland [Wed, 2 Jan 2019 17:21:45 +0000 (11:21 -0600)]
Revert "lvconvert: use standard wiping code"

This reverts commit fb85d5d02478a34ab6648bdbdf09a931176dee71.

Adding a confirmation prompt in the following commit so the
wiping confirmation won't be needed.

5 years agotests: indent
Zdenek Kabelac [Sat, 22 Dec 2018 23:55:00 +0000 (00:55 +0100)]
tests: indent

5 years agotests: fix unit test
Zdenek Kabelac [Sat, 22 Dec 2018 23:54:39 +0000 (00:54 +0100)]
tests: fix unit test

Use more universal  /usr/bin/env bash
(as older systems do only have /bin/sh)
Uncommment disabled event_activation testing.

5 years agotests: testing mirrorred mirror log
Zdenek Kabelac [Sun, 23 Dec 2018 00:06:16 +0000 (01:06 +0100)]
tests: testing mirrorred mirror log

Enable mirrorlog creation for test.

5 years agodebug: drop some unneeded backtraces
Zdenek Kabelac [Sat, 22 Dec 2018 22:44:42 +0000 (23:44 +0100)]
debug: drop some unneeded backtraces

5 years agocleanup: use zalloc
Zdenek Kabelac [Sat, 22 Dec 2018 22:33:23 +0000 (23:33 +0100)]
cleanup: use zalloc

Some places forget to use zalloc().

5 years agocov: fix memleak on error path
Zdenek Kabelac [Sat, 22 Dec 2018 22:37:04 +0000 (23:37 +0100)]
cov: fix memleak on error path

Do not leak lvs pointer on error path.

5 years agostats: initilize regions to NULL
Zdenek Kabelac [Fri, 21 Dec 2018 21:42:36 +0000 (22:42 +0100)]
stats: initilize regions to NULL

Commit 3750b0cff5ab1c41076afdf8275e3fa20aa756d0 used bad: error
path in more occasions thus it now needs regions defined as NULL.

5 years agoRevert "lvmlockd: Fix arguments when built without sanlock"
Zdenek Kabelac [Fri, 21 Dec 2018 21:41:00 +0000 (22:41 +0100)]
Revert "lvmlockd: Fix arguments when built without sanlock"

This reverts commit b068f21f6a24094936a33269067c18373b48f2cd.

This revert was incorrect.

5 years agocov: extent_size cannot be 0
Zdenek Kabelac [Fri, 21 Dec 2018 19:55:50 +0000 (20:55 +0100)]
cov: extent_size cannot be 0

Make this obvious to coverity.

5 years agocov: drop unneeded header file
Zdenek Kabelac [Fri, 21 Dec 2018 19:52:49 +0000 (20:52 +0100)]
cov: drop unneeded header file

MAX macro no longer needed in pe_align.

5 years agocov: looks like cut&paste error
Zdenek Kabelac [Fri, 21 Dec 2018 19:22:55 +0000 (20:22 +0100)]
cov: looks like cut&paste error

Fua and nofua code path should have different compares.

5 years agocov: ensure lock_type is not NULL
Zdenek Kabelac [Fri, 21 Dec 2018 19:04:35 +0000 (20:04 +0100)]
cov: ensure lock_type is not NULL

5 years agomangenerator: check strdup was successfull
Zdenek Kabelac [Fri, 21 Dec 2018 20:08:31 +0000 (21:08 +0100)]
mangenerator: check strdup was successfull

Check for strdup != NULL
and drop unneeded zeroing when buffer is overwritten.

5 years agodebug: tracing close errors
Zdenek Kabelac [Fri, 21 Dec 2018 19:26:15 +0000 (20:26 +0100)]
debug: tracing close errors

5 years agodebug: drop some extra backtraces
Zdenek Kabelac [Fri, 21 Dec 2018 19:24:56 +0000 (20:24 +0100)]
debug: drop some extra backtraces

Unneeded tracking after log_*.

5 years agobcache: fix memory leak on error path
Zdenek Kabelac [Fri, 21 Dec 2018 20:01:18 +0000 (21:01 +0100)]
bcache: fix memory leak on error path

Coverity noticed missing free of io struct on error path.

5 years agodmeventd: unlock lvm2 lock on error path
Zdenek Kabelac [Fri, 21 Dec 2018 20:29:05 +0000 (21:29 +0100)]
dmeventd: unlock lvm2 lock on error path

New code missed to unlock locked lvm2 on error path when
command is not configured.

5 years agolvconvert: writecache fix return code
Zdenek Kabelac [Fri, 21 Dec 2018 19:49:36 +0000 (20:49 +0100)]
lvconvert: writecache fix return code

Detach function return 0 for error and 1 for success.
Add missing log errors from failing deactivation.
Add missing log error from failing synchronization.

5 years agolvconvert: use standard wiping code
Zdenek Kabelac [Fri, 21 Dec 2018 19:39:39 +0000 (20:39 +0100)]
lvconvert: use standard wiping code

5 years agocleanup: missing copyright header
Zdenek Kabelac [Fri, 21 Dec 2018 11:58:03 +0000 (12:58 +0100)]
cleanup: missing copyright header

5 years agostats: fix error path when region is NULL
Zdenek Kabelac [Fri, 21 Dec 2018 19:12:40 +0000 (20:12 +0100)]
stats: fix error path when region is NULL

We should not call _stats_cleanup_region_ids() when regions
are NULL.
Also add backtracing for  goto.

5 years agoscripts: simplify including for generator
Zdenek Kabelac [Fri, 21 Dec 2018 18:14:32 +0000 (19:14 +0100)]
scripts: simplify including for generator

Uses included .c file as primary header includer.

5 years agoscripts: avoid voiding write result
Zdenek Kabelac [Fri, 21 Dec 2018 10:19:25 +0000 (11:19 +0100)]
scripts: avoid voiding write result

Gcc doesn't want to ignore write() return code.

5 years agolvmlockd: drop superfluous defines
Zdenek Kabelac [Fri, 21 Dec 2018 10:16:05 +0000 (11:16 +0100)]
lvmlockd: drop superfluous defines

These defines are automatically granted with _GNU_SOURCE
which is use for whole compilation via configure.h.

5 years agolvmlockd: use commonly used define NOTIFYDBUS_SUPPORT
Zdenek Kabelac [Fri, 21 Dec 2018 10:17:43 +0000 (11:17 +0100)]
lvmlockd: use commonly used define NOTIFYDBUS_SUPPORT

Build with configured NOTIFYDBUS_SUPPORT, SYSTEMD_LIBS, SYSTEMD_CFLAGS.
Also add proper build dependencies on internal libraries.

5 years agolvmlockd: fix error return code for _init_vg_sanlock
Zdenek Kabelac [Fri, 21 Dec 2018 11:08:10 +0000 (12:08 +0100)]
lvmlockd: fix error return code for _init_vg_sanlock

In few cases error paths from initialization were returned as
'success == 1'.

Also assing num_mb with single compare checking valid sector_size.

For dumb compiler make num_mb always defined.

5 years agolvmpolld: improve makefile deps
Zdenek Kabelac [Fri, 21 Dec 2018 10:24:00 +0000 (11:24 +0100)]
lvmpolld: improve makefile deps

Add correct build dependencies on internal libraries.

5 years agoconfigure: avoid repeative inclusion of configure.h
Zdenek Kabelac [Fri, 21 Dec 2018 18:11:49 +0000 (19:11 +0100)]
configure: avoid repeative inclusion of configure.h

Since configure.h is a generated header and it's missing traditional
ifdefs preambule - it can be included & parsed multiple times.
Normally compiler is fine when defines have same value and there is
no warning - yet we don't need to parse this several times
and by adding -include  directive we can ensure every file
in the package is rightly compile with configure.h as the
first header file.

5 years agotests/dbus: Re-enable nesting and pvcreate via symlink
Tony Asleson [Tue, 18 Dec 2018 18:43:57 +0000 (12:43 -0600)]
tests/dbus: Re-enable nesting and pvcreate via symlink

If we are running the test where the device is /dev/* we will will
run the unit tests 'test_nesting' and 'test_pv_symlinks'.  Otherwise
we will skip them.

5 years agolvmdbusd: Handle exported VG(s)
Tony Asleson [Tue, 18 Dec 2018 15:51:50 +0000 (09:51 -0600)]
lvmdbusd: Handle exported VG(s)

When a VG is exported, the 'fullreport' returns an exit code of 5, but
otherwise returns the data we are wanting.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
5 years agolvmdbusd: Exit daemon when unable to retrieve state
Tony Asleson [Tue, 18 Dec 2018 15:49:36 +0000 (09:49 -0600)]
lvmdbusd: Exit daemon when unable to retrieve state

In some cases we get stuck where we are unable to retrieve the current
state of lvm as we are encountering an error.  When the error is
persistent we will log and exit the daemon instead of consuming vast
amounts of resources.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
5 years agolib: move towards v2 version of VDO format
Zdenek Kabelac [Thu, 20 Dec 2018 12:17:30 +0000 (13:17 +0100)]
lib: move towards v2 version of VDO format

Drop very old original format of VDO target and focus on V2 version.
So some variables were renamed or replaced.
There is no compatibility preserved (with assumption so far this is
experimental feature and there is no real user).

Note - version currently VDO calls this version 6.2.

5 years agodmeventd: resolve compilation of vdo status parsing
Zdenek Kabelac [Wed, 19 Dec 2018 11:54:14 +0000 (12:54 +0100)]
dmeventd: resolve compilation of vdo status parsing

A bit of chicken & egg problem - dmeventd needs to use old libdm library.
VDO is only part of new device_mapper internal library.

So include directly source file for parsing status - this fixes usability
problem of VDO plugin introduced with previous Makefile reshaping
patchset.

NOTE: source file needs to be keep then compilable in both environments.

Also add missing copyright header.

5 years agocov: Close a FD on error
Marian Csontos [Wed, 19 Dec 2018 15:29:31 +0000 (16:29 +0100)]
cov: Close a FD on error

5 years agolvmlockd: Fix arguments when built without sanlock
Marian Csontos [Tue, 18 Dec 2018 15:59:48 +0000 (16:59 +0100)]
lvmlockd: Fix arguments when built without sanlock

(cherry picked from commit 24254ca86671ae49431e67788c039603fe4b79fb)

5 years agoRevert "tests: Remove unsupported mirrored mirrorlog"
Marian Csontos [Tue, 18 Dec 2018 09:55:35 +0000 (10:55 +0100)]
Revert "tests: Remove unsupported mirrored mirrorlog"

Incorrect cherry pick from another branch.

This reverts commit 07fc4866f040a382c39577fb739e010734d83e42.

5 years agobuild: Remove badly placed `@`
Marian Csontos [Tue, 18 Dec 2018 08:42:34 +0000 (09:42 +0100)]
build: Remove badly placed `@`

5 years agobuild: Remove reference to undefined @BUILD_LVMETAD@
Marian Csontos [Tue, 18 Dec 2018 08:36:48 +0000 (09:36 +0100)]
build: Remove reference to undefined @BUILD_LVMETAD@

5 years agotests: Remove unsupported mirrored mirrorlog
Marian Csontos [Tue, 18 Dec 2018 07:48:25 +0000 (08:48 +0100)]
tests: Remove unsupported mirrored mirrorlog

5 years agolvcreate/lvconvert: optionally reenable mirrored mirror log for testing purposes...
Heinz Mauelshagen [Mon, 17 Dec 2018 18:24:37 +0000 (19:24 +0100)]
lvcreate/lvconvert: optionally reenable mirrored mirror log for testing purposes only

This is a followup patch to commit edb72cb70cb8abd0acb92f07937715be2816d04a
to support related lvm2 test suite tests.

A 'global/support_mirrored_mirror_log' bool configuration variable gets
introduced allowing the creation of, or conversion to mirrored 'mirror'
logs if set.  The capability to create these in turn allows the rest of
the tests to perform activation of such existing LVs and their conversions
to disk/core 'mirror' logs.

Display a disclaimer warning if enabled that this is not for regular use.

Add definition of the enabled config option to respective test scripts.

Related: rhbz1643562

5 years agounit test: use_lvmetad replaced by event_activation
David Teigland [Mon, 17 Dec 2018 16:04:44 +0000 (10:04 -0600)]
unit test: use_lvmetad replaced by event_activation

5 years agomakefiles: also fix build of unit test
Zdenek Kabelac [Mon, 17 Dec 2018 10:51:17 +0000 (11:51 +0100)]
makefiles: also fix build of unit test

5 years agomakefile: fixes build for older system
Zdenek Kabelac [Mon, 17 Dec 2018 10:41:38 +0000 (11:41 +0100)]
makefile: fixes build for older system

With older gcc - we need to resolve symbols linked with devmapper-event
that is now using -ldevmapper.

Also add forgotten systemd library needed for dbus notification.

5 years agomakefiles: correcting login of makefile
Zdenek Kabelac [Sat, 15 Dec 2018 00:55:11 +0000 (01:55 +0100)]
makefiles: correcting login of makefile

Fixing some ordering issue with inclusion of common make.tmpl.
Correcting dependency calculation
Simplifying inclusive makefile

5 years agomakefiles: dm-tools improve Makefile
Zdenek Kabelac [Mon, 17 Dec 2018 01:07:29 +0000 (02:07 +0100)]
makefiles: dm-tools improve Makefile

5 years agomakefiles: allow to set LIBS in Makefiles
Zdenek Kabelac [Sun, 16 Dec 2018 14:55:19 +0000 (15:55 +0100)]
makefiles: allow to set LIBS in Makefiles

Avoid doing hard set of LIBS var,
so if the LIBS is set before 'include make.tmpl' it's not lost.
This gives better control over order of linked libraries.

5 years agomakefiles: no longer used define
Zdenek Kabelac [Fri, 14 Dec 2018 23:20:15 +0000 (00:20 +0100)]
makefiles: no longer used define

Not used anymore -D_BUILDING_LVM

5 years agomakefiles: missing cleaning
Zdenek Kabelac [Mon, 17 Dec 2018 01:04:11 +0000 (02:04 +0100)]
makefiles: missing cleaning

5 years agomakefiles: quite install
Zdenek Kabelac [Sat, 15 Dec 2018 00:47:24 +0000 (01:47 +0100)]
makefiles: quite install

5 years agomakefiles: drop unneeded LIBS add
Zdenek Kabelac [Fri, 14 Dec 2018 22:27:35 +0000 (23:27 +0100)]
makefiles: drop unneeded LIBS add

5 years agomakefiles: sort
Zdenek Kabelac [Fri, 14 Dec 2018 20:50:09 +0000 (21:50 +0100)]
makefiles: sort

5 years agocmirror: link with libdm
Zdenek Kabelac [Fri, 14 Dec 2018 21:17:08 +0000 (22:17 +0100)]
cmirror: link with libdm

Since there is very little change there will be any new devel going
to happing with cmirror - avoid eating extra disk space and link
with already installed libdm which implements all use basic
function of dm list

5 years agolvm: drop usage of dl library
Zdenek Kabelac [Fri, 14 Dec 2018 20:51:11 +0000 (21:51 +0100)]
lvm: drop usage of dl library

Since lvm no longer supports any dlopen-able plugins
(which in practice was never really usable) drop linking
with -ldl.

5 years agodmeventd: do not link internal libraries to plugins
Zdenek Kabelac [Fri, 14 Dec 2018 15:58:56 +0000 (16:58 +0100)]
dmeventd: do not link internal libraries to plugins

Avoid linking internal device-mapper and link dynamically libdevmapper.
This considerably reduced size of installed binaries.

5 years agodmeventd: fix linking with libdevmapper
Zdenek Kabelac [Fri, 14 Dec 2018 15:28:26 +0000 (16:28 +0100)]
dmeventd: fix linking with libdevmapper

Since dmeventd is 'libdm' based project, it needs to link
libdm library instead of its internal version

An external users may provide plugins loadeable by dmeventd.
So external user of libdevmapper-event library has no other option
then to link with released libdevmapper library.

The complexity comes with lvm2 plugins.
The lvm2 plugin itself uses internal version of device_mapper,
but libdevmapper-event usage is libdm based - so there needs to be avoided
any breakage on compatibility of internal i.e. dm_task_run structures.

TODO: most likely dmeventd itself should be moved into libdm/dm-tools dir,
and only lvm2 plugins should be created as part of lvm project,
but those still need to link with libdevmapper.

5 years agodmfilemapd: avoid linking with DL_LIBS
Zdenek Kabelac [Fri, 14 Dec 2018 15:27:27 +0000 (16:27 +0100)]
dmfilemapd: avoid linking with DL_LIBS

Dmfilemapd is not using dlopen so doesn't need to be linked with
DL_LIBS.

5 years agolvconvert: ensure proper init of pv_list
Zdenek Kabelac [Fri, 14 Dec 2018 20:53:34 +0000 (21:53 +0100)]
lvconvert: ensure proper init of pv_list

5 years agolvmdbusd: Update table lookup for state lv_attr
Tony Asleson [Tue, 11 Dec 2018 17:24:51 +0000 (11:24 -0600)]
lvmdbusd: Update table lookup for state lv_attr

5 years agolvmdbusd: Update table lookup for health lv_attr
Tony Asleson [Tue, 11 Dec 2018 17:23:56 +0000 (11:23 -0600)]
lvmdbusd: Update table lookup for health lv_attr

5 years agolvmdbusd: Handle missing lv_attr table lookups
Tony Asleson [Tue, 11 Dec 2018 17:21:50 +0000 (11:21 -0600)]
lvmdbusd: Handle missing lv_attr table lookups

If we don't know the meaning we will return the key with default text
instead of raising an exception and taking the daemon out in the
process.

Resolves: rhbz1657950

5 years agolvmdbusd: Dump blackbox newest first
Tony Asleson [Tue, 11 Dec 2018 19:58:23 +0000 (13:58 -0600)]
lvmdbusd: Dump blackbox newest first

When we get bug reports we may not get the entire log, so lets
dump the fight recorder from newest to oldest as the one we
are interested in was likely to be the last command run.

5 years agolvmanip: uninitialized members in struct pv_list (#10)
Ming-Hung Tsai [Fri, 14 Dec 2018 09:51:51 +0000 (01:51 -0800)]
lvmanip:  uninitialized members in struct pv_list (#10)

Scenario: Given an existed LV `lvol0`, I want to create another LV
on the PVs used by `lvol0`.

I use `build_parallel_areas_from_lv()` to obtain the `pv_list` of each segments.
However, the returned `pv_list` is not properly initialized, which causes
segfault in subsequent operations.

5 years agodebug: drop extra tracing
Zdenek Kabelac [Sat, 1 Dec 2018 20:39:42 +0000 (21:39 +0100)]
debug: drop extra tracing

Stack tracing after log_error() is not needed.

5 years agocleanup: some local headers first
Zdenek Kabelac [Fri, 14 Dec 2018 12:10:25 +0000 (13:10 +0100)]
cleanup: some local headers first

5 years agomakefiles: some leftovers from lvmetad
Zdenek Kabelac [Sat, 1 Dec 2018 16:34:20 +0000 (17:34 +0100)]
makefiles: some leftovers from lvmetad

5 years agomakefiles: local headers first
Zdenek Kabelac [Fri, 14 Dec 2018 12:13:45 +0000 (13:13 +0100)]
makefiles: local headers first

5 years agomakefiles: drop unneeded include path
Zdenek Kabelac [Fri, 14 Dec 2018 12:12:58 +0000 (13:12 +0100)]
makefiles: drop unneeded include path

5 years agomakefiles: correct libdm dependency
Zdenek Kabelac [Fri, 14 Dec 2018 12:12:27 +0000 (13:12 +0100)]
makefiles: correct libdm dependency

Correcting dependency tracking for libdm internal files.

5 years agoheaders: use full path header instead of -I directive
Zdenek Kabelac [Mon, 3 Dec 2018 17:15:44 +0000 (18:15 +0100)]
headers: use full path header instead of -I directive

Replace Makefile -I  with full path to headers like we use now
everywhere else.

5 years agoheaders: use configure.h as 1st. header
Zdenek Kabelac [Mon, 3 Dec 2018 17:14:26 +0000 (18:14 +0100)]
headers: use configure.h as 1st. header

Ensure configure.h is always 1st. included header.
Maybe we could eventually introduce gcc -include option, but for now
this better uses dependency tracking.

Also move _REENTRANT and _GNU_SOURCE into configure.h so it
doesn't need to be present in various source files.
This ensures consistent compilation of headers like stdio.h since
it may produce different declaration.

5 years agolibdm: use libdm header
Zdenek Kabelac [Fri, 14 Dec 2018 12:11:48 +0000 (13:11 +0100)]
libdm: use libdm header

User libdm header file.

5 years agodmeventd: Fix libdevmapper-event linking
Marian Csontos [Wed, 12 Dec 2018 09:50:36 +0000 (10:50 +0100)]
dmeventd: Fix libdevmapper-event linking

5 years agoman: document 's' RAID attribute bit
Heinz Mauelshagen [Tue, 11 Dec 2018 15:54:17 +0000 (16:54 +0100)]
man: document 's' RAID attribute bit

5 years agoraid: fix (de)activation of RaidLVs with visible SubLVs
Heinz Mauelshagen [Wed, 31 Oct 2018 22:05:08 +0000 (23:05 +0100)]
raid: fix (de)activation of RaidLVs with visible SubLVs

There's a small window during creation of a new RaidLV when
rmeta SubLVs are made visible to wipe them in order to prevent
erroneous discovery of stale RAID metadata.  In case a crash
prevents the SubLVs from being committed hidden after such
wiping, the RaidLV can still be activated with the SubLVs visible.
During deactivation though, a deadlock occurs because the visible
SubLVs are deactivated before the RaidLV.

The patch adds _check_raid_sublvs to the raid validation in merge.c,
an activation check to activate.c (paranoid, because the merge.c check
will prevent activation in case of visible SubLVs) and shares the
existing wiping function _clear_lvs in raid_manip.c moved to lv_manip.c
and renamed to activate_and_wipe_lvlist to remove code duplication.
Whilst on it, introduce activate_and_wipe_lv to share with
(lvconvert|lvchange).c.

Resolves: rhbz1633167

5 years agoWHATS_NEW
Heinz Mauelshagen [Mon, 10 Dec 2018 13:48:13 +0000 (14:48 +0100)]
WHATS_NEW

5 years agolvcreate/lvconvert: prohibit creation of/conversion to mirrored mirror logs
Heinz Mauelshagen [Fri, 7 Dec 2018 18:56:49 +0000 (19:56 +0100)]
lvcreate/lvconvert: prohibit creation of/conversion to mirrored mirror logs

In RHEL7 we marked mirrored mirror logs as deprecated and
added a related message.  This patch prohibits creating new
'mirror' LVs with that log type or converting existing LVs
to have one.

Existing LVs with mirrored mirror log can be activated
and converted to disk/core logs.

Avoid double deprecation message when running lvconvert.

Resolves: rhbz1643562

5 years agolvmlockd: fix missing LV lock for lvconvert repair
David Teigland [Fri, 7 Dec 2018 19:11:31 +0000 (13:11 -0600)]
lvmlockd: fix missing LV lock for lvconvert repair

Add missing lvmlockd LV lock for lvconvert repair
on mirror and thin/cache pools.

5 years agoudev: 69-dm-lvm-metad.rules is still needed
Marian Csontos [Thu, 6 Dec 2018 09:50:42 +0000 (10:50 +0100)]
udev: 69-dm-lvm-metad.rules is still needed

5 years agobuild: Upse PYTHON_CONFIG env.variable when set
Marian Csontos [Fri, 2 Nov 2018 09:06:51 +0000 (10:06 +0100)]
build: Upse PYTHON_CONFIG env.variable when set

This adds up to Commit 6462e8dffc7ed53973ce796cec18fecc0fb89d77.

5 years agotests: lvm-on-md udev issues
David Teigland [Wed, 5 Dec 2018 18:14:17 +0000 (12:14 -0600)]
tests: lvm-on-md udev issues

5 years agoman lvmlockd: lvextend with gfs2
David Teigland [Wed, 5 Dec 2018 17:31:58 +0000 (11:31 -0600)]
man lvmlockd: lvextend with gfs2

5 years agoremove unused full filter
David Teigland [Tue, 4 Dec 2018 20:06:46 +0000 (14:06 -0600)]
remove unused full filter

it's the same as cmd->filter

5 years agoremove unused lvmetad filter
David Teigland [Tue, 4 Dec 2018 18:44:43 +0000 (12:44 -0600)]
remove unused lvmetad filter

5 years agopvscan: use correct dev filters
David Teigland [Mon, 3 Dec 2018 18:58:46 +0000 (12:58 -0600)]
pvscan: use correct dev filters

pvscan was still using lvmetad_filter which has been
null since lvmetad was removed.  Switch it to use the
full_filter.

5 years agodevs: use udev info to improve md component detection
David Teigland [Mon, 3 Dec 2018 17:22:45 +0000 (11:22 -0600)]
devs: use udev info to improve md component detection

Use udev info to supplement native md component detection.

5 years agogcc: ensure sector is initilized
Zdenek Kabelac [Fri, 30 Nov 2018 21:26:26 +0000 (22:26 +0100)]
gcc: ensure sector is initilized

Some older gcc errnously report the variable can be used uninitlized.
Quite warning by explicit initalization.

5 years agogcc: avoid shadowing use_aio
Zdenek Kabelac [Fri, 30 Nov 2018 20:56:16 +0000 (21:56 +0100)]
gcc: avoid shadowing use_aio

Function use_aio() is already declared, avoid its shadowing.
lvm-globals.h:59: warning: shadowed declaration is here

5 years agogcc: avoid shadowing activate_lv
Zdenek Kabelac [Fri, 30 Nov 2018 20:50:41 +0000 (21:50 +0100)]
gcc: avoid shadowing activate_lv

Function activate_lv() is already declared, avoid its shadowing.
activate.h:133: warning: shadowed declaration is here

5 years agogcc: avoid shadowing index
Zdenek Kabelac [Fri, 30 Nov 2018 20:46:14 +0000 (21:46 +0100)]
gcc: avoid shadowing index

Some older headers were declaring 'index' so avoid its usage.
/usr/include/string.h:489: warning: shadowed declaration is here

5 years agomakefiles: ensure test dir can run unit-test
Zdenek Kabelac [Fri, 30 Nov 2018 23:44:22 +0000 (00:44 +0100)]
makefiles: ensure test dir can run unit-test

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