]> sourceware.org Git - lvm2.git/log
lvm2.git
8 years agocache: scrubbing for cache origin LV - Bug 1169495
Brassow Jonathan [Tue, 6 Sep 2016 14:29:14 +0000 (09:29 -0500)]
cache: scrubbing for cache origin LV - Bug 1169495

Allow RAID scrubbing on cache origin sub-LV

This patch adds the ability to perform RAID scrubbing on the cache
origin sub-LV (https://bugzilla.redhat.com/1169495).  Cache origin
operations are restricted to non-clustered RAID LVs until there can
be further testing in a cluster (even for exclusive activation).

User can either specify directly _corig LV
or he can specify cache LV and operation  --syncation is
passed ONLY to   _corig LV.

If users wants to manipulation with cache-pool devices - he
needs to specify this object name.

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
8 years agopost-release
Alasdair G Kergon [Wed, 7 Sep 2016 01:34:15 +0000 (02:34 +0100)]
post-release

8 years agopre-release v2_02_165
Alasdair G Kergon [Wed, 7 Sep 2016 01:25:51 +0000 (02:25 +0100)]
pre-release

8 years agoman: Additional info on exit statuses.
Alasdair G Kergon [Wed, 7 Sep 2016 00:57:09 +0000 (01:57 +0100)]
man: Additional info on exit statuses.

8 years agoman lvmraid: install
David Teigland [Tue, 6 Sep 2016 20:20:43 +0000 (15:20 -0500)]
man lvmraid: install

8 years agoman lvmraid: comment out unfinished features
David Teigland [Tue, 6 Sep 2016 20:13:59 +0000 (15:13 -0500)]
man lvmraid: comment out unfinished features

8 years agoman lvmraid: remove rebuild example
David Teigland [Tue, 6 Sep 2016 19:54:45 +0000 (14:54 -0500)]
man lvmraid: remove rebuild example

8 years agoman: add lvmraid(7)
David Teigland [Tue, 6 Sep 2016 19:50:08 +0000 (14:50 -0500)]
man: add lvmraid(7)

8 years agodev-type: check for DEVLINKS udev db variable existence if udev_device_get_is_initial...
Peter Rajnoha [Tue, 6 Sep 2016 11:12:02 +0000 (13:12 +0200)]
dev-type: check for DEVLINKS udev db variable existence if udev_device_get_is_initialized fn is not present

Older udev versions (udev < v165), don't have the official
udev_device_get_is_initialized function available to query for
device initialization state in udev database. Also, devices don't
have USEC_INITIALIZED udev db variable set - this is bound to the
udev_device_get_is_initialized fn functionality.

In this case, check for "DEVLINKS" variable instead - all block devices
have at least one symlink set for the node (the "/dev/block/<major:minor>".
This symlink is set by default basic udev rules provided by udev directly.
We'll use this as an alternative for the check that initial udev
processing for a device has already finished.

8 years agolvmetad: Unused includes.
Alasdair G Kergon [Mon, 5 Sep 2016 16:14:53 +0000 (17:14 +0100)]
lvmetad: Unused includes.

8 years agodev-type: use more appropriate messages in udev_dev_is_mpath_component and use 10s...
Peter Rajnoha [Mon, 5 Sep 2016 12:31:09 +0000 (14:31 +0200)]
dev-type: use more appropriate messages in udev_dev_is_mpath_component and use 10s timeout

8 years agorefactor: move and rename _dev_is_mpath_component in lvmetad.c to udev_dev_is_mpath_c...
Peter Rajnoha [Mon, 5 Sep 2016 10:13:10 +0000 (12:13 +0200)]
refactor: move and rename _dev_is_mpath_component in lvmetad.c to udev_dev_is_mpath_component in dev-type.c

8 years agolvmetad: check udev for mpath component several times if udev record not initialized yet
Peter Rajnoha [Mon, 5 Sep 2016 09:33:08 +0000 (11:33 +0200)]
lvmetad: check udev for mpath component several times if udev record not initialized yet

It's possible (mainly during boot) that udev has not finished
processing the device and hence the udev database record for that
device is still marked as uninitialized when we're trying to look
at it as part of multipath component check in pvscan --cache code.

So check several times with a short delay to wait for the udev db
record to be initialized before giving up completely.

8 years agolvmetad: use udev to ignore multipath components during scan
David Teigland [Wed, 31 Aug 2016 18:05:53 +0000 (13:05 -0500)]
lvmetad: use udev to ignore multipath components during scan

When scanning devs to populate lvmetad during system startup,
filter-mpath with native sysfs multipath component detection
may not detect that a dev is multipath component.  This is
because the multipath devices may not be set up yet.

Because of this, pvscan will scan multipath components during
startup, will see them as duplicate PVs, and will disable
lvmetad.  This will leave lvmetad disabled on systems using
multipath, unless something or someone runs pvscan --cache
to rescan.

To avoid this problem, the code that is scanning devices to
populate lvmetad will now check the udev db to see if a
dev is a multipath component that should be skipped.

(This may not be perfect due to inherent udev races, but will
cover most cases and will be at least as good as it's ever
been.)

8 years agotests: skip test for older cache target
Zdenek Kabelac [Tue, 30 Aug 2016 11:28:36 +0000 (13:28 +0200)]
tests: skip test for older cache target

Some test on older can targets are not going to work, and
since there is no other fix then using newer kernel - skip
such tests completely.

8 years agodmeventd: typo and debug name fix
Zdenek Kabelac [Wed, 31 Aug 2016 09:05:39 +0000 (11:05 +0200)]
dmeventd: typo and debug name fix

Fix 'raw' -> 'row' fix.
Consitently use thin pool as a type of monitored device in info message.

8 years agolvmdump: use lsblk -s and lsblk -O in lvmdump only if these options are supported
Peter Rajnoha [Tue, 30 Aug 2016 13:33:50 +0000 (15:33 +0200)]
lvmdump: use lsblk -s and lsblk -O in lvmdump only if these options are supported

The lsblk is just a nice helper here - it's not crucial for lvmdump so
do best effort here and use the most we can from current version of
lsblk that is installed on system. The lsblk -s option was added a bit
later after lsblk introduction and lsblk -O support even more later -
so if these are not available, use only pure lsblk output without any
extras.

8 years agoconfig: regenerate
Alasdair G Kergon [Tue, 30 Aug 2016 12:23:39 +0000 (13:23 +0100)]
config: regenerate

8 years agoraid10: Fix #stripes in lvcreate msg when too many.
Alasdair G Kergon [Tue, 30 Aug 2016 11:04:23 +0000 (12:04 +0100)]
raid10: Fix #stripes in lvcreate msg when too many.

8 years agolvmdbusd: Prefix tag string with '@'
Tony Asleson [Mon, 29 Aug 2016 23:00:21 +0000 (18:00 -0500)]
lvmdbusd: Prefix tag string with '@'

8 years agolvmdbustest.py: Add tag regression test
Tony Asleson [Mon, 29 Aug 2016 22:59:42 +0000 (17:59 -0500)]
lvmdbustest.py: Add tag regression test

Add '-' back in as acceptable tag character

8 years agolvmdbusd: WS/pep8 corrections
Tony Asleson [Mon, 29 Aug 2016 20:07:55 +0000 (15:07 -0500)]
lvmdbusd: WS/pep8 corrections

8 years agolvmdbusd/lvmdb.py: Make stand alone execution work
Tony Asleson [Mon, 29 Aug 2016 19:52:41 +0000 (14:52 -0500)]
lvmdbusd/lvmdb.py: Make stand alone execution work

This was broken when the args were moved to cfg

8 years agolvmdbusd: Correct imports
Tony Asleson [Mon, 29 Aug 2016 19:51:26 +0000 (14:51 -0500)]
lvmdbusd: Correct imports

8 years agotest/lib/aux.sh: Remove incorrect comment
Tony Asleson [Mon, 29 Aug 2016 19:29:12 +0000 (14:29 -0500)]
test/lib/aux.sh: Remove incorrect comment

The dbus service needs to use the system bus.  The test environment does
not allow work with session bus environment.

8 years agotest/lib/aux.sh: Remove '--udev' for lvmdbusd start
Tony Asleson [Mon, 29 Aug 2016 19:28:12 +0000 (14:28 -0500)]
test/lib/aux.sh: Remove '--udev' for lvmdbusd start

The service will start up with udev monitoring and disable it if lvm
starts calling ExternalEvent.

8 years agolvmdbusd: Handle different daemon options
Tony Asleson [Mon, 29 Aug 2016 19:26:16 +0000 (14:26 -0500)]
lvmdbusd: Handle different daemon options

- Prevent --lvmshell with --nojson, not a valid combination
- If user is preventing json, then no lvmshell usage
- Return boolean on Manager.UseLvmShell

8 years agolvmdbusd: Include lvm shell testing as the default
Tony Asleson [Mon, 29 Aug 2016 18:19:01 +0000 (13:19 -0500)]
lvmdbusd: Include lvm shell testing as the default

8 years agodbus/testlib.py: Improve type checking
Tony Asleson [Mon, 29 Aug 2016 17:34:19 +0000 (12:34 -0500)]
dbus/testlib.py: Improve type checking

Leverage the introspection data to ensure that the service is returning
what is says it will be returning for methods and properties.

8 years agolvmdbusd: Correct return type for empty PeSegments
Tony Asleson [Mon, 29 Aug 2016 17:33:00 +0000 (12:33 -0500)]
lvmdbusd: Correct return type for empty PeSegments

8 years agolvmdbusd: Be more specific on return types for Lv
Tony Asleson [Mon, 29 Aug 2016 17:32:20 +0000 (12:32 -0500)]
lvmdbusd: Be more specific on return types for Lv

8 years agolvmdbustest.py: Remove '-' from tag ch set
Tony Asleson [Thu, 25 Aug 2016 23:41:53 +0000 (18:41 -0500)]
lvmdbustest.py: Remove '-' from tag ch set

8 years agolvmdbusd: Make job.Percent a double
Tony Asleson [Thu, 25 Aug 2016 03:39:30 +0000 (22:39 -0500)]
lvmdbusd: Make job.Percent a double

8 years agolvmdbusd: Be more explicit on return values
Tony Asleson [Wed, 24 Aug 2016 23:31:15 +0000 (18:31 -0500)]
lvmdbusd: Be more explicit on return values

The python dbus library tries to make best on what the dbus type is based on
python data type.  Some times it gets this wrong, so we will be explicit.

8 years agolvmdbusd: Use udev until ExternalEvent occurs
Tony Asleson [Wed, 24 Aug 2016 23:29:35 +0000 (18:29 -0500)]
lvmdbusd: Use udev until ExternalEvent occurs

The normal mode of operation will be to monitor for udev events until an
ExternalEvent occurs.  In that case the service will disable monitoring
for udev events and use ExternalEvent exclusively.

Note: User specifies --udev the service will always monitor udev regardless
if ExternalEvent is being called too.

8 years agolvmdbusd: Add support for using lvm shell
Tony Asleson [Fri, 12 Aug 2016 20:23:05 +0000 (15:23 -0500)]
lvmdbusd: Add support for using lvm shell

With the addition of JSON and the ability to get output which is known to
not contain any extraneous text we can now leverage lvm shell, so that we
don't fork and exec lvm command line repeatedly.

8 years agolvmdbusd: Add date & ts if running in a terminal
Tony Asleson [Fri, 12 Aug 2016 20:20:49 +0000 (15:20 -0500)]
lvmdbusd: Add date & ts if running in a terminal

When we are running in a terminal it's useful to have a date & ts on log
output like you get when output goes to the journal.  Check if we are
running on a tty and if we are, add it in.

8 years agolvmdbusd: Always fork & exec background commands
Tony Asleson [Fri, 12 Aug 2016 20:19:03 +0000 (15:19 -0500)]
lvmdbusd: Always fork & exec background commands

Our background job support requires a separate instance of lvm.  Use the
full lvm command to do so.

8 years agodebug: better verbose message
Zdenek Kabelac [Mon, 29 Aug 2016 11:38:00 +0000 (13:38 +0200)]
debug: better verbose message

8 years agocleanup: clean gcc6 minor/major types warnings
Zdenek Kabelac [Thu, 18 Aug 2016 12:41:46 +0000 (14:41 +0200)]
cleanup: clean gcc6 minor/major types warnings

Put sys/sysmacros.h in front of sys/types.h header file as requested
by gcc6.

8 years agocache: do not monitor cache-pool
Zdenek Kabelac [Wed, 24 Aug 2016 08:05:09 +0000 (10:05 +0200)]
cache: do not monitor cache-pool

Avoid monitoring of activated cache-pool - where the only purpose ATM
is to clear metadata volume which is actually activate in place
of cache-pool name (using public LV name).

Since VG lock is held across whole clear operation, dmeventd cannot
be used anyway - however in case of appliction crash we may
leave unmonitored device.

In future we may provide better mechanism as the current name
replacemnet is creating 'uncommon' table setups in case the metadata
LV is more complex type like raid  (needs some futher thinking about
error path results).

Another point to think about is the fact we should not clear device
while holding lock (i.e. dmeventd mirror repair cannot work in cases
like this).

8 years agocache: introduce cache_pool_max_chunks
Zdenek Kabelac [Wed, 24 Aug 2016 08:16:01 +0000 (10:16 +0200)]
cache: introduce cache_pool_max_chunks

Introduce 'hard limit' for max number of cache chunks.
When cache target operates with too many chunks (>10e6).

When user is aware of related possible troubles he
may increase the limit in lvm.conf.

Also verbosely inform user about possible solution.

Code works for both lvcreate and lvconvert.

Lvconvert fully supports change of chunk_size when caching LV
(and validates for compatible settings).

8 years agolvconvert: Fix --splitmirrors segfault with incorrect PV.
Alasdair G Kergon [Fri, 26 Aug 2016 00:21:01 +0000 (01:21 +0100)]
lvconvert: Fix --splitmirrors segfault with incorrect PV.

Commit 9ee071705b2c35e1132f39f5731861c831a1bb6b misunderstood integer
promotion, but it's simpler to detect -1 more directly.

8 years agotests: also fix typo in report/columns_as_rows in tests
Peter Rajnoha [Thu, 25 Aug 2016 14:25:23 +0000 (16:25 +0200)]
tests: also fix typo in report/columns_as_rows in tests

8 years agoconf: fix typo in report/columns_as_rows config option name recognition
Peter Rajnoha [Thu, 25 Aug 2016 12:53:32 +0000 (14:53 +0200)]
conf: fix typo in report/columns_as_rows config option name recognition

Commit e947c362dd0ae1da2d76925fe6b38244c5f46d25 introduced
config_settings.h file for central place to store all definitions for
config options. By mistake, it used report/colums_as_rows instead
of report/columns_as_rows (missing "n" in "columns").

8 years agotest: delay writes to all test PVs in lvchange-rebuild-raid.sh to avoid race
Heinz Mauelshagen [Wed, 24 Aug 2016 23:36:13 +0000 (01:36 +0200)]
test: delay writes to all test PVs in lvchange-rebuild-raid.sh to avoid race

8 years agoalloc: Avoid PV tags too when avoiding parallel PV allocation.
Alasdair G Kergon [Wed, 24 Aug 2016 18:37:50 +0000 (19:37 +0100)]
alloc: Avoid PV tags too when avoiding parallel PV allocation.

Also add debug messages for parallel PVs.

8 years agotest: add missing lvchange-rebuild-raid.sh
Heinz Mauelshagen [Wed, 24 Aug 2016 16:22:34 +0000 (18:22 +0200)]
test: add missing lvchange-rebuild-raid.sh

8 years agoalloc: Record PV tags of parallel PVs in log.
Alasdair G Kergon [Wed, 24 Aug 2016 14:49:34 +0000 (15:49 +0100)]
alloc: Record PV tags of parallel PVs in log.

8 years agoalloc: Move _log_parallel_areas.
Alasdair G Kergon [Wed, 24 Aug 2016 14:39:56 +0000 (15:39 +0100)]
alloc: Move _log_parallel_areas.

8 years agolvconvert: Disallow raid10 mirror conversions.
Alasdair G Kergon [Tue, 23 Aug 2016 22:40:16 +0000 (23:40 +0100)]
lvconvert: Disallow raid10 mirror conversions.

8 years agodmeventd: Add fixed timeout when unmonitoring.
Alasdair G Kergon [Tue, 23 Aug 2016 15:09:18 +0000 (16:09 +0100)]
dmeventd: Add fixed timeout when unmonitoring.

8 years agolibdm: add some comments about DM_UDEV_DISABLE_LIBRARY_FALLBACK flag
Peter Rajnoha [Tue, 23 Aug 2016 13:57:47 +0000 (15:57 +0200)]
libdm: add some comments about DM_UDEV_DISABLE_LIBRARY_FALLBACK flag

8 years agodmeventd: Simplify replacement unmonitor code.
Alasdair G Kergon [Tue, 23 Aug 2016 11:16:39 +0000 (12:16 +0100)]
dmeventd: Simplify replacement unmonitor code.

8 years agodmeventd: Start merging back replacement unmonitor code.
Alasdair G Kergon [Tue, 23 Aug 2016 10:30:34 +0000 (11:30 +0100)]
dmeventd: Start merging back replacement unmonitor code.

8 years agodmeventd: Fix unmonitoring when segtype changes.
Alasdair G Kergon [Tue, 23 Aug 2016 01:24:30 +0000 (02:24 +0100)]
dmeventd: Fix unmonitoring when segtype changes.

When the segment type is being changed, unmonitoring an LV requires
the existing dso to be specified as a parameter, not the new one.

8 years agoraid: Don't monitor raid0 or raid0_meta LVs.
Alasdair G Kergon [Sat, 20 Aug 2016 01:14:33 +0000 (02:14 +0100)]
raid: Don't monitor raid0 or raid0_meta LVs.

8 years agolvcreate: Never treat raid0 as linear.
Alasdair G Kergon [Fri, 19 Aug 2016 22:57:30 +0000 (23:57 +0100)]
lvcreate: Never treat raid0 as linear.

raid0 and raid0_meta require, or default to, at least 2 stripes.

8 years agolvconvert: Don't allow --repair on raid0 LVs.
Alasdair G Kergon [Fri, 19 Aug 2016 22:42:01 +0000 (23:42 +0100)]
lvconvert: Don't allow --repair on raid0 LVs.

8 years agolibdaemon: add errno to error message
David Teigland [Fri, 19 Aug 2016 15:59:46 +0000 (10:59 -0500)]
libdaemon: add errno to error message

8 years agolvcreate: Drop warning messages for number of raid stripes.
Alasdair G Kergon [Fri, 19 Aug 2016 13:53:33 +0000 (14:53 +0100)]
lvcreate: Drop warning messages for number of raid stripes.

It's now just setting a default, not adjusting the user's parameter.

8 years agolvcreate: No longer adjust --stripes for raid types.
Alasdair G Kergon [Fri, 19 Aug 2016 13:19:51 +0000 (14:19 +0100)]
lvcreate: No longer adjust --stripes for raid types.

If the number of stripes requested is incompatible with the requested
type of raid, give an error instead of adjusting it.

If no stripes argument is supplied, continue to use an appropriate
default.

8 years agotoollib: Record whether or not stripes/stripe_size args supplied.
Alasdair G Kergon [Fri, 19 Aug 2016 12:51:43 +0000 (13:51 +0100)]
toollib: Record whether or not stripes/stripe_size args supplied.

8 years agolib: Move lcm and gcd to lib/misc for wider use.
Alasdair G Kergon [Thu, 18 Aug 2016 13:06:13 +0000 (14:06 +0100)]
lib: Move lcm and gcd to lib/misc for wider use.

8 years agoman: lvconvert mention required option
David Teigland [Wed, 17 Aug 2016 19:56:01 +0000 (14:56 -0500)]
man: lvconvert mention required option

8 years agoman: lvconvert change location of sentence
David Teigland [Wed, 17 Aug 2016 19:13:17 +0000 (14:13 -0500)]
man: lvconvert change location of sentence

The details about each option are explained in the
section for that option.

8 years agovgsplit: fix regression processing thin external origins
Heinz Mauelshagen [Tue, 16 Aug 2016 21:57:09 +0000 (23:57 +0200)]
vgsplit: fix regression processing thin external origins

a579ba2ac27d fixed a regression causing a segfault if no external
origin existed but broke the logic leading to erroneous error
messages and creations of split off exported VGs in case the
external origin and the pool LVs were allocated on different PVs.

- resolves rhbz1367459

8 years agolvcreate: better error message creating RAID LV on < 4 KiB VG extent size
Heinz Mauelshagen [Tue, 16 Aug 2016 11:39:40 +0000 (13:39 +0200)]
lvcreate: better error message creating RAID LV on < 4 KiB VG extent size

Creating a RaidLV in VGs with very small extent sizes caused
late failure in the kernel giving a not very informative error
message. Catch the attempt early and display failure message
'Unable to create RAID LV: requires minimum VG extent size 4.00 KiB'.

- resoves rhbz1179970

8 years agotools: Suppress some unnecessary --stripesize warnings.
Alasdair G Kergon [Mon, 15 Aug 2016 18:38:45 +0000 (19:38 +0100)]
tools: Suppress some unnecessary --stripesize warnings.

https://bugzilla.redhat.com/1366745

8 years agopvmove: fix regression introduced with 8e9d5d12ae3ac75852ebd74b64c28e31abb68d0e
Heinz Mauelshagen [Mon, 15 Aug 2016 17:31:04 +0000 (19:31 +0200)]
pvmove: fix regression introduced with 8e9d5d12ae3ac75852ebd74b64c28e31abb68d0e

'pvmove -n name pv1 pv2' called with the name of a top-level LV
failed with mentioned commit.

Enhance pvmove-raid-segtypes.sh to test for prohibited RAID SubLV moves.

8 years agopvmove: prohibit non-resilient collocation of RAID SubLVs
Heinz Mauelshagen [Mon, 15 Aug 2016 16:22:32 +0000 (18:22 +0200)]
pvmove: prohibit non-resilient collocation of RAID SubLVs

'pvmove -n name pv1 pv2' allows to collocate multiple RAID SubLVs
on pv2 (e.g. results in collocated raidlv_rimage_0 and raidlv_rimage_1),
thus causing loss of resilence and/or performance of the RaidLV.

Fix this pvmove flaw leading to potential data loss in case of PV failure
by preventing any SubLVs from collocation on any PVs of the RaidLV.
Still allow to collocate any DataLVs of a RaidLV with their sibling MetaLVs
and vice-versa though (e.g. raidlv_rmeta_0 on pv1 may still be moved to pv2
already holding raidlv_rimage_0).

Because access to the top-level RaidLV name is needed,
promote local _top_level_lv_name() from raid_manip.c
to global top_level_lv_name().

- resolves rhbz1202497

8 years agopost-release
Alasdair G Kergon [Mon, 15 Aug 2016 12:23:06 +0000 (13:23 +0100)]
post-release

8 years agopre-release v2_02_164
Alasdair G Kergon [Mon, 15 Aug 2016 12:01:27 +0000 (13:01 +0100)]
pre-release

8 years agoconf: add comment about cfg_runtime
Peter Rajnoha [Mon, 15 Aug 2016 08:38:38 +0000 (10:38 +0200)]
conf: add comment about cfg_runtime

8 years agoraid_manip: pay attention to PVs listed on command line when allocating MetaLVs
Heinz Mauelshagen [Fri, 12 Aug 2016 22:20:01 +0000 (00:20 +0200)]
raid_manip: pay attention to PVs listed on command line when allocating MetaLVs

Adding MetaLVs to given DataLVs (e.g. raid0 -> raid0_meta takeover) wasn't
paying attention to any PVs listed on the lvconvert command line.

8 years agoraid_manip: add missing code avoiding MetaLV collocation on the same PV
Heinz Mauelshagen [Fri, 12 Aug 2016 20:46:57 +0000 (22:46 +0200)]
raid_manip: add missing code avoiding MetaLV collocation on the same PV

Adding MetaLVs to given DataLVs (e.g. raid0 -> raid0_meta takeover),
_avoid_pvs_with_other_images_of_lv() was missing code to prohibit
allocation when called with a just allocated MetaLV to prohibit
collaocation of the next allocated MetaLV on the same PV.

- resolves rhbz1366738

8 years agonotify: Fix hang with lvm shell & --enable-notify-dbus
Tony Asleson [Fri, 12 Aug 2016 19:31:06 +0000 (14:31 -0500)]
notify: Fix hang with lvm shell & --enable-notify-dbus

When lvm is compiled with --enable-notify-dbus and a user uses lvm
shell, after they issue 200+ commands the lvm shell will hang for
~30 seconds trying to notify the lvm dbus service that a change
has occurred.  This appears to be caused by resource exhaustion,
because the sockets used for dbus communication are not be closed.

8 years agolvcreate/lvconvert: fix validation of maximum mirrors/stripes
Heinz Mauelshagen [Fri, 12 Aug 2016 17:14:28 +0000 (19:14 +0200)]
lvcreate/lvconvert: fix validation of maximum mirrors/stripes

Enforce mirror/raid0/1/10/4/5/6 type specific maximum images when
creating LVs or converting them from mirror <-> raid1.

Document those maxima in the lvcreate/lvconvert man pages.

- resolves rhbz1366060

8 years agoraid: Avoid double suffix on rmeta LV name paired with rimage LV.
Alasdair G Kergon [Thu, 11 Aug 2016 22:31:49 +0000 (23:31 +0100)]
raid: Avoid double suffix on rmeta LV name paired with rimage LV.

8 years agospec: Add new files
Marian Csontos [Thu, 11 Aug 2016 12:10:24 +0000 (14:10 +0200)]
spec: Add new files

8 years agolvmcmdline: use long int for number returned by strtol
Peter Rajnoha [Wed, 10 Aug 2016 07:10:28 +0000 (09:10 +0200)]
lvmcmdline: use long int for number returned by strtol

8 years agopost-release
Alasdair G Kergon [Wed, 10 Aug 2016 02:01:55 +0000 (03:01 +0100)]
post-release

8 years agopre-release v2_02_163
Alasdair G Kergon [Wed, 10 Aug 2016 01:42:35 +0000 (02:42 +0100)]
pre-release

8 years agoman: fix references to names for --configreport arg in pvs, vgs and lvs man page
Peter Rajnoha [Tue, 9 Aug 2016 15:55:34 +0000 (17:55 +0200)]
man: fix references to names for --configreport arg in pvs, vgs and lvs man page

8 years agoman: add lvm fullreport man page
Peter Rajnoha [Tue, 9 Aug 2016 15:53:32 +0000 (17:53 +0200)]
man: add lvm fullreport man page

8 years agoreport: add report_reset_cmdlog_seqnum and call it for each new cmd executed in lvm...
Peter Rajnoha [Mon, 8 Aug 2016 13:45:46 +0000 (15:45 +0200)]
report: add report_reset_cmdlog_seqnum and call it for each new cmd executed in lvm shell

8 years agoconf: mark selected settings with CFG_DISALLOW_INTERACTIVE flag
Peter Rajnoha [Mon, 8 Aug 2016 08:43:33 +0000 (10:43 +0200)]
conf: mark selected settings with CFG_DISALLOW_INTERACTIVE flag

8 years agoconfig: add support for CFG_DISALLOW_INTERACTIVE flag to mark settings as not suitabl...
Peter Rajnoha [Mon, 8 Aug 2016 08:43:18 +0000 (10:43 +0200)]
config: add support for CFG_DISALLOW_INTERACTIVE flag to mark settings as not suitable for override in interactive mode

Some settings are not suitable for override in interactive/shell
mode because such settings may confuse the code and it may end
up with unexpected behaviour. This is because of the fact that
once we're in the interactive/shell mode, we have already applied
some settings for the shell itself and we can't override them
further because we're already using those settings to drive the
interactive/shell mode. Such settings would get ignored silently
or, in worse case, they would mess up the existing configuration.

8 years agorefactor: modify original _check_profile fn and rename to config_force_check for...
Peter Rajnoha [Mon, 8 Aug 2016 10:55:15 +0000 (12:55 +0200)]
refactor: modify original _check_profile fn and rename to config_force_check for general use

8 years agoconf: add lvmdbusd.profile
Peter Rajnoha [Thu, 4 Aug 2016 16:16:21 +0000 (18:16 +0200)]
conf: add lvmdbusd.profile

8 years agolvm: shell: honor log/command_log_selection as default and reset to this value after...
Peter Rajnoha [Thu, 4 Aug 2016 16:15:54 +0000 (18:15 +0200)]
lvm: shell: honor log/command_log_selection as default and reset to this value after lastlog

8 years agolvmcmdline: profile: early profile load for lvm shell
Peter Rajnoha [Thu, 4 Aug 2016 14:45:27 +0000 (16:45 +0200)]
lvmcmdline: profile: early profile load for lvm shell

Make it possible to also load profile for lvm shell by honouring
LVM_COMMAND_PROFILE environment variable.

8 years agolvm: shell: extend log report to cover whole lvm shell's main loop
Peter Rajnoha [Thu, 4 Aug 2016 11:42:57 +0000 (13:42 +0200)]
lvm: shell: extend log report to cover whole lvm shell's main loop

When lvm commands are executed in lvm shell, we cover the whole lvm
command execution within this shell now. That means, all messages logged
and status caught during each command execution is now recorded in the
log report, including overall command's return code.

8 years agolibdm: report: add dm_report_group_output_and_pop_all
Peter Rajnoha [Thu, 4 Aug 2016 11:50:45 +0000 (13:50 +0200)]
libdm: report: add dm_report_group_output_and_pop_all

The dm_report_group_output_and_pop_all calls dm_report_output and
dm_report_group_pop for all the items that are currently in report
group. This is just a shortcut that makes it easier to output and
pop group's content so the group handle can be reused again without
a need to initialize and configure it again.

The functionality of dm_report_group_output_and_pop_all is the
same as dm_report_destroy but without destroying the report group
handle.

8 years agolibdm: report: postpone printing of JSON starting '{' character till it's needed
Peter Rajnoha [Thu, 4 Aug 2016 09:05:20 +0000 (11:05 +0200)]
libdm: report: postpone printing of JSON starting '{' character till it's needed

This patch moves printing of starting '{' character for JSON output up
untili it's known there's any further output following - either the
content or ending '}' character.

Also, remove unnecessary switch for different report group types and
calling individual functions to handle dm_report_group_create as that
code is shared for all existing types at the moment.

8 years agolibdm: report: add dm_report_destroy_rows
Peter Rajnoha [Thu, 4 Aug 2016 07:42:33 +0000 (09:42 +0200)]
libdm: report: add dm_report_destroy_rows

Calling dm_report_destroy_rows makes it possible to destroy any report
content we have but at the same time it doesn't destroy the report
handle itself, thus it's possible to reuse that handle again for new
report content.

Functionally, this is the same as calling dm_report_output with the
report handle but omitting the output iself. This functionality may
be useful if we, for whatever reason, need to discard the report
content and start a fresh new one but with the same report configuration
and initialization and thus we can just reuse the existing handle.

8 years agolvmcmdline: return 0/NULL if cmd->arg_values not set and arg_count/grouped_arg_count...
Peter Rajnoha [Thu, 4 Aug 2016 07:32:05 +0000 (09:32 +0200)]
lvmcmdline: return 0/NULL if cmd->arg_values not set and arg_count/grouped_arg_count/arg_value called

We may call arg_count/grouped_arg_count/arg_value soon enough that
cmd->arg_values is not set yet.

Normally, when running a command, we execute lvm_run_command which in
turn calls _process_command_line to allocate and parse the command line
values and stores them in cmd->arg_values.

However, if we run lvm shell, this one doesn't accept any command line
options and we parse the command line for each command that is executed
within the lvm shell then. If we used any code that tries to access
cmd->arg_values through any of the the arg handling functions too
early, we could end up with a segfault due to uninitialized (NULL)
cmd->arg_values.

This patch just saves extra checks in all the code where arg handling
may be called too early so that the cmd->arg_values is not set up yet.
This does not apply to any of existing code, but subsequent patches
will need that.

8 years agorefactor: move report grouping and log reporting handles from processing_handle to...
Peter Rajnoha [Wed, 3 Aug 2016 13:37:14 +0000 (15:37 +0200)]
refactor: move report grouping and log reporting handles from processing_handle to cmd_context

With patches that will follow, this will make it possible to widen log
report coverage when commands are executed from lvm shell so the amount
of messages that may end up in stderr/stdout instead of log report are
minimized.

8 years agoshell: also collect last command's return code for subsequent 'lastlog' invocation
Peter Rajnoha [Mon, 25 Jul 2016 10:20:22 +0000 (12:20 +0200)]
shell: also collect last command's return code for subsequent 'lastlog' invocation

Add new log_context=shell and with log_object_type=cmd and
log_object_name=<command_name> for command log report to collect
overall return code from last command (this is reported under
log_type=status).

8 years agolog: separate output and make it possible to use given FDs
Peter Rajnoha [Fri, 8 Jul 2016 14:47:51 +0000 (16:47 +0200)]
log: separate output and make it possible to use given FDs

Currently, the output is separated in 3 parts and each part can go into
a separate and user-defined file descriptor:

  - common output (stdout by default, customizable by LVM_OUT_FD environment variable)
  - error output (stderr by default, customizable by LVM_ERR_FD environment variable)
  - report output (stdout by default, customizable by LVM_REPORT_FD environment variable)

For example, each type of output goes to different output file:

  [0] fedora/~ # export LVM_REPORT_FD=3

  [0] fedora/~ # lvs fedora vg/abc 1>out 2>err 3>report

  [0] fedora/~ # cat out

  [0] fedora/~ # cat err
    Volume group "vg" not found
    Cannot process volume group vg

  [0] fedora/~ # cat report
    LV   VG     Attr       LSize   Layout     Role       CTime
    root fedora -wi-ao----  19.00g linear     public     Wed May 27 2015 08:09:21
    swap fedora -wi-ao---- 500.00m linear     public     Wed May 27 2015 08:09:21

Another example in LVM shell where the report goes to "report" file:

  [0] fedora/~ # export LVM_REPORT_FD=3
  [0] fedora/~ # lvm 3>report

  (in lvm shell)
  lvm> vgs

  (content of "report" file)
  [1] fedora/~ # cat report
    VG     #PV #LV #SN Attr   VSize  VFree
    fedora   1   2   0 wz--n- 19.49g    0

  (in lvm shell)
  lvm> lvs

  (content of "report" file)
  [1] fedora/~ # cat report
    VG     #PV #LV #SN Attr   VSize  VFree
    fedora   1   2   0 wz--n- 19.49g    0
    LV   VG     Attr       LSize   Layout     Role       CTime
    root fedora -wi-ao----  19.00g linear     public     Wed May 27 2015 08:09:21
    swap fedora -wi-ao---- 500.00m linear     public     Wed May 27 2015 08:09:21

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