]> sourceware.org Git - lvm2.git/log
lvm2.git
9 years agolvmpolld: Add standalone polldaemon.
Ondrej Kozina [Fri, 8 May 2015 23:59:18 +0000 (00:59 +0100)]
lvmpolld: Add standalone polldaemon.

See doc/lvmpolld_overview.txt

9 years agolvmcache: set device in label when switching devs V2
David Teigland [Fri, 8 May 2015 22:10:53 +0000 (17:10 -0500)]
lvmcache: set device in label when switching devs V2

This is an alternative/equivalent to commit
ca67cf84df6015c990618de3dc45c0b87eee75ce

The problem (wrong label->dev after a new preferred
duplicate device is chosen) was isolated to the lvmetad
case (non-lvmetad worked fine), and this fixes the problem
by setting the new label->dev in the lvmetad-specific
code rather than in the general lvmcache code.

9 years agolvmcache: set device in label when switching devs
David Teigland [Fri, 8 May 2015 19:38:26 +0000 (14:38 -0500)]
lvmcache: set device in label when switching devs

When using lvmetad, the reporter code was not reporting
the new preferred device because the new preferred dev
was not being set in the label struct.

9 years agotests: better filter
Zdenek Kabelac [Fri, 8 May 2015 18:44:43 +0000 (20:44 +0200)]
tests: better filter

Filter $PREFIX rather then just LVMTEST.

9 years agotests: missing vg
Zdenek Kabelac [Fri, 8 May 2015 17:17:00 +0000 (19:17 +0200)]
tests: missing vg

9 years agotoollib: avoid repeated lvmetad vg_lookup
David Teigland [Tue, 5 May 2015 21:24:50 +0000 (16:24 -0500)]
toollib: avoid repeated lvmetad vg_lookup

In process_each_{vg,lv,pv} when no vgname args are given,
the first step is to get a list of all vgid/vgname on the
system.  This is exactly what lvmetad returns from a
vg_list request.  The current code is doing a vg_lookup
on each VG after the vg_list and populating lvmcache with
the info for each VG.  These preliminary vg_lookup's are
unnecessary, because they will be done again when the
processing functions call vg_read.  This patch eliminates
the initial round of vg_lookup's, which can roughly cut in
half the number of lvmetad requests and save a lot of extra work.

9 years agolvmcache: choose preferred device once
David Teigland [Wed, 6 May 2015 19:49:44 +0000 (14:49 -0500)]
lvmcache: choose preferred device once

Once the preferred duplicate devices have been set in
lvmcache, don't attempt to pick preferred duplicates
again.

9 years agolvmcache: update lvmcache with alternate device
David Teigland [Tue, 5 May 2015 19:02:43 +0000 (14:02 -0500)]
lvmcache: update lvmcache with alternate device

When there are duplicate PVs, and one device
replaces another in lvmcache, use label_read
to update lvmcache for the new device.

9 years agodebug: extra validation of passed segment
Zdenek Kabelac [Thu, 7 May 2015 12:04:22 +0000 (14:04 +0200)]
debug: extra validation of passed segment

Always check if passed segment really is correct cache segment.
(Avoids derefernce of possibly NULL seg->pool_lv).

9 years agodebug: tracing error path
Zdenek Kabelac [Thu, 7 May 2015 10:37:15 +0000 (12:37 +0200)]
debug: tracing error path

9 years agodebug: show sys errors
Zdenek Kabelac [Thu, 7 May 2015 09:38:43 +0000 (11:38 +0200)]
debug: show sys errors

9 years agocleanup: use 64bit ulongs
Zdenek Kabelac [Thu, 7 May 2015 09:17:36 +0000 (11:17 +0200)]
cleanup: use 64bit ulongs

Use 64bit arithmetics for all numbers (Coverity).

9 years agocleanup: cast minor to dev_t
Zdenek Kabelac [Thu, 7 May 2015 09:03:48 +0000 (11:03 +0200)]
cleanup: cast minor to dev_t

Let the arithmetic run with a single dev_t type (Coverity).

9 years agocleanup: indent mismatch
Zdenek Kabelac [Thu, 7 May 2015 09:00:23 +0000 (11:00 +0200)]
cleanup: indent mismatch

Aling break (Coverity).

9 years agocleanup: drop unneeded header file
Zdenek Kabelac [Thu, 7 May 2015 08:58:35 +0000 (10:58 +0200)]
cleanup: drop unneeded header file

Does not resolves any symbols (Coverity).

9 years agocleanup: drop unneeded int test
Zdenek Kabelac [Thu, 7 May 2015 08:54:55 +0000 (10:54 +0200)]
cleanup: drop unneeded int test

Testing int  region_size > INT32_MAX is always false
so drop the test (Coverity).

9 years agoformat1: check for lvm1_system_id
Zdenek Kabelac [Thu, 7 May 2015 11:09:43 +0000 (13:09 +0200)]
format1: check for lvm1_system_id

As in the code above in this function continue to check for
lvm1_system_id pointer existance before dereferencing it
(Coverity).

9 years agoformat_text: properly validate PV size for restore
Zdenek Kabelac [Thu, 7 May 2015 09:08:49 +0000 (11:08 +0200)]
format_text: properly validate PV size for restore

Use 64bit arithmentic for PV size calculation (Coverity).

Also remove sector shift for compared PV size, since all
values are already held in sectors.

This fixes validatio of PV size when restoring PV
from vg metadata backup file.

9 years agopvcreate: fix test for wiping status
Zdenek Kabelac [Thu, 7 May 2015 10:10:20 +0000 (12:10 +0200)]
pvcreate: fix test for wiping status

Commit ed420fb6917162ed17af69a9a0ec9ae26e61e209 changed
paramet wiped to be a pointer, but missed to switch
to test pointer dereferenced value and instead always
checked 'pointer'.

9 years agolvmcache: copy just 32bytes
Zdenek Kabelac [Thu, 7 May 2015 09:28:22 +0000 (11:28 +0200)]
lvmcache: copy just 32bytes

Copy only bytes which fits.

vginfo->vgid  is  [ID_LEN + 1]
vgsummary->vgid has only [ID_LEN]

Reported by Coverity.

9 years agoman: Fix recursive lvm-config man page.
Alasdair G Kergon [Thu, 7 May 2015 11:07:40 +0000 (12:07 +0100)]
man: Fix recursive lvm-config man page.

9 years agoPython: Improve lv property test coverage
Tony Asleson [Tue, 5 May 2015 18:48:52 +0000 (13:48 -0500)]
Python: Improve lv property test coverage

Improve the python unit test case to cover all of the properties of a LV and
the properties of a LV segment.

In addition we also add a 'tag' to the lv so that we can retrieve it
using the 'lv_tags' property to ensure that this works as expected.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
9 years agolvm2app: Correct missing string properties
Tony Asleson [Mon, 4 May 2015 20:20:55 +0000 (15:20 -0500)]
lvm2app: Correct missing string properties

Synopsis: STR_LIST needs to be treated as STR for properties.

For any lvm property that was internally 'typed' as a string list we were failing
to return a string in the property API.  This was due to the fact that for the
properties to work the value needs to either be evaulated as a string or a
number.  This change corrects the macro used to build the memory array of
structures so that the string bitfield is set as needed to ensure that the value
is a string.

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

Signed-off-by: Tony Asleson <tasleson@redhat.com>
9 years agopython: Check for NULL value before constructing string property
Tony Asleson [Mon, 4 May 2015 20:19:48 +0000 (15:19 -0500)]
python: Check for NULL value before constructing string property

When retrieving a property value that is a string, if the character pointer in C
was NULL, we would segfault.  This change checks for non-null before creating a
python string representation.  In the case where the character pointer is NULL
we will return a python 'None' for the value.

Signed-off-by: Tony Asleson <tasleson@redhat.com>
9 years agopython: Build correct python value for numerical property
Tony Asleson [Mon, 4 May 2015 19:55:00 +0000 (14:55 -0500)]
python: Build correct python value for numerical property

With the lvm2app C API adding the ability to determine when a property is
signed we can then use this information to construct the correct representation
of the number for python which will maintain value and sign.  Previously, we
only represented the numbers in python as positive integers.

Python long type exceeds the range for unsigned and signed integers, we just
need to use the appropriate parsing code to build correctly.

Python part of the fix for:
https://bugzilla.redhat.com/show_bug.cgi?id=838257

Signed-off-by: Tony Asleson <tasleson@redhat.com>
9 years agolvm2app: Add signed numerical property values
Tony Asleson [Mon, 4 May 2015 19:51:41 +0000 (14:51 -0500)]
lvm2app: Add signed numerical property values

Currently lvm2app properties have the following structure:

typedef struct lvm_property_value {
        uint32_t is_settable:1;
        uint32_t is_string:1;
        uint32_t is_integer:1;
        uint32_t is_valid:1;
        uint32_t padding:28;
        union {
                const char *string;
                uint64_t integer;
        } value;
} lvm_property_value_t;

which assumes that numerical values were in the range of 0 to 2**64-1.  However,
some of the properties were 'signed', like LV major/minor numbers and some
reserved values for properties that represent percentages.  Thus when the
values were retrieved they were in two's complement notation.  So for a -1
major number the API user would get a value of 18446744073709551615.  The
API user could cast the returned value to an int64_t to handle this, but that
requires the API developer to look at the source code and determine when it
should be done.

This change modifies the return property structure to:

typedef struct lvm_property_value {
        uint32_t is_settable:1;
        uint32_t is_string:1;
        uint32_t is_integer:1;
        uint32_t is_valid:1;
        uint32_t is_signed:1;
        uint32_t padding:27;
        union {
                const char *string;
                uint64_t integer;
                int64_t signed_integer;
        } value;
} lvm_property_value_t;

With this addition the API user can interrogate that the value is numerical,
(is_integer = 1) and subsequently check if it's signed (is_signed = 1) too.
If signed, then the API developer should use the union's signed_integer to
avoid casting.

This change maintains backwards compatibility as the structure size remains
unchanged and integer value remains unchanged.  Only the additional bit
taken from the pad is utilized.

Bugzilla reference:
https://bugzilla.redhat.com/show_bug.cgi?id=838257

Signed-off-by: Tony Asleson <tasleson@redhat.com>
9 years agotests: do not restart lvmetad when not necessary
Ondrej Kozina [Wed, 6 May 2015 13:20:11 +0000 (15:20 +0200)]
tests: do not restart lvmetad when not necessary

overlooked pvmove-restart test during cleanup

9 years agoWHATS_NEW: update for recent changes
Ondrej Kozina [Tue, 5 May 2015 17:35:52 +0000 (19:35 +0200)]
WHATS_NEW: update for recent changes

commits:
bda26acf70e92232b1ed644dba6b44ecbff2a058
76a0dffe6f4869de9ca457119c9d7ced837d4e0b

9 years agopolldaemon: make wait_for_single_lv public
Ondrej Kozina [Fri, 10 Apr 2015 14:36:50 +0000 (16:36 +0200)]
polldaemon: make wait_for_single_lv public

referenced by new lvpoll command after lvmpolld
gets merged.

9 years agopolldaemon: introduce _nanosleep function
Ondrej Kozina [Fri, 10 Apr 2015 14:31:28 +0000 (16:31 +0200)]
polldaemon: introduce _nanosleep function

querying future lvmpolld with zero wait time is highly undesirable
and can cause serious performance drop of the future daemon. The new
wrapper function may avoid immediate return from syscal by
introducing minimal wait time on demand.

9 years agopolldaemon: refactor polling interfaces
Ondrej Kozina [Fri, 10 Apr 2015 12:08:19 +0000 (14:08 +0200)]
polldaemon: refactor polling interfaces

Routines responsible for polling of in-progress pvmove, snapshot merge
or mirror conversion each used custom lookup functions to find vg and
lv involved in polling.

Especially pvmove used pvname to lookup pvmove in-progress. The future
lvmpolld will poll each operation by vg/lv name (internally by lvid).
Also there're plans to make pvmove able to move non-overlaping ranges
of extents instead of single PVs as of now. This would also require
to identify the opertion in different manner.

The poll_operation_id structure together with daemon_parms structure they
identify unambiguously the polling task.

9 years agopolldaemon: optimise out waiting after polling
Ondrej Kozina [Tue, 5 May 2015 14:09:53 +0000 (16:09 +0200)]
polldaemon: optimise out waiting after polling

Waiting even after _check_lv_status returned success and
'finished' flag was set to true doesn't make much sense.

Note that while we skip the wait() we also skip the
init_full_scan_done(0) inside the routine. This should
have no impact as long as the code after _wait_for_single_lv
doesn't presume anything about the state of the cache.

9 years agopolldaemon: get get_copy_vg ready for refactoring
Ondrej Kozina [Tue, 5 May 2015 14:06:24 +0000 (16:06 +0200)]
polldaemon: get get_copy_vg ready for refactoring

with refactored code we take some VG locks as read-only.
Make the poll_get_copy_vg ready for the change.

9 years agolvconvert: code cleanup and preps for refactoring
Ondrej Kozina [Tue, 5 May 2015 13:11:50 +0000 (15:11 +0200)]
lvconvert: code cleanup and preps for refactoring

just a code cleanup and preparations for adding
new code required for polldaemon refactoring.
This commit should not have any functional impact.

9 years agopolldaemon: respect lv_attr parm in poll_get_copy_lv
Ondrej Kozina [Mon, 4 May 2015 13:41:27 +0000 (15:41 +0200)]
polldaemon: respect lv_attr parm in poll_get_copy_lv

as a part of bigger effort to unify polling intefaces
poll_get_copy_lv should be able to look up LVs based
on theirs lv->status field.

Effective after pvmove starts using poll_get_copy_lv
fn as well.

9 years agopolldaemon: move lvconvert_get_copy_lv code
Ondrej Kozina [Fri, 10 Apr 2015 11:57:13 +0000 (13:57 +0200)]
polldaemon: move lvconvert_get_copy_lv code

Moving lvconvert_get_copy_lv to polldaemon (poll_get_copy_lv).
Clear move and rename.

9 years agopolldaemon: move lvconvert_get_copy_vg code
Ondrej Kozina [Mon, 4 May 2015 12:32:32 +0000 (14:32 +0200)]
polldaemon: move lvconvert_get_copy_vg code

Moving lvconvert_get_copy_vg to polldaemon (poll_get_copy_vg).
Clear move and rename.

9 years agotests: play better with mdadm
Zdenek Kabelac [Mon, 4 May 2015 11:07:33 +0000 (13:07 +0200)]
tests: play better with mdadm

Manage mdadm devices on older distros is a challange.

9 years agoraid: reread status when 0 is reported
Zdenek Kabelac [Mon, 4 May 2015 09:25:00 +0000 (11:25 +0200)]
raid: reread status when 0 is reported

When kernel target reports sync status as 0%  it might as well mean
it's 100% in sync, just the target is in some race inconsistent
state - so reread once again and take a more optimistic value ;)

Patch tries to work around:
https://bugzilla.redhat.com/show_bug.cgi?id=1210637

9 years agotests: check for open_count
Zdenek Kabelac [Mon, 4 May 2015 08:18:44 +0000 (10:18 +0200)]
tests: check for open_count

Instead of checking /proc/mounts check for open_count of snap device.
Parallel umount has race, so check for open_count.

9 years agotests: drop extra scsi init
Zdenek Kabelac [Mon, 4 May 2015 08:17:48 +0000 (10:17 +0200)]
tests: drop extra scsi init

Use first test also for checking the support is there -
avoid one extra unnecessary scsi_debug reload.

9 years agotests: check for clvmd process entry
Zdenek Kabelac [Mon, 4 May 2015 08:16:33 +0000 (10:16 +0200)]
tests: check for clvmd process entry

Instead of checking just for pid file - rather check
for process  - since there could be slight race, the
pid file is gone, but process still exists.

9 years agotests: validate passed LVM_TEST_DEVDIR
Zdenek Kabelac [Mon, 4 May 2015 08:15:56 +0000 (10:15 +0200)]
tests: validate passed LVM_TEST_DEVDIR

Quit test early if passed LVM_TEST_DEVDIR dir does not exists.

9 years agotests: wait for scsi device to appear
Zdenek Kabelac [Mon, 4 May 2015 08:14:52 +0000 (10:14 +0200)]
tests: wait for scsi device to appear

Continue with test as soon as device appear (avoid 2s delay)

9 years agotests: dd needs to fail in this case
Zdenek Kabelac [Sat, 2 May 2015 23:06:20 +0000 (01:06 +0200)]
tests: dd needs to fail in this case

9 years agotests: more waits on restart
Zdenek Kabelac [Sat, 2 May 2015 22:29:06 +0000 (00:29 +0200)]
tests: more waits on restart

Check for socket presence (hardcoded for now)

9 years agotests: use 800ms write delay
Zdenek Kabelac [Sat, 2 May 2015 20:03:19 +0000 (22:03 +0200)]
tests: use 800ms write delay

Since this value magically worked for  pvmove-abort*
use it here as well.

Also prepate_lvmetad has better kill&reload mechanism.

9 years agotests: use odirect
Zdenek Kabelac [Sat, 2 May 2015 19:14:45 +0000 (21:14 +0200)]
tests: use odirect

Fill snaphot with odirect so we know data hits disk
before we test how full the snapshot is.

9 years agolvm2app: call fin_locking in lvm_quit
Zdenek Kabelac [Sat, 2 May 2015 19:13:15 +0000 (21:13 +0200)]
lvm2app: call fin_locking in lvm_quit

lvm_quit() function should also close locking.
Fixes unclosed socket connecting clvmd.

9 years agoconfigure: detect /run dir
Zdenek Kabelac [Sat, 2 May 2015 21:57:52 +0000 (23:57 +0200)]
configure: detect /run dir

Access /run directly when system supports it.

9 years agoclvmd: missed newline in help text
Zdenek Kabelac [Sat, 2 May 2015 22:30:14 +0000 (00:30 +0200)]
clvmd: missed newline in help text

Print \n after listing included lock managers.

9 years agopost-release
Alasdair G Kergon [Sat, 2 May 2015 00:52:05 +0000 (01:52 +0100)]
post-release

9 years agopre-release v2_02_119
Alasdair G Kergon [Sat, 2 May 2015 00:41:17 +0000 (01:41 +0100)]
pre-release

9 years agoconfig: Remove newly-exposed default settings.
Alasdair G Kergon [Fri, 1 May 2015 23:07:12 +0000 (00:07 +0100)]
config: Remove newly-exposed default settings.

Reinstate config settings matching the last release until every
case where the generator produces different output has been reviewed
and fresh decisions made about which defaults to expose as protection
against changes in newer releases. We should be trying to reduce, not
increase, this number.

9 years agotests: more advance cleanup of running pvmove
Zdenek Kabelac [Fri, 1 May 2015 20:42:10 +0000 (22:42 +0200)]
tests: more advance cleanup of running pvmove

More take down more targets and use time-limited code.

9 years agotests: configure use_lvmetad when needed
Zdenek Kabelac [Fri, 1 May 2015 20:40:58 +0000 (22:40 +0200)]
tests: configure use_lvmetad when needed

9 years agoman: expanded explanation of lvmetad
David Teigland [Fri, 1 May 2015 19:45:50 +0000 (14:45 -0500)]
man: expanded explanation of lvmetad

9 years agoman: expanded explanation of pvscan
David Teigland [Fri, 1 May 2015 18:44:31 +0000 (13:44 -0500)]
man: expanded explanation of pvscan

Related to it's role with lvmetad and auto-activation.

9 years agotests: free -h is quite new option
Zdenek Kabelac [Fri, 1 May 2015 13:37:50 +0000 (15:37 +0200)]
tests: free -h is quite new option

Stay with -g and and ignore failure.

9 years agotests: minor simplifications
Zdenek Kabelac [Thu, 30 Apr 2015 19:51:43 +0000 (21:51 +0200)]
tests: minor simplifications

minor updates

9 years agotests: disable usage of fuser
Zdenek Kabelac [Fri, 1 May 2015 11:26:07 +0000 (13:26 +0200)]
tests: disable usage of fuser

Seems we captured problems with debug.log overwrite,
so avoid quite expensive usage of fuser tool with each lvm command.

9 years agotests: run api tests from startup dir
Zdenek Kabelac [Fri, 1 May 2015 13:01:33 +0000 (15:01 +0200)]
tests: run api tests from startup dir

9 years agotests: no lvmetad reload for debugless output
Zdenek Kabelac [Fri, 1 May 2015 12:45:47 +0000 (14:45 +0200)]
tests: no lvmetad reload for debugless output

Introduce LVM_TEST_LVMETAD_DEBUG_OPTS to allow to override
default debug opts for lvmetad.

However could be still overloaded on command line:

make check_lvmetad LVM_TEST_LVMETAD_DEBUG_OPTS="-l all"...

9 years agotests: lower version of dm-delay
Zdenek Kabelac [Thu, 30 Apr 2015 20:21:18 +0000 (22:21 +0200)]
tests: lower version of dm-delay

Let's see what will break with lower version 1.1.

Also avoid repeated check of target version.

9 years agotests: rename kill_tagged_processes
Zdenek Kabelac [Thu, 30 Apr 2015 16:42:31 +0000 (18:42 +0200)]
tests: rename kill_tagged_processes

Better name for aux function.
First use normal -TERM, and only after a while use -KILL
(leaving some time to correctly finish)
Print INFO about killed processes.

9 years agotests: move conf preparing
Zdenek Kabelac [Thu, 30 Apr 2015 11:57:54 +0000 (13:57 +0200)]
tests: move conf preparing

If the test in the middle is restarting lvmetad
avoid conf regenerating.

9 years agotests: hide error message
Zdenek Kabelac [Thu, 30 Apr 2015 11:57:08 +0000 (13:57 +0200)]
tests: hide error message

Hide error about missing declare -A  support.

9 years agotests: wait between remount
Zdenek Kabelac [Thu, 30 Apr 2015 11:43:31 +0000 (13:43 +0200)]
tests: wait between remount

Let's see if this help with some races...

9 years agotests: move kernel_at_least to aux
Zdenek Kabelac [Thu, 30 Apr 2015 11:23:56 +0000 (13:23 +0200)]
tests: move kernel_at_least to aux

Hide func processing and reuse existing
version_at_least().

9 years agotests: watch out for RAM size
Zdenek Kabelac [Thu, 30 Apr 2015 09:55:38 +0000 (11:55 +0200)]
tests: watch out for RAM size

Reduce mem-requirements on low memory boxes,
activate less volumes if machine is below 0.5G.

Also print mem size at test header.

9 years agoconfig: add CFG_DEFAULT_COMMENTED to comment out default value on output
Peter Rajnoha [Thu, 30 Apr 2015 16:26:56 +0000 (18:26 +0200)]
config: add CFG_DEFAULT_COMMENTED to comment out default value on output

9 years agoman: lvmconfig: also mention '--type list' in synopsis
Peter Rajnoha [Thu, 30 Apr 2015 16:00:39 +0000 (18:00 +0200)]
man: lvmconfig: also mention '--type list' in synopsis

9 years agolvmconfig: add supporting code for handling deprecated settings
Peter Rajnoha [Thu, 30 Apr 2015 15:40:24 +0000 (17:40 +0200)]
lvmconfig: add supporting code for handling deprecated settings

This patch adds supporting code for handling deprecated settings.

Deprecated settings are not displayed by default in lvmconfig output
(except for --type current and --type diff). There's a new
"--showdeprecated" lvmconfig option to display them if needed.

Also, when using lvmconfig --withcomments, the comments with info
about deprecation are displayed for deprecated settings and with
lvmconfig --withversions, the version in which the setting was
deprecated is displayed in addition to the version of introduction.

If using --atversion with a version that is lower than the one
in which the setting was deprecated, the setting is then considered
as not deprecated (simply because at that version it was not
deprecated).

For example:

$ lvmconfig --type default activation
activation {
        ...
raid_region_size=512
        ...
}

$ lvmconfig --type default activation --showdeprecated
activation {
        ...
mirror_region_size=512
raid_region_size=512
        ...
}

$ lvmconfig --type default activation --showdeprecated --withversions
activation {
        ...
# Available since version 1.0.0.
# Deprecated since version 2.2.99.
mirror_region_size=512
# Available since version 2.2.99.
raid_region_size=512
        ...
}

$ lvmconfig --type default activation --showdeprecated --withcomments
activation {
        ...
# Configuration option activation/mirror_region_size.
# This has been replaced by the activation/raid_region_size
# setting.
# Size (in KB) of each copy operation when mirroring.
# This configuration option is deprecated.
mirror_region_size=512

# Configuration option activation/raid_region_size.
# Size in KiB of each raid or mirror synchronization region.
# For raid or mirror segment types, this is the amount of
# data that is copied at once when initializing, or moved
# at once by pvmove.
raid_region_size=512
        ...
}

$ lvmconfig --type default activation --withcomments --atversion 2.2.98
activation {
       ...
       # Configuration option activation/mirror_region_size.
       # Size (in KB) of each copy operation when mirroring.
       mirror_region_size=512
       ...
}

9 years agoconfig_settings: devices/cache, activation/mirror_region_size and activation/mirror_d...
Peter Rajnoha [Thu, 30 Apr 2015 15:39:59 +0000 (17:39 +0200)]
config_settings: devices/cache, activation/mirror_region_size and activation/mirror_device_fault_policy are deprecated

9 years agoconfig: preparation for marking configuration nodes as deprecated
Peter Rajnoha [Thu, 30 Apr 2015 13:34:07 +0000 (15:34 +0200)]
config: preparation for marking configuration nodes as deprecated

A preparatory code for marking configuration nodes as deprecated:
  - struct cfg_def_item gains 2 new fields ("deprecated_since_version" and "deprecation_comment"
  - cfg* macros to handle new fields
  - related config_settings.h edits to add new fields for each item (null for all at the moment)

Patch with implementation will follow...

9 years agocleanup: config_settings.h: comments
Peter Rajnoha [Thu, 30 Apr 2015 12:43:08 +0000 (14:43 +0200)]
cleanup: config_settings.h: comments

9 years agocleanup: config_settings.h: add some comments
Peter Rajnoha [Thu, 30 Apr 2015 12:28:26 +0000 (14:28 +0200)]
cleanup: config_settings.h: add some comments

9 years agolvmconfig: allow --withversions alone with --type list
Peter Rajnoha [Thu, 30 Apr 2015 12:18:14 +0000 (14:18 +0200)]
lvmconfig: allow --withversions alone with --type list

Before this patch:

$ lvmconfig --type list --withversions --withsummary global/use_lvmetad
global/use_lvmetad - Use lvmetad to cache metadata and reduce disk scanning. [2.2.93]

$ lvmconfig --type list --withversions global/use_lvmetad
global/use_lvmetad

With this patch applied:

$ lvmconfig --type list --withversions --withsummary global/use_lvmetad
global/use_lvmetad - Use lvmetad to cache metadata and reduce disk scanning. [2.2.93]

$ lvmconfig --type list --withversions global/use_lvmetad
global/use_lvmetad - [2.2.93]

9 years agolvmconfig: comment out settings with proper space/tab prefix
Peter Rajnoha [Thu, 30 Apr 2015 11:59:00 +0000 (13:59 +0200)]
lvmconfig: comment out settings with proper space/tab prefix

We're commenting out settings with undefined default values.
The comment character '#' was printed at the very beginning of
the line, it should be placed just at the beginning of the setting,
after the space/tab prefix is printed.

Before this patch:

  $ lvmconfig --type default activation
  activation {
           ...
  #        volume_list=[]
           ...
  }

With this patch applied:

  $ lvmconfig --type default activation
  activation {
           ...
           # volume_list=[]
           ...
  }

9 years agotests: lvmconf update
Zdenek Kabelac [Thu, 30 Apr 2015 09:12:19 +0000 (11:12 +0200)]
tests: lvmconf update

New lvmconf function is using bash associative arrays - however
older systems like RHEL5 doesn't provide this feature. In this case
stay with older variant.

Restore support for use case like this:
aux lvmconf 'tags/@foo {}'

9 years agospec: Pull in lvmconfig and associated manpages.
Petr Rockai [Wed, 29 Apr 2015 15:58:19 +0000 (17:58 +0200)]
spec: Pull in lvmconfig and associated manpages.

9 years agoman: Fix references to lvmcache(7) that mentioned section 8 by mistake.
Petr Rockai [Wed, 22 Apr 2015 17:38:40 +0000 (19:38 +0200)]
man: Fix references to lvmcache(7) that mentioned section 8 by mistake.

9 years agoman: lvmthin section about use-policies
David Teigland [Wed, 29 Apr 2015 15:00:38 +0000 (10:00 -0500)]
man: lvmthin section about use-policies

9 years agoman: 'lvmconfig' is preferred over 'lvm config'
David Teigland [Wed, 29 Apr 2015 15:13:13 +0000 (10:13 -0500)]
man: 'lvmconfig' is preferred over 'lvm config'

9 years agoWHATS_NEW: commit e0a62b8fdc8d041c14ca523643e319
Ondrej Kozina [Wed, 29 Apr 2015 15:04:39 +0000 (17:04 +0200)]
WHATS_NEW: commit  e0a62b8fdc8d041c14ca523643e319

9 years agolibdaemon: introduce support for exit on idle
Ondrej Kozina [Wed, 29 Apr 2015 14:59:30 +0000 (16:59 +0200)]
libdaemon: introduce support for exit on idle

works with systemd activated daemons only as of now

each daemon implementation may decide to signalize its
internal idle state (i.e. all background tasks unrelated to
client threads are finished)

9 years agotoollib: code cleanup in lv_spawn_background_polling
Ondrej Kozina [Wed, 29 Apr 2015 14:25:50 +0000 (16:25 +0200)]
toollib: code cleanup in lv_spawn_background_polling

we're going to extract parameters from lv_mirr later
with code refactoring of polldaemon

9 years agoman: 'lvm config' is preferred over 'lvm lvmconfig'
David Teigland [Wed, 29 Apr 2015 15:04:28 +0000 (10:04 -0500)]
man: 'lvm config' is preferred over 'lvm lvmconfig'

9 years agocleanup: lvmconfig man page typo
Peter Rajnoha [Wed, 29 Apr 2015 14:35:49 +0000 (16:35 +0200)]
cleanup: lvmconfig man page typo

9 years agoconfig: consolidate CFG_UNSUPPORTED and CFG_ADVANCED settings
Peter Rajnoha [Wed, 29 Apr 2015 14:07:52 +0000 (16:07 +0200)]
config: consolidate CFG_UNSUPPORTED and CFG_ADVANCED settings

These settings are in the "unsupported" group:

devices/loopfiles
log/activate_file
metadata/disk_areas (section)
metadata/disk_areas/<disk_area> (section)
metadata/disk_areas/<disk_area>/size
metadata/disk_areas/<disk_area>/id

These settings are in the "advanced" group:

devices/dir
devices/scan
devices/types
global/proc
activation/missing_stripe_filler
activation/mlock_filter
metadata/pvmetadatacopies
metadata/pvmetadataignore
metadata/stripesize
metadata/dirs

Also, this patch causes the --ignoreunsupported and --ignoreadvanced
switches to be honoured for all config types (lvmconfig --type).

By default, the --type current and --type diff display unsupported
settings, the other types ignore them - this patch also introduces
--showunsupported switch for all these other types to display even
unsupported settings in their output if needed.

9 years agotests: minimize teardown when uneeded
Zdenek Kabelac [Wed, 29 Apr 2015 11:37:13 +0000 (13:37 +0200)]
tests: minimize teardown when uneeded

If test has not yet initilized any device,
make teardown a bit faster.

9 years agotests: bash-fu for lvmconf
Zdenek Kabelac [Wed, 29 Apr 2015 10:26:12 +0000 (12:26 +0200)]
tests: bash-fu for lvmconf

Sqeeze about 0.1s out of every created conf and use internal
bash associative arrays instead of lot of command forking

9 years agolvmetad: drop unused vars
Zdenek Kabelac [Wed, 29 Apr 2015 13:00:33 +0000 (15:00 +0200)]
lvmetad: drop unused vars

Squash some unused vars introduced in some previous commit.s

9 years agopython: python 3 compat patch for lvm2
bkabrda@redhat.com [Tue, 2 Sep 2014 13:42:01 +0000 (15:42 +0200)]
python: python 3 compat patch for lvm2

As provided by rhbz: 1136366

9 years agolvmetad: Avoid duplicate entries in the list of alternate devices.
Petr Rockai [Wed, 22 Apr 2015 23:39:39 +0000 (01:39 +0200)]
lvmetad: Avoid duplicate entries in the list of alternate devices.

9 years agolvmconfig: add --type list and -l|--list
Peter Rajnoha [Wed, 29 Apr 2015 09:11:58 +0000 (11:11 +0200)]
lvmconfig: add --type list and -l|--list

lvmconfig --type list displays plain list of configuration settings.
Some of the existing decorations can be used (--withsummary and
--withversions) as well as existing options/switches (--ignoreadvanced,
--ignoreunsupported, --ignorelocal, --atversion).

For example (displaying only "config" section so the list is not long):

$lvmconfig --type list config
config/checks
config/abort_on_errors
config/profile_dir

$ lvmconfig --type list --withsummary config
config/checks - If enabled, any LVM configuration mismatch is reported.
config/abort_on_errors - Abort the LVM process if a configuration mismatch is found.
config/profile_dir - Directory where LVM looks for configuration profiles.

$ lvmconfig -l config
config/checks - If enabled, any LVM configuration mismatch is reported.
config/abort_on_errors - Abort the LVM process if a configuration mismatch is found.
config/profile_dir - Directory where LVM looks for configuration profiles.

$ lvmconfig --type list --withsummary --withversions config
config/checks - If enabled, any LVM configuration mismatch is reported. [2.2.99]
config/abort_on_errors - Abort the LVM process if a configuration mismatch is found. [2.2.99]
config/profile_dir - Directory where LVM looks for configuration profiles. [2.2.99]

Example with --atversion (displaying global section):

$ lvmconfig --type list global
global/umask
global/test
global/units
global/si_unit_consistency
global/suffix
global/activation
global/fallback_to_lvm1
global/format
global/format_libraries
global/segment_libraries
global/proc
global/etc
global/locking_type
global/wait_for_locks
global/fallback_to_clustered_locking
global/fallback_to_local_locking
global/locking_dir
global/prioritise_write_locks
global/library_dir
global/locking_library
global/abort_on_internal_errors
global/detect_internal_vg_cache_corruption
global/metadata_read_only
global/mirror_segtype_default
global/raid10_segtype_default
global/sparse_segtype_default
global/lvdisplay_shows_full_device_path
global/use_lvmetad
global/thin_check_executable
global/thin_dump_executable
global/thin_repair_executable
global/thin_check_options
global/thin_repair_options
global/thin_disabled_features
global/cache_check_executable
global/cache_dump_executable
global/cache_repair_executable
global/cache_check_options
global/cache_repair_options
global/system_id_source
global/system_id_file

$ lvmconfig --type list global --atversion 2.2.50
global/umask
global/test
global/units
global/suffix
global/activation
global/fallback_to_lvm1
global/format
global/format_libraries
global/segment_libraries
global/proc
global/locking_type
global/wait_for_locks
global/fallback_to_clustered_locking
global/fallback_to_local_locking
global/locking_dir
global/library_dir
global/locking_library

9 years agorefactor: dumpconfig: keep --withcomments to display full comment and use --withsumma...
Peter Rajnoha [Wed, 29 Apr 2015 08:53:25 +0000 (10:53 +0200)]
refactor: dumpconfig: keep --withcomments to display full comment and use --withsummary for one line summary

9 years agopolldaemon: remove redundant log messages
Ondrej Kozina [Tue, 14 Apr 2015 12:43:16 +0000 (14:43 +0200)]
polldaemon: remove redundant log messages

also alter comments describing the change in _poll_vg
wrt correct handling of multiple LVs

9 years agopvmove: make log messages more comprehensible
Ondrej Kozina [Thu, 16 Apr 2015 15:40:53 +0000 (17:40 +0200)]
pvmove: make log messages more comprehensible

clarify messages printed during pvmove set up (in
_update_metadata fn) and subsequent metadata updates
during a segment progression

9 years agoupdate copyright info in various files
Ondrej Kozina [Thu, 16 Apr 2015 15:31:07 +0000 (17:31 +0200)]
update copyright info in various files

basically transfer former date ranges from files where
the code originated from (pvmove.c and lvconvert.c)

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