]> sourceware.org Git - lvm2.git/log
lvm2.git
6 years agolvcreate: error message with dot.
Heinz Mauelshagen [Thu, 26 Oct 2017 15:25:22 +0000 (17:25 +0200)]
lvcreate: error message with dot.

6 years agoraid: ignore --stripes/--stripesize on takeover
Heinz Mauelshagen [Thu, 26 Oct 2017 15:16:23 +0000 (17:16 +0200)]
raid: ignore --stripes/--stripesize on takeover

Converting from one raid level to another, no changes
of stripes or stripesize can be requested because those
are subject to reshaping.  I.e. the process requires to
takeover first and secondly request raid algorithm,
stripe or stripesize changes.

Ignore any related changes display warninngs
and proceed with the takeover.

Without this patch, a takeover requesting
stripesize change causes data corruption!

6 years agotests: better clustering support
Zdenek Kabelac [Thu, 26 Oct 2017 12:00:44 +0000 (14:00 +0200)]
tests: better clustering support

Use exclusive activation for snapshot conversion since we can only
convert exclusively active volumes.

6 years agotests: allow override of LVM_LOG_FILE_MAX_LINES
Zdenek Kabelac [Thu, 26 Oct 2017 11:58:43 +0000 (13:58 +0200)]
tests: allow override of LVM_LOG_FILE_MAX_LINES

Just like with other vars support this:

make check_local T=xyz LVM_LOG_FILE_MAX_LINES=10000000

Allows easily to override existing line limit.
Also increase limiting size of logs per command since some of
our commands are becoming very verbose....

6 years agoMakefile: help shows hint about LVM_LOG_FILE_MAX_LINES
Zdenek Kabelac [Thu, 26 Oct 2017 11:57:51 +0000 (13:57 +0200)]
Makefile: help shows hint about LVM_LOG_FILE_MAX_LINES

6 years agolog: better message when reached log limit
Zdenek Kabelac [Thu, 26 Oct 2017 11:55:36 +0000 (13:55 +0200)]
log: better message when reached log limit

Add explaining message, when command was aborted due to the reach
of configure line number count (LVM_LOG_FILE_MAX_LINES)
for logging (used mainly with testing).

6 years agoWHATS_NEW: missed
Zdenek Kabelac [Thu, 26 Oct 2017 12:02:44 +0000 (14:02 +0200)]
WHATS_NEW: missed

Last patch missed to mention, we've improved/fixed generated paths
in units and init.d shell scripts when lvm2 was plainly configured
with just i.e. --prefix.

Note: some distros might have fully specified --sbindir and
--usrsbindir - thus those very not seeing problems in generated paths.

6 years agocommands: drop secondary for lvconvert --type snapshot
Zdenek Kabelac [Wed, 25 Oct 2017 17:56:40 +0000 (19:56 +0200)]
commands: drop secondary for lvconvert --type snapshot

Both form were marked and secondary thus none of the supported
syntax entered manpage.

This restores appearance of snapshot conversion in man page.

6 years agoshellcheck: some apostrophe changes and cleanups
Zdenek Kabelac [Wed, 25 Oct 2017 15:02:31 +0000 (17:02 +0200)]
shellcheck: some apostrophe changes and cleanups

6 years agoscripts: paths update
Zdenek Kabelac [Wed, 25 Oct 2017 15:08:00 +0000 (17:08 +0200)]
scripts: paths update

Correct usage of sbindir also for scripts so the path
no longer needs resolving more vars like exec_prefix & prefix.

6 years agosystemd: use proper sbindir path
Zdenek Kabelac [Wed, 25 Oct 2017 15:06:41 +0000 (17:06 +0200)]
systemd: use proper sbindir path

Replace lowercase  @sbindir@  with  @SBINDIR@ which contains
fully decoded path.

Same with  @usrsbindir@ which is also used with clvmd and cmirrord.

Also handle SYSCONFDIR for EnvironmentFile.

Patch fixes generated unit files with strings like:
ExecStart=${exec_prefix}/sbin/lvm

6 years agoconfigure: improve support for sbindir path
Zdenek Kabelac [Wed, 25 Oct 2017 14:49:17 +0000 (16:49 +0200)]
configure: improve support for sbindir path

Introduce few more AC_SUBST vars for usage in *.in generation.

In some case we want to replace i.e. $sbindir with full path
instead of current ${exec_prefix}/sbin.

This patch provides:

USRSBINDIR
SBINDIR
DEFAULT_SYS_LOCK_DIR
SYSCONFDIR

At the same time properly use sbindir & usrsbindir with
lvm, fsadm, clvmd from one primary definition.

6 years agotests: snapshot conversions
Zdenek Kabelac [Wed, 25 Oct 2017 19:56:39 +0000 (21:56 +0200)]
tests: snapshot conversions

Add missing tests for snapshost conversions.

6 years agotypo: fix invalid
Zdenek Kabelac [Wed, 25 Oct 2017 17:39:25 +0000 (19:39 +0200)]
typo: fix invalid

6 years agosnapshot: improve validation
Zdenek Kabelac [Tue, 24 Oct 2017 14:34:25 +0000 (16:34 +0200)]
snapshot: improve validation

Do not allow to take snapshot of mirror/raid leg or log or metadata LV.
This was actually never supported, but user was able to create it,
and this put device stack in hardly fixable state (needs manual work).

This prevents such creation to pass.

Also improve validation when recreating snapshot volume type
from origin and COW volume.

6 years agoclean-up: Correct the comment to match the particular test case
Jonathan Brassow [Tue, 24 Oct 2017 19:06:44 +0000 (14:06 -0500)]
clean-up:  Correct the comment to match the particular test case

6 years agotests:check lvconvert with /dev in vglvname
Zdenek Kabelac [Tue, 24 Oct 2017 13:05:13 +0000 (15:05 +0200)]
tests:check lvconvert with /dev in vglvname

6 years agolvconvert: fixing extraction of vgname
Zdenek Kabelac [Tue, 24 Oct 2017 12:56:42 +0000 (14:56 +0200)]
lvconvert: fixing extraction of vgname

Correction to function for extracting vgname out of lvconvert
parameters.

Avoid repeating some checks.

Add code to handle generic options which may provide vgname in its argument
and compare them all so they match to a single vgname (otherwise it's a
error).

Extract default (envvar) vgname only when no position nor optional vgname is
found.

Fixing regression instroduce with patchset started with commit:
1e2420bca85da9a37570871cd70192e9ae831786   (2.02.169)

6 years agofsadm: refactor resize_crypt function
Ondrej Kozina [Tue, 24 Oct 2017 09:53:22 +0000 (11:53 +0200)]
fsadm: refactor resize_crypt function

split resize_crypt function in two.

a) Detect proper dm-crypt device type and count new --size
   value for cryptsetup resize command.

b) Perform the resize

6 years agofsadm: rename local variables to avoid confusion
Ondrej Kozina [Mon, 23 Oct 2017 16:11:32 +0000 (18:11 +0200)]
fsadm: rename local variables to avoid confusion

6 years agotest: add regression test for fsadm bug
Ondrej Kozina [Tue, 24 Oct 2017 09:55:14 +0000 (11:55 +0200)]
test: add regression test for fsadm bug

the bug in LUKS grow/shrink decision in fsadm was
masked due to fact that default LVM2 extent size
was larger than LUKS1 default data offset for dm-crypt
mapping. The new test address this bug.

6 years agofsadm: fix bug in LUKS grow/shrink decision branch
Ondrej Kozina [Mon, 23 Oct 2017 13:41:16 +0000 (15:41 +0200)]
fsadm: fix bug in LUKS grow/shrink decision branch

6 years agofsadm: add luks specific error message for small devices
Ondrej Kozina [Mon, 23 Oct 2017 13:31:44 +0000 (15:31 +0200)]
fsadm: add luks specific error message for small devices

6 years agotests: check stacked cache dataLV of thin-pool
Zdenek Kabelac [Mon, 23 Oct 2017 09:51:51 +0000 (11:51 +0200)]
tests: check stacked cache dataLV of thin-pool

6 years agolvcreate: skip checking for name restriction for caching
Zdenek Kabelac [Mon, 23 Oct 2017 09:36:51 +0000 (11:36 +0200)]
lvcreate: skip checking for name restriction for caching

lvcreate supports a 'conversion' when caching LV.
This normally worked fine, however in case passed LV was
thin-pool's data LV with suffix _tdata we have failed to early.

As the easiest fix looks dropping validation of name when
caching type is select - such name check will happen later
once the VG is opened again and properly detect if the LV
with protected name already exists and can be converted,
or will be rejected as ambigiuous operation requiring user
to specify  --type cache | --type cache-pool.

6 years agolvextend: detect stacked cache lv used for thinpool
Zdenek Kabelac [Mon, 23 Oct 2017 09:20:32 +0000 (11:20 +0200)]
lvextend: detect stacked cache lv used for thinpool

Ensure, that cacheLV is not tried to be resize until full support is
added.

6 years agolvconvert: preserve names of converted LV
Zdenek Kabelac [Mon, 23 Oct 2017 08:56:44 +0000 (10:56 +0200)]
lvconvert: preserve names of converted LV

When prompting and warning for conversion, remember initial LV names,
so after conversion is finished, correct original names are printed.

6 years agotest: remove 'should's from test to test target status race fix
Heinz Mauelshagen [Thu, 19 Oct 2017 15:41:44 +0000 (17:41 +0200)]
test: remove 'should's from test to test target status race fix

6 years agoliblvm: Move lib code used exclusively into metadata-liblvm.c
Alasdair G Kergon [Wed, 18 Oct 2017 18:29:32 +0000 (19:29 +0100)]
liblvm: Move lib code used exclusively into metadata-liblvm.c

Also remove some redundant function definitions from metadata.h.

6 years agotidy: Add missing underscores to statics.
Alasdair G Kergon [Wed, 18 Oct 2017 14:57:46 +0000 (15:57 +0100)]
tidy: Add missing underscores to statics.

6 years agolibdm: fix typo in libdevmapper.pc
Zdenek Kabelac [Tue, 17 Oct 2017 22:03:08 +0000 (00:03 +0200)]
libdm: fix typo in libdevmapper.pc

Fixing name for RT libraries and using RT_LIBS.

6 years agolvmlockd: check error for sanlock access to lvmlock LV
David Teigland [Tue, 17 Oct 2017 18:45:53 +0000 (13:45 -0500)]
lvmlockd: check error for sanlock access to lvmlock LV

When the sanlock daemon does not have permission to access
the lvmlock LV, make the error messages more helpful.

6 years agodevice: Separate errors for dev not found and filtered.
Alasdair G Kergon [Tue, 17 Oct 2017 01:12:41 +0000 (02:12 +0100)]
device: Separate errors for dev not found and filtered.

Replaced the confusing device error message "not found (or ignored by
filtering)" by either "not found" or "excluded by a filter".
(Later we should be able to say which filter.)

Left the the liblvm code paths alone.

6 years agotests: check external origin is monitored
Zdenek Kabelac [Mon, 16 Oct 2017 13:45:15 +0000 (15:45 +0200)]
tests: check external origin is monitored

6 years agothin: monitor also external origin
Zdenek Kabelac [Mon, 16 Oct 2017 13:05:57 +0000 (15:05 +0200)]
thin: monitor also external origin

Add missing monitoring for external origin LVs and add -real suffix
for UUID used for monitoring of external origin.

6 years agoconfigure: autoreconf
Marian Csontos [Mon, 16 Oct 2017 05:48:23 +0000 (07:48 +0200)]
configure: autoreconf

6 years agoreplicator: remove the code
David Teigland [Fri, 13 Oct 2017 19:43:15 +0000 (14:43 -0500)]
replicator: remove the code

It has not been used in a long time and is not
expected to be used further.

6 years agoUpdate WHATS_NEW
Marian Csontos [Fri, 13 Oct 2017 11:11:01 +0000 (13:11 +0200)]
Update WHATS_NEW

6 years agolvcreate: allow 100%FREE creation of "--type mirror" to work
Heinz Mauelshagen [Thu, 12 Oct 2017 15:43:24 +0000 (17:43 +0200)]
lvcreate: allow 100%FREE creation of "--type mirror" to work

Fixes the following case with 3PVs and 3 legs "mirror" LV:

# lvcreate -l100%FREE --type mirror -m2 vg3
  Insufficient free space for log allocation for logical volume .
  Unable to allocate extents for mirror log.

Related: rhbz1269533

6 years agotest: "Disable" lvconvert-raid-reshape
Marian Csontos [Thu, 12 Oct 2017 08:53:22 +0000 (10:53 +0200)]
test: "Disable" lvconvert-raid-reshape

...when running from ramdisk. This causes test failure, so it is kept on
eyes.

6 years agotest: update fsadm-crypt to pass with legacy cryptsetup
Ondrej Kozina [Tue, 10 Oct 2017 15:44:11 +0000 (17:44 +0200)]
test: update fsadm-crypt to pass with legacy cryptsetup

6 years agofsadm: implement 'check' for a fs on top of LUKS
Ondrej Kozina [Wed, 11 Oct 2017 09:17:36 +0000 (11:17 +0200)]
fsadm: implement 'check' for a fs on top of LUKS

6 years agofsadm: fail 'check' explicitly on unsupported fs type
Ondrej Kozina [Wed, 11 Oct 2017 08:20:38 +0000 (10:20 +0200)]
fsadm: fail 'check' explicitly on unsupported fs type

6 years agofsadm: respect DM_DEV_DIR variable
Ondrej Kozina [Tue, 10 Oct 2017 15:43:45 +0000 (17:43 +0200)]
fsadm: respect DM_DEV_DIR variable

6 years agoactivation: fix activation lock
Zdenek Kabelac [Wed, 11 Oct 2017 10:41:28 +0000 (12:41 +0200)]
activation: fix activation lock

Activation lock has a primary purpose to serialize locking of individual
LV in case there is no other protecting mechanism for parallel
execution.

However in the case an activated LV is composed from several other LVs,
noone should be able to manipulate with those LVs as well.

This patch add a very 'naive' global VG activation locking in this case.
In the future we may introduce smarter function detecting minimal closed
graph components if this will appear as bottleneck

Patch checks if the  VG Write lock is held - in this case we do not
need any more locking - command has exclusive access to VG.

In case we have clustered VG and we are activating an LV which does not
need other LVs - we also do not need any more locks.

In all other cases take respective lock - for single LV - use lvid,
for complex LVs  use vgname.

6 years agoactivation: fix locking resource name for activation lock
Zdenek Kabelac [Mon, 9 Oct 2017 13:36:41 +0000 (15:36 +0200)]
activation: fix locking resource name for activation lock

Avoid cutting away 1st. character for activation lock.
Unlike with VG name locks like #orphan we should not cut-off 1st.
characted from resource name.

6 years agotest: fsadm-crypt.sh fixes
Ondrej Kozina [Tue, 10 Oct 2017 13:45:15 +0000 (15:45 +0200)]
test: fsadm-crypt.sh fixes

use conservative 'luksOpen' command instead
fix reiserfs tests on plain crypt devices

6 years agofsadm: minor fixes for crypt support
Ondrej Kozina [Tue, 10 Oct 2017 13:21:28 +0000 (15:21 +0200)]
fsadm: minor fixes for crypt support

drop useless asterisk expansion
enforce matching string prefix by adding ^

6 years agotest: add fsadm crypt test
Ondrej Kozina [Tue, 10 Oct 2017 11:15:10 +0000 (13:15 +0200)]
test: add fsadm crypt test

6 years agofsadm: add support for crypt devices
Ondrej Kozina [Fri, 6 Oct 2017 14:28:35 +0000 (16:28 +0200)]
fsadm: add support for crypt devices

6 years agothin: Improve overprovisioning and repair warnings.
Alasdair G Kergon [Mon, 9 Oct 2017 18:48:00 +0000 (19:48 +0100)]
thin: Improve overprovisioning and repair warnings.

6 years agoraid: cleanup raid4/5/6/10 validation check
Heinz Mauelshagen [Mon, 9 Oct 2017 14:13:45 +0000 (16:13 +0200)]
raid: cleanup raid4/5/6/10 validation check

6 years agoraid: fix validation check for raid0 segment data_offset member
Heinz Mauelshagen [Mon, 9 Oct 2017 13:21:51 +0000 (15:21 +0200)]
raid: fix validation check for raid0 segment data_offset member

Commit 2f754b73ffdaa95af4a6d703e31b76d4efbf7a36 missed one.

6 years agolvcreate: fix region size on striped RaidLVs
Heinz Mauelshagen [Mon, 9 Oct 2017 12:34:10 +0000 (14:34 +0200)]
lvcreate: fix region size on striped RaidLVs

Creating striped RaidLVs with lv size not divisible by region size
caused the region size to be adjusted:

# lvcreate   --type raid5 -n region_check.32.00m_3 -i 3 -L 1g --nosync -R 32.00m raid_sanity
  Using default stripesize 64.00 KiB.
  Rounding size 1.00 GiB (256 extents) up to stripe boundary size <1.01 GiB(258 extents).
  WARNING: New raid5 won't be synchronised. Don't read what you didn't write!
  Using reduced mirror region size of 8.00 MiB
  Logical volume region_check.32.00m_3 created.

Fix by not imposing "mirror" constraints on "raid".

Resolves: rhbz1404007

6 years agoraid: fix validation checks for segment data_offset member
Heinz Mauelshagen [Mon, 9 Oct 2017 12:00:46 +0000 (14:00 +0200)]
raid: fix validation checks for segment data_offset member

Commit 222e1e3acee399b0acf31565f784716d67c465a8 was not
valuing special case of data_ofset member equal to 1.

6 years agoraid: return previous reshape space allocation properly
Heinz Mauelshagen [Mon, 9 Oct 2017 11:53:27 +0000 (13:53 +0200)]
raid: return previous reshape space allocation properly

Fix returning previous allocation of reshape space.

6 years agoman: regenerate
Alasdair G Kergon [Fri, 6 Oct 2017 22:10:02 +0000 (23:10 +0100)]
man: regenerate

6 years agopost-release
Alasdair G Kergon [Fri, 6 Oct 2017 21:16:58 +0000 (22:16 +0100)]
post-release

6 years agopre-release v2_02_175
Alasdair G Kergon [Fri, 6 Oct 2017 21:10:48 +0000 (22:10 +0100)]
pre-release

6 years agovgmerge: Fix intermediate metadata corruption
Alasdair G Kergon [Fri, 6 Oct 2017 01:12:42 +0000 (02:12 +0100)]
vgmerge: Fix intermediate metadata corruption

vgmerge suffers from a similar problem to the one fixed in commit
8146548d25e9104f0d530d943290d448c1994c0a ("vgsplit: Fix intermediate
metadata corruption.")

When merging, splitting or renaming VGs, use a new PV status flag
PV_MOVED_VG to mark the PVs that hold metadata with the old VG name and
use this to provide PV-level granularity instead of incorrectly assuming
all PVs in the VG are the same.

6 years agodmeventd: ensure systemd service gets stopped on shutdown
Thomas Lamprecht [Thu, 5 Oct 2017 10:52:15 +0000 (12:52 +0200)]
dmeventd: ensure systemd service gets stopped on shutdown

Add these for dmeventd systemd unit (dm-event.service):

  Before: shutdown.target
  Conflicts: shutdown.target

This will cause the dmeventd to be properly stopped at shutdown (after
all the dmeventd clients unregistered their devices from monitoring)
with dm-event.service's stop action (there's no direct action defined
for the "stop" so systemd sends SIGTERM instead).

Before, we let dmeventd to get killed only as part of the very last
SIGTERM/SIGKILL for all the remaining processes late in the shutdown
sequence so we may have missed some logs if dmeventd encountered an
error during its shutdown (logging facilities are already off at this
late time in shutdown sequence).

Ref: https://www.redhat.com/archives/lvm-devel/2017-October/msg00000.html

6 years agofsadm: add --help
Zdenek Kabelac [Thu, 5 Oct 2017 08:16:20 +0000 (10:16 +0200)]
fsadm: add --help

Newer version of blockdev tool needs --help as the tool is no longer
printing help without this option like it used to in past.

6 years agodmeventd: schedule exit on break
Zdenek Kabelac [Wed, 4 Oct 2017 11:58:21 +0000 (13:58 +0200)]
dmeventd: schedule exit on break

When dmeventd receives SIGTERM/INT/HUP/QUIT it validates if exit is possible.
If there was any device still monitored, such exit request used to
be ignored/refused. This 'usually' worked reasonably well, however if there
is very short time period between last device is unmonitored and signal
reception - there was possibility such EXIT was ignored, as dmeventd has
not yet got into idle state even commands like 'vgchange -an' has already
finished.

This patch changes logic towards scheduling EXIT to the nearest
point when there is no monitored device.

EXIT is never forgotten.

NOTE: if there is only a single monitored device and someone sends
SIGTERM and later someone uses i.e. 'lvchange --refresh' after
unmonitoring dmeventd will exit and new instance needs to be
started.

6 years agoraid: enhance conversion rejection message
Heinz Mauelshagen [Wed, 4 Oct 2017 15:05:59 +0000 (17:05 +0200)]
raid: enhance conversion rejection message

Related: rhbz1439399

6 years agolvmdbusd: thread stacks dump support
Tony Asleson [Mon, 25 Sep 2017 20:20:03 +0000 (15:20 -0500)]
lvmdbusd: thread stacks dump support

If you send a SIGUSR1 (10) to the daemon it will dump all the
threads current stacks to stdout.  This will be useful when the
daemon is apparently hung and not processing requests.

eg.
$ sudo kill -10 <daemon pid>

6 years agolvmdbusd: Give threads names
Tony Asleson [Mon, 25 Sep 2017 20:18:43 +0000 (15:18 -0500)]
lvmdbusd: Give threads names

This will allow easier debug.

6 years agolvmdbusd: Main thread exception logging
Tony Asleson [Fri, 22 Sep 2017 14:59:50 +0000 (09:59 -0500)]
lvmdbusd: Main thread exception logging

Make sure that any and all code that executes in the main thread is
wrapped with a try/except block to ensure that at the very least
we log when things are going wrong.

6 years agopvmove: Change error message
Marian Csontos [Wed, 27 Sep 2017 11:20:25 +0000 (13:20 +0200)]
pvmove: Change error message

Change error message to match previously used one used by tests.

6 years agovgsplit: Fix intermediate metadata corruption.
Alasdair G Kergon [Fri, 22 Sep 2017 17:02:58 +0000 (18:02 +0100)]
vgsplit: Fix intermediate metadata corruption.

Changing the VG of a PV uses the same on-disk mechanism as vgrename.
This relies on recognising both the old and new VG names.  Prior to this
patch the vgsplit code incorrectly provided the new VG name twice
instead of the old and new ones.  This lead the low-level mechanism not
to recognise the device as already belonging to a VG and so paying no
attention to the location of its existing metadata, sometimes partly
overwriting it and then later trying to read the corrupt metadata and
issuing a checksum error.

6 years agoblkdeactivate: cleanup
Peter Rajnoha [Fri, 22 Sep 2017 09:10:57 +0000 (11:10 +0200)]
blkdeactivate: cleanup

Use a different variable for translated name in dm/md_deactivate fn
Fix dmraidoption/dmraidoptions in man page.

6 years agolvmdbusd: Improve args comparison
Tony Asleson [Thu, 21 Sep 2017 14:22:07 +0000 (09:22 -0500)]
lvmdbusd: Improve args comparison

6 years agolvmdbusd: Ensure vg_uuid is present
Tony Asleson [Wed, 20 Sep 2017 21:39:35 +0000 (16:39 -0500)]
lvmdbusd: Ensure vg_uuid is present

In some cases we are seeing where there are no VGs, but the data returned from
lvm shows that the PVs have the following for the VG:

"vg_name":"[unknown]", "vg_uuid":""

The code was only checking for the exitence of the VG name and we called into
the function get_object_path_by_uuid_lvm_id which requires both the VG name and
the LV name to exist (asserts this) which results in the following stack trace:

Traceback (most recent call last):
  File "/home/tasleson/lvm2/daemons/lvmdbusd/utils.py", line 563, in runner
    obj._run()
  File "/home/tasleson/lvm2/daemons/lvmdbusd/utils.py", line 584, in _run
    self.rc = self.f(*self.args)
  File "/home/tasleson/lvm2/daemons/lvmdbusd/fetch.py", line 26, in
_main_thread_load
    cache_refresh=False)[1]
  File "/home/tasleson/lvm2/daemons/lvmdbusd/pv.py", line 48, in load_pvs
    emit_signal, cache_refresh)
  File "/home/tasleson/lvm2/daemons/lvmdbusd/loader.py", line 37, in common
    objects = retrieve(search_keys, cache_refresh=False)
  File "/home/tasleson/lvm2/daemons/lvmdbusd/pv.py", line 40, in
pvs_state_retrieve
    p["pv_attr"], p["pv_tags"], p["vg_name"], p["vg_uuid"]))
  File "/home/tasleson/lvm2/daemons/lvmdbusd/pv.py", line 84, in __init__
    vg_uuid, vg_name, vg_obj_path_generate)
  File "/home/tasleson/lvm2/daemons/lvmdbusd/objectmanager.py", line 318,
in get_object_path_by_uuid_lvm_id
    assert uuid
AssertionError

6 years agolvmdbusd: Fix hang in MThreadRunner
Tony Asleson [Wed, 20 Sep 2017 20:46:16 +0000 (15:46 -0500)]
lvmdbusd: Fix hang in MThreadRunner

When executing in the main thread, if we encounter an exception we
will bypass the notify_all call on the condition and the calling thread
never wakes up.

@staticmethod
    def runner(obj):
        # noinspection PyProtectedMember
Exception thrown here
 ----> obj._run()
So the following code doesn't run, which causes calling thread to hang
with obj.cond:
            obj.function_complete = True
            obj.cond.notify_all()

Additionally for some unknown reason the stderr is lost.
Best guess is it's something to do with scheduling a python function
into the GLib.idle_add.  That made finding issue quite difficult.

6 years agoblkdeactivate: also try to unmount /boot on blkdeactivate -u if on top of supported...
Peter Rajnoha [Thu, 21 Sep 2017 13:23:24 +0000 (15:23 +0200)]
blkdeactivate: also try to unmount /boot on blkdeactivate -u if on top of supported device

There's nothing special about /boot other than it's used during boot.
But when blkdeactivate is called either on all devices or including a
device where the /boot is on top, we should also include this mount
point when doing unmount before deactivation of supported devices.

6 years agoblk-availability: use blkdeactivate -r wait in blk-availability systemd service/inits...
Peter Rajnoha [Thu, 21 Sep 2017 13:10:23 +0000 (15:10 +0200)]
blk-availability: use blkdeactivate -r wait in blk-availability systemd service/initscript

6 years agoblkdeactivate: add blkdeactivate -r wait option to wait for MD resync/recovery/reshape
Peter Rajnoha [Thu, 21 Sep 2017 13:04:45 +0000 (15:04 +0200)]
blkdeactivate: add blkdeactivate -r wait option to wait for MD resync/recovery/reshape

The new blkdeactivate -r|mdraidoption wait causes blkdeactivate to wait
for any resync/recovery/reshape that is currently in progress before
deactivating the device.

If this option is used, blkdeactivate calls mdadm -W|--wait before
mdadm -S|--stop.

6 years agoblkdeactivate: fix blkdeactivate regression with failing DM/MD devs deactivation
Peter Rajnoha [Thu, 21 Sep 2017 11:39:52 +0000 (13:39 +0200)]
blkdeactivate: fix blkdeactivate regression with failing DM/MD devs deactivation

Revert dc50f2f4a03dd50c5e2411a258095484555421e9.

We're canonicalizing/escaping the names here and we're reusing the
variable name so the code doesn't need to use extra variables and
further assignments that may confuse us. Let's keep the code simple.

The

   local name=(...$name)

is not the same as

   local name
   name=(...$name)

(I know various code-checking tools fuss about this and recommend
the 2nd way, but let's ignore those tools' nitpicking here please.)

6 years agoblkdeactivate: fix --{dm,lvm,mpath}options option name recognition
Peter Rajnoha [Thu, 21 Sep 2017 15:03:42 +0000 (17:03 +0200)]
blkdeactivate: fix --{dm,lvm,mpath}options option name recognition

There was a typo in blkdeactivate --dmoption/--lvmoption/mpathoption,
it had missing "s" at the end and it was not recognized properly, only
short names for the options (-d/-l/-m).

6 years agoimprove error messages when command rules fail
David Teigland [Wed, 20 Sep 2017 15:51:52 +0000 (10:51 -0500)]
improve error messages when command rules fail

When certain cmd def RULE's fail, the error messages can
sometimes be confusing.  This expands the error messages
to help clarify why the rule failed, especially in cases
where options are used incorrectly.

6 years agopvmove: require LV name in a shared VG
David Teigland [Tue, 19 Sep 2017 18:08:41 +0000 (13:08 -0500)]
pvmove: require LV name in a shared VG

In a shared VG, only allow pvmove with a named LV,
so that only PE's used by the LV will be moved.
The LV is then activated exclusively, ensuring that
the PE's being moved are not used from another host.

Previously, pvmove was mistakenly allowed on a full PV.
This won't work when LVs using that PV are active on
other hosts.

6 years agolvmlockd: activate mirror LVs in shared mode with cmirrord
David Teigland [Tue, 19 Sep 2017 16:52:36 +0000 (11:52 -0500)]
lvmlockd: activate mirror LVs in shared mode with cmirrord

Previously lvmlockd disallowed mirror LVs to be activated
in shared mode.

6 years agotests: use portable df output
Zdenek Kabelac [Wed, 20 Sep 2017 13:34:02 +0000 (15:34 +0200)]
tests: use portable df output

For awk parsing more 'predictable' format of output line is needed.

6 years agotests: repair of cachepool
Zdenek Kabelac [Wed, 20 Sep 2017 10:28:39 +0000 (12:28 +0200)]
tests: repair of cachepool

6 years agotests: check for free space in test dir
Zdenek Kabelac [Mon, 11 Sep 2017 12:33:07 +0000 (14:33 +0200)]
tests: check for free space in test dir

Avoid starting test, when test dir has less then 50M of free space.
Better to crash early before letting die machine on weird crash
in OOM cases...

Also show free disk space when test starts

6 years agolibdm: fix parentheses in assignment + comparison
Zdenek Kabelac [Wed, 20 Sep 2017 12:21:38 +0000 (14:21 +0200)]
libdm: fix parentheses in assignment + comparison

As reported, fix incorrect placement of parentheses.
TODO: add testing code.

6 years agolvconvert: support repair of cache/cachepool
Zdenek Kabelac [Mon, 18 Sep 2017 09:33:47 +0000 (11:33 +0200)]
lvconvert: support repair of cache/cachepool

Extend repair for cache and cachepool target
and user 'lvconvert_repair' routine name.

6 years agolvconvert: repair supports poometadatespare switch
Zdenek Kabelac [Wed, 13 Sep 2017 09:48:15 +0000 (11:48 +0200)]
lvconvert: repair supports poometadatespare switch

Enable handling of  --poolmetadataspare so if user can prevent
creation of _pmspare volume during --repair operation (just
like during actual lvcreate or lvconvert) for pool volumes.

6 years agoconfigure: Add warning for D-Bus w/o notifications
Marian Csontos [Wed, 20 Sep 2017 08:25:29 +0000 (10:25 +0200)]
configure: Add warning for D-Bus w/o notifications

Building D-Bus support without notifications is not recommended.

6 years agoconfigure: Update configure
Marian Csontos [Wed, 20 Sep 2017 08:13:39 +0000 (10:13 +0200)]
configure: Update configure

6 years agoliblvm: Add deprecation warning to configure
Marian Csontos [Wed, 20 Sep 2017 08:00:59 +0000 (10:00 +0200)]
liblvm: Add deprecation warning to configure

6 years agoliblvm: Deprecate library and bindings
Marian Csontos [Tue, 19 Sep 2017 13:17:01 +0000 (15:17 +0200)]
liblvm: Deprecate library and bindings

It is recommended to use D-Bus API instead of liblvm2app or python
bindings.

6 years agotoollib: fix parentheses in assignment + comparison
David Teigland [Tue, 19 Sep 2017 14:19:24 +0000 (09:19 -0500)]
toollib: fix parentheses in assignment + comparison

6 years agoman pvscan: just write --activate in description
David Teigland [Mon, 18 Sep 2017 15:56:39 +0000 (10:56 -0500)]
man pvscan: just write --activate in description

rather than -a|--activate, because web pages on
man7.org are not printing the | character.

7 years agodmsetup: Process -S to filter input device lists.
Alasdair G Kergon [Thu, 14 Sep 2017 22:41:17 +0000 (23:41 +0100)]
dmsetup: Process -S to filter input device lists.

The following commands now pass the device list through a
--select|-S filter before processing:

suspend resume clear wipe_table remove deps status table

7 years agolvcreate: use cmd defs to deny unspported lockd cases
David Teigland [Thu, 14 Sep 2017 17:20:29 +0000 (12:20 -0500)]
lvcreate: use cmd defs to deny unspported lockd cases

In a shared VG, lvconvert must be used to create thin pools
and cache pools, not the lvcreate variants of those commands.
Deny these cases early in lvcreate using the new command defs.
Denying these cases deeper in the code was missing some
cleanup of the partially completed command.

7 years agorevert tidy: prefer not using else after return
David Teigland [Thu, 14 Sep 2017 17:15:59 +0000 (12:15 -0500)]
revert tidy: prefer not using else after return

Revert the lvmlockd.c changes from:
  commit 0bf836aa14f98eb83969a6e81695a024f56a5eb5
  "tidy: prefer not using else after return"

The commit introduced at least one regression, which broke
lvcreate of a thin pool in a shared VG.

7 years agokernel: Refresh dm-ioctl.h
Alasdair G Kergon [Thu, 14 Sep 2017 16:50:56 +0000 (17:50 +0100)]
kernel: Refresh dm-ioctl.h

Adds DM_DEV_ARM_POLL

7 years agopost-release v2_02_174
Alasdair G Kergon [Wed, 13 Sep 2017 19:46:25 +0000 (20:46 +0100)]
post-release

7 years agopre-release
Alasdair G Kergon [Wed, 13 Sep 2017 19:38:29 +0000 (20:38 +0100)]
pre-release

7 years agoREADME: Include new github links
Alasdair G Kergon [Wed, 13 Sep 2017 19:20:04 +0000 (20:20 +0100)]
README: Include new github links

We've decided to mirror the upstream code onto github for the
convenience of people already using that platform.

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