]> sourceware.org Git - lvm2.git/log
lvm2.git
9 years agoman: Escape single quotes in an example to avoid groff's unicode conversion.
Petr Rockai [Wed, 22 Apr 2015 15:27:43 +0000 (17:27 +0200)]
man: Escape single quotes in an example to avoid groff's unicode conversion.

9 years agomake: autoconfisms for generate
David Teigland [Wed, 22 Apr 2015 15:05:02 +0000 (10:05 -0500)]
make: autoconfisms for generate

9 years agomake: let generate use the just built libdm
David Teigland [Wed, 22 Apr 2015 14:35:50 +0000 (09:35 -0500)]
make: let generate use the just built libdm

9 years agodoc: Update dm kernel files.
Alasdair G Kergon [Wed, 22 Apr 2015 14:34:25 +0000 (15:34 +0100)]
doc: Update dm kernel files.

v4.0-9804-gdb4fd9c

9 years agotests: add missing "" around dev
Zdenek Kabelac [Wed, 22 Apr 2015 09:06:29 +0000 (11:06 +0200)]
tests: add missing "" around dev

9 years agotests: aux works better with installed_testsuite
Zdenek Kabelac [Wed, 22 Apr 2015 09:04:47 +0000 (11:04 +0200)]
tests: aux works better with installed_testsuite

When test suite is used from installed rpm package
we need to handle things better.

This patch is rather first approach - expecting few more
tweaks needed.

9 years agotests: simplify teardown
Zdenek Kabelac [Wed, 22 Apr 2015 09:03:31 +0000 (11:03 +0200)]
tests: simplify teardown

If TESTNAME has not been created yet, avoid running complex teardown.

9 years agomakefiles: avoid // in datadir usage
Zdenek Kabelac [Wed, 22 Apr 2015 08:59:03 +0000 (10:59 +0200)]
makefiles: avoid // in datadir usage

DESTDIR already comes with '/'

9 years agotests: install also api test
Zdenek Kabelac [Wed, 22 Apr 2015 08:57:42 +0000 (10:57 +0200)]
tests: install also api test

Install .t & .py binaries.
On 'make clean'  ensure also -t files are removed.

9 years agotests: drop DEBUG log after success
Zdenek Kabelac [Wed, 22 Apr 2015 08:55:37 +0000 (10:55 +0200)]
tests: drop DEBUG log after success

At this moment LVM_LOG_FILE_EPOCH with
LVM_EXPECTED_EXIT_STATUS  properly deletes debug logs
only for real commands - support for lvm2 API does not yet
exists

9 years agotests: use 800ms delay
Zdenek Kabelac [Wed, 22 Apr 2015 07:01:03 +0000 (09:01 +0200)]
tests: use 800ms delay

Worked better with pvmove-abort-all so use here as well.

9 years agotests: notify drops log always
Zdenek Kabelac [Wed, 22 Apr 2015 07:01:49 +0000 (09:01 +0200)]
tests: notify drops log always

Even on success remove debug.log here.

9 years agotests: explicitely ignore result code
Zdenek Kabelac [Tue, 21 Apr 2015 13:46:03 +0000 (15:46 +0200)]
tests: explicitely ignore result code

9 years agotests: allow to use sysfs filter
Zdenek Kabelac [Tue, 21 Apr 2015 11:27:40 +0000 (13:27 +0200)]
tests: allow to use sysfs filter

Current filtering logic in lvm2 needs some rework.
For now at least enable it in test suite.

9 years agonix: install also mdadm
Zdenek Kabelac [Wed, 22 Apr 2015 07:00:21 +0000 (09:00 +0200)]
nix: install also mdadm

Some tests are checking functinality of lvm2 with mdadm.

9 years agoconfig: thin_repair_options and cache_repair_options are undefined
David Teigland [Tue, 21 Apr 2015 21:01:15 +0000 (16:01 -0500)]
config: thin_repair_options and cache_repair_options are undefined

By default these are empty strings, so the config settings
should be flagged as undefined, so they will be commented
out of the generated config.  Otherwise, the lines:

thin_repair_options=""
cache_repair_options=""

in the dump output cause a warning when processed since
lvm doesn't want an empty string.

Also regenerate lvm.conf.in.

9 years agogenerate example.conf.in, lvmlocal.conf.in
David Teigland [Tue, 21 Apr 2015 20:04:22 +0000 (15:04 -0500)]
generate example.conf.in, lvmlocal.conf.in

These were created by 'make generate'.

9 years agoconfig: remove duplication of settings
David Teigland [Wed, 15 Apr 2015 21:15:30 +0000 (16:15 -0500)]
config: remove duplication of settings

The specific config settings have been removed
from the lvm.conf(5) man page, and replaced with
a description of how to use lvm dumpconfig to
view the settings.

The sample lvm.conf and lvmlocal.conf files are now generated:

example.conf.base  - initial ungenerated part of the file
example.conf.gen   - generated portion from dumpconfig
example.conf.in    - combination of .base and .gen files
example.conf       - result of configure processing .in file

lvmlocal.conf.base - initial ungenerated part of the file
lvmlocal.conf.gen  - generated portion from dumpconfig
lvmlocal.conf.in   - combination of .base and .gen files
lvmlocal.conf      - result of configure processing .in file

Do not edit the .in files, but edit config_settings.h
or the .base files, and then use 'make generate' to create
the new .in files.

- configure
  with options

- make
  creates tools/lvm

- make generate
  uses tools/lvm to create example.conf.in and lvmlocal.conf.in
  by combining .base files with dumpconfig output.

- configure
  with same options as above
  creates example.conf and lvmlocal.conf from .in files

9 years agodumpconfig: add --ignorelocal
David Teigland [Tue, 21 Apr 2015 19:53:54 +0000 (14:53 -0500)]
dumpconfig: add --ignorelocal

When generating a sample lvm.conf file, we don't want to
include the "local" section, which is kept in lvmlocal.conf.

9 years agotoollib: fix duplicate handling in process_each_pv
David Teigland [Mon, 20 Apr 2015 19:35:35 +0000 (14:35 -0500)]
toollib: fix duplicate handling in process_each_pv

With use_lvmetad=0, duplicate PVs /dev/loop0 and /dev/loop1,
where in this example, /dev/loop1 is the cached device
referenced by pv->dev, the command 'pvs /dev/loop0' reports:

Failed to find physical volume "/dev/loop0".

This is because the duplicate PV detection by pvid is
not working because _get_all_devices() is not setting
any dev->pvid for any entries.  This is because the
pvid information has not yet been saved in lvmcache.
This is fixed by calling _get_vgnameids_on_system()
before _get_all_devices(), which has the effect of
caching the necessary pvid information.

With this fix, running pvs /dev/loop0, or pvs /dev/loop1,
produces no error and one line of output for the PV (the
device printed is the one cached in pv->dev, in this
example /dev/loop1.)

Running 'pvs /dev/loop0 /dev/loop1' produces no error
and two lines of output, with each device displayed
on one of the lines.

Running 'pvs -a' shows two PVs, one with loop0 and one
with loop1, and both shown as a member of the same VG.

Running 'pvs' shows only one of the duplicate PVs,
and that shows the device cached in pv->dev (loop1).

The above output is what the duplicate handling code
was previously designed to output in commits:

b64da4d8b521 toollib: search for duplicate PVs only when needed
3a7c47af0e88 toollib: pvs -a should display VG name for each duplicate PV
57d74a45a05e toollib: override the PV device with duplicates
c1f246fedfc3 toollib: handle duplicate pvs in process_in_pv

As a further step after this, we may choose to change
some of those.

For all of these commands, a warning is printed about
the existence of the duplicate PVs:

Found duplicate PV ...: using /dev/loop1 not /dev/loop0

9 years agotests: update to renamed envvars
Zdenek Kabelac [Mon, 20 Apr 2015 17:16:33 +0000 (19:16 +0200)]
tests: update to renamed envvars

Enhance 'not' so 'should' now shows log trace from
command which has failed but should not.

9 years agotests: add extra keyword for timing control
Zdenek Kabelac [Mon, 20 Apr 2015 17:09:02 +0000 (19:09 +0200)]
tests: add extra keyword for timing control

Control logging of timer with
"## timing off"  and "## timing on"

9 years agodebug: change envvar
Zdenek Kabelac [Mon, 20 Apr 2015 17:10:29 +0000 (19:10 +0200)]
debug: change envvar

Rename envvar LVM_LOG_FILE_UNLINK_STATUS to LVM_EXPECTED_EXIT_STATUS
and change compare sign from  '!' to  '>'.

Validate LVM_LOG_FILE_EPOCH and support strictly only
up-to 32 alpha chars. If the content doesn't pass
epoch is simply ignored.

9 years agotests: use new debug logging feature
Zdenek Kabelac [Mon, 20 Apr 2015 08:05:27 +0000 (10:05 +0200)]
tests: use new debug logging feature

Enhance 'not' to manage autodeletion of log files in right cases.
Use separately marked epoch log files for clvmd and dmeventd.
Properly manage stack tracing for new debug.log names.

9 years agodebug: use epoch for dmeventd logging
Zdenek Kabelac [Mon, 20 Apr 2015 08:04:33 +0000 (10:04 +0200)]
debug: use epoch for dmeventd logging

When LVM_LOG_FILE_EPOCH is set, route lvm command debug message
to lvm.conf log file instead of syslog.

9 years agodebug: add new envvar
Zdenek Kabelac [Mon, 20 Apr 2015 08:04:18 +0000 (10:04 +0200)]
debug: add new envvar

Add support for 2 new envvars for internal lvm2 test suite
(though it could be possible usable for other cases)

LVM_LOG_FILE_EPOCH

Whether to add 'epoch' extension that consist from
the envvar 'string' + pid + starttime in kernel units
obtained from /proc/self/stat.

LVM_LOG_FILE_UNLINK_STATUS

Whether to unlink the log depending on return status value,
so if the command is successful the log is automatically
deleted.

API is still for now experimental to catch various issue.

9 years agoWHATS_NEW: update for various commits
Ondrej Kozina [Mon, 20 Apr 2015 08:31:43 +0000 (10:31 +0200)]
WHATS_NEW: update for various commits

add info for various commits, most significant were:

- toollib: close connection to lvmetad after fork
  (fe30658a4d5fe4e4e6bb346c9c9ee7142a98f49d)

- toollib: do not spawn polling in lv_change_activate
  (c26d81d6e6939906729d91fae83cd8bbdd743bb7)

- pvmove: split pvmove_update_metadata function
  (65623b63a20a221b48dfd87455dc77f5ac0c6bf4)

- lvconvert: move poll code in before refactoring
  (5190f566055ab4584772b1288fd8cbf69565eb4a)

- pvmove: move poll code in before refactoring
  (a098aa419f5be5d8f805ab6dc747770e58a4b7b1)

9 years agodumpconfig: add --unconfigured option
David Teigland [Fri, 17 Apr 2015 16:31:16 +0000 (11:31 -0500)]
dumpconfig: add --unconfigured option

Using this option, default string values that are
configurable are printed as unconfigured values,
e.g. "@CONFDIR@" instead of "/etc".

9 years agopvmove: fix wrong error path in _update_metadata
Ondrej Kozina [Thu, 16 Apr 2015 15:46:38 +0000 (17:46 +0200)]
pvmove: fix wrong error path in _update_metadata

fix regression introduced in 65623b63a20a221b48dfd87455dc77f5ac0c6bf4

should return zero no matter the result of resume_lvs fn in error
path

9 years agoconfig: edit descriptions
David Teigland [Wed, 15 Apr 2015 19:21:20 +0000 (14:21 -0500)]
config: edit descriptions

Take some new information and wording from lvm.conf.5.

9 years agodumpconfig: add --withfullcomments option
David Teigland [Wed, 15 Apr 2015 15:56:42 +0000 (10:56 -0500)]
dumpconfig: add --withfullcomments option

--withfullcomments prints all comment lines for each config option.
--withcomments prints only the first comment line, which should be
a short one-line summary of the option.

9 years agoNIX: Also install device-mapper-persistent-data on CentOS 7 & FC 19+.
Petr Rockai [Wed, 15 Apr 2015 14:44:15 +0000 (16:44 +0200)]
NIX: Also install device-mapper-persistent-data on CentOS 7 & FC 19+.

9 years agotests: shell-fu
Zdenek Kabelac [Wed, 15 Apr 2015 13:07:49 +0000 (15:07 +0200)]
tests: shell-fu

Preserve quotes for devs and use  shell arrays to pass things around.

9 years agotests: move print of replaced vars
Zdenek Kabelac [Wed, 15 Apr 2015 12:31:28 +0000 (14:31 +0200)]
tests: move print of replaced vars

9 years agotests: align test result in batch mode
Zdenek Kabelac [Wed, 15 Apr 2015 07:49:19 +0000 (09:49 +0200)]
tests: align test result in batch mode

9 years agotests: move stamp handling
Zdenek Kabelac [Wed, 15 Apr 2015 11:11:26 +0000 (13:11 +0200)]
tests: move stamp handling

Shift stamp handling into TimedBuffer,
so it's same everywhere.

9 years agotests: hide error output
Zdenek Kabelac [Wed, 15 Apr 2015 11:10:33 +0000 (13:10 +0200)]
tests: hide error output

Hide error message if pid is already away.

9 years agotests: fix aux have test
Zdenek Kabelac [Wed, 15 Apr 2015 09:51:00 +0000 (11:51 +0200)]
tests: fix aux have test

Previous commit has made have_cache & have_thin producing
false return value.

Fix it and at the some time provide much better reconfiguring
warning message.

If the test machine is missing needed and configured binaries
it will produce TEST WARNING result.

9 years agotests: no tables for no devices
Zdenek Kabelac [Tue, 14 Apr 2015 12:56:15 +0000 (14:56 +0200)]
tests: no tables for no devices

If dm table does't contain any PREFIX device, don't bother
to call other commands

No tracing if test is skipped.

9 years agotests: preserve "" around dev
Zdenek Kabelac [Tue, 14 Apr 2015 12:15:52 +0000 (14:15 +0200)]
tests: preserve "" around dev

9 years agomakefiles: fix usage of default value
Zdenek Kabelac [Wed, 15 Apr 2015 11:08:41 +0000 (13:08 +0200)]
makefiles: fix usage of default value

When a var like LVM_TEST_THIN_CHECK_CMD is set to ""
(which is valid) we need to correctly use '-'.
Otherwise ':-' replaces such value with built-in default.

9 years agoman: fix some formatting and also mention -vv
Peter Rajnoha [Wed, 15 Apr 2015 07:19:11 +0000 (09:19 +0200)]
man: fix some formatting and also mention -vv

9 years agoconfig: edit descriptions
David Teigland [Mon, 13 Apr 2015 21:55:58 +0000 (16:55 -0500)]
config: edit descriptions

Rewording so the first line of the description
works as a single line summary of the option.

9 years agotest: Show all lvmetad messages (errors, warnings), not just debug+wire.
Petr Rockai [Sun, 12 Apr 2015 19:42:26 +0000 (21:42 +0200)]
test: Show all lvmetad messages (errors, warnings), not just debug+wire.

9 years agoNIX: Disable profiling in all but one configuration.
Petr Rockai [Tue, 7 Apr 2015 09:54:25 +0000 (11:54 +0200)]
NIX: Disable profiling in all but one configuration.

9 years agolvmetad: Issue warnings about duplicate PV UUIDs (client-side).
Petr Rockai [Tue, 31 Mar 2015 16:47:02 +0000 (18:47 +0200)]
lvmetad: Issue warnings about duplicate PV UUIDs (client-side).

9 years agolvmetad: Track alternate devices for PVs.
Petr Rockai [Tue, 31 Mar 2015 16:42:17 +0000 (18:42 +0200)]
lvmetad: Track alternate devices for PVs.

There are two reasons for this: first, this allows the client side to notice
that some PV has multiple devices associated with it and print appropriate
warnings. Second, if a duplicate device pops up and disappears, after this
change the original connection between the PV and device is not lost.

9 years agolibdaemon: Export chain_node from config-utils.c.
Petr Rockai [Tue, 31 Mar 2015 19:50:29 +0000 (21:50 +0200)]
libdaemon: Export chain_node from config-utils.c.

9 years agoWHATS_NEW: commit 375ed98
Peter Rajnoha [Tue, 14 Apr 2015 13:28:42 +0000 (15:28 +0200)]
WHATS_NEW: commit 375ed98

9 years agomake: move blkdeactivate script and blkdeactivate.8 man page installation from instal...
Peter Rajnoha [Tue, 14 Apr 2015 13:21:22 +0000 (15:21 +0200)]
make: move blkdeactivate script and blkdeactivate.8 man page installation from install_lvm2 to install_device-mapper target

This completes commit 7a4e27eee51e89a550bc55f78daea6d943293202.

9 years agoblkdeactivate: check for lvm binary and skip LVM processing if not present
Peter Rajnoha [Tue, 14 Apr 2015 11:35:11 +0000 (13:35 +0200)]
blkdeactivate: check for lvm binary and skip LVM processing if not present

This removes dependency on lvm binary - if it's not present, all LVM
processing is skipped (shouldn't normally happen because if lvm binary
is missing then there's obviously nothing that would activate it, but
let's make sure).

Without this tight dependency on lvm, the blkdeactivate script can
be packaged with libdevmapper/dmsetup (in contrast to lvm as it was
before) and as such the script can still be used to handle other DM
devices.

9 years agotests: update pvmove tests
Zdenek Kabelac [Tue, 14 Apr 2015 11:29:19 +0000 (13:29 +0200)]
tests: update pvmove tests

Put in pvmove background process into list quickly.
Update API for aux add_to_kill_list()/kill_listed_processes().
Run on 'background' (&) only non-background pvmoves.

9 years agotests: rusage skipped only for skipped
Zdenek Kabelac [Tue, 14 Apr 2015 09:15:42 +0000 (11:15 +0200)]
tests: rusage skipped only for skipped

9 years agomakefiles: check lcov file has content
Zdenek Kabelac [Tue, 14 Apr 2015 11:28:26 +0000 (13:28 +0200)]
makefiles: check lcov file has content

genhtml may get confused without content.

9 years agotests: integrate default thin/cache tool paths
Zdenek Kabelac [Tue, 14 Apr 2015 08:08:57 +0000 (10:08 +0200)]
tests: integrate default thin/cache tool paths

If the system is correctly configure (cache & thin tools are present)
avoid 'extra' rebuild of configuration.

On the other hand - if some tool is missing - duplicate ##LVMCONF should
make it more straighforward to see.

9 years agotests: stacktrace understands fullpath
Zdenek Kabelac [Tue, 14 Apr 2015 07:48:57 +0000 (09:48 +0200)]
tests: stacktrace understands fullpath

$0 as name of script could be either relative or full path.
When it's fullpath don't prepend $TESTOLDPWD.

9 years agotests: avoid dup of lvm.conf
Zdenek Kabelac [Tue, 14 Apr 2015 07:47:14 +0000 (09:47 +0200)]
tests: avoid dup of lvm.conf

When running lvmetad test - avoid duplicate create of lvm.conf
Also as lvmetad cannot be used with cluster make it as 2 code paths.

9 years agomakefiles: skip lvmetad tests
Zdenek Kabelac [Tue, 14 Apr 2015 07:45:36 +0000 (09:45 +0200)]
makefiles: skip lvmetad tests

When build without lvmetad, skip  n/udev-lvmetad flavour execution.
Update help test.

9 years agoman: lvmconf: more notes on --services option
Peter Rajnoha [Tue, 14 Apr 2015 07:49:56 +0000 (09:49 +0200)]
man: lvmconf: more notes on --services option

9 years agotests: [new] check pvmove resume works as expected
Ondrej Kozina [Fri, 3 Apr 2015 08:41:33 +0000 (10:41 +0200)]
tests: [new] check pvmove resume works as expected

various methods of resuming interrupted pvmove are tested:
- pvmove
- pvmove -b
- lvchange
- vgchange

tests for commits:
c26d81d6e6939906729d91fae83cd8bbdd743bb7
fe30658a4d5fe4e4e6bb346c9c9ee7142a98f49d

9 years agotoollib: close connection to lvmetad after fork
Ondrej Kozina [Mon, 13 Apr 2015 14:29:15 +0000 (16:29 +0200)]
toollib: close connection to lvmetad after fork

sharing connection between parent command and background
processes spawned from parent could lead to occasional failures
due to unexpected corruption in daemon responses sent to either child
or a parent.

lvmetad issued warning about duplicate config values in request.
LVM commands occasionaly failed w/ internal error after receving
corrupted response.

lvmetad connection is renewed when needed after explicit disconnect
in child

9 years agotoollib: do not spawn polling in lv_change_activate
Ondrej Kozina [Wed, 8 Apr 2015 10:05:14 +0000 (12:05 +0200)]
toollib: do not spawn polling in lv_change_activate

spawning a background polling from within the lv_change_activate
fn went to two problems:

1) vgchange should not spawn any background polling until after
   the whole activation process for a VG is finished. Otherwise
   it could lead to a duplicite request for spawning background
   polling. This statement was alredy true with one exception of
   mirror up-conversion polling (fixed by this commit).

2) due to current conditions in lv_change_activate lvchange cmd
   couldn't start background polling for pvmove LVs if such LV was
   about to get activated by the command in the same time.

This commit however doesn't alter the lvchange cmd so that it works same as
vgchange with regard to not to spawn duplicate background pollings per
unique LV.

9 years agovgchange: remove redundant check
Ondrej Kozina [Wed, 8 Apr 2015 08:30:30 +0000 (10:30 +0200)]
vgchange: remove redundant check

pvmove LVs are invisible thus already skipped due to check
lv_is_visible() at the beginning of the cycle.

9 years agoconfig: fix description syntax errors
David Teigland [Mon, 13 Apr 2015 18:48:01 +0000 (13:48 -0500)]
config: fix description syntax errors

from previous commit

9 years agoconfig: update descriptions
David Teigland [Mon, 13 Apr 2015 18:39:30 +0000 (13:39 -0500)]
config: update descriptions

- filter, preferred_names

9 years agotests: update runner
Zdenek Kabelac [Mon, 13 Apr 2015 14:31:02 +0000 (16:31 +0200)]
tests: update runner

Reenable TESTDIR  & PREFIX replacement.
Since we need to replace string in proper order (1st. @TESTDIR@,
2nd. @PREFIX@), drop map and use plain string.

Drop timestamp logging when 'stacktracing'

9 years agotests: log parallel debug.log usage as problem
Zdenek Kabelac [Mon, 13 Apr 2015 14:30:36 +0000 (16:30 +0200)]
tests: log parallel debug.log usage as problem

9 years agotests: sections in test separated
Zdenek Kabelac [Mon, 13 Apr 2015 14:30:17 +0000 (16:30 +0200)]
tests: sections in test separated

Use  <========  to separate sections.
Use ##  to prefix these outputs.
Drop $top_srcdir from sed  (it's been replacing '..')
Hide more /dev  dirs.

9 years agotests: hide unwanted output
Zdenek Kabelac [Mon, 13 Apr 2015 12:19:54 +0000 (14:19 +0200)]
tests: hide unwanted output

9 years agotests: slowdown mirroring more
Zdenek Kabelac [Mon, 13 Apr 2015 09:01:10 +0000 (11:01 +0200)]
tests: slowdown mirroring more

Since some of test machines are very slow, slowdown mirroring
even more.

9 years agocleanup: put easier tests first
Zdenek Kabelac [Mon, 13 Apr 2015 09:39:23 +0000 (11:39 +0200)]
cleanup: put easier tests first

If we could 'break' before calling strcmp() do it.
Use fputc for single char output (\n).

9 years agocleanup: typo in comment
Zdenek Kabelac [Mon, 13 Apr 2015 09:00:07 +0000 (11:00 +0200)]
cleanup: typo in comment

9 years agoWHATS_NEW: previous commit f814d7wq
Peter Rajnoha [Mon, 13 Apr 2015 13:49:25 +0000 (15:49 +0200)]
WHATS_NEW: previous commit f814d7wq

9 years agolvmconf: add --enable-halvm, --disable-halvm, --services, --mirrorservice, --startsto...
Peter Rajnoha [Mon, 13 Apr 2015 13:27:17 +0000 (15:27 +0200)]
lvmconf: add --enable-halvm, --disable-halvm, --services, --mirrorservice, --startstopservices options and use proper global/use_lvmetad default value

This patch adds new options to lvmconf:

  --enable-halvm (just like --enable-cluster, but configure LVM
                  for use in HA LVM - meaning disabling lvmetad and
                  making sure we have locking_type=1)

  --disable-halvm (just like --disable-cluster, but configure LVM
                   back from HA LVM - meaning enabling lvmetad if
                   it's enabled by default and making sure we have
                   default locking type set)

  --services (causes clvmd and lvmetad services to be enabled or
              disabled appropriately and conforming to the changes
              in lvm configuration we've just made with lvmconf)

  --mirrorservice (in addition to clvmd and lvmetad services, also
                   enable or disable cmirrord service appropriately;
                   this is a separate option because cmirrord is
                   optional and it doesn't need to be always enabled
                   when clvmd is enabled)

  --startstopservices (in addition to enabling or disabling services,
                       start and stop these services immediately)

These options are supposed to help users to make their system ready
for cluster with clvmd (active-active) or HA LVM (active-passive) use
while lvmconf script can handle services as well so users don't need
to bother about setting them manually.

Also, before this patch, we hardcoded global/use_lvmetad=0 as default
value in lvmconf script. Howeverm this default may change by just
flipping the value in config_settings.h and we may forget to edit
the lvmconf. It's better to use lvm dumpconfig --type default global/use_lvmetad
to get the actual default value and use this one instead of hardcoded one.

9 years agoalloc: Respect cling_tag_list in contig alloc.
Alasdair G Kergon [Sat, 11 Apr 2015 00:55:24 +0000 (01:55 +0100)]
alloc: Respect cling_tag_list in contig alloc.

When performing initial allocation (so there is nothing yet to
cling to), use the list of tags in allocation/cling_tag_list to
partition the PVs.  We implement this by maintaining a list of
tags that have been "used up" as we proceed and ignoring further
devices that have a tag on the list.

https://bugzilla.redhat.com/983600

9 years agoconfig: editing descriptions
David Teigland [Fri, 10 Apr 2015 21:41:54 +0000 (16:41 -0500)]
config: editing descriptions

Update wording and formatting.

9 years agoalloc: Add A_PARTITION_BY_TAGS to avoid sharing.
Alasdair G Kergon [Fri, 10 Apr 2015 20:57:52 +0000 (21:57 +0100)]
alloc: Add A_PARTITION_BY_TAGS to avoid sharing.

Add A_PARTITION_BY_TAGS set when allocated areas should not share tags
with each other and allow _match_pv_tags to accept an alternative list
of tags.  (Not used yet.)

9 years agopython: Fix ws liblvm.c
Tony Asleson [Fri, 10 Apr 2015 16:01:46 +0000 (11:01 -0500)]
python: Fix ws liblvm.c

Signed-off-by: Tony Asleson <tasleson@redhat.com>
9 years agopython: Unit test ws fixes
Tony Asleson [Tue, 7 Apr 2015 20:36:11 +0000 (15:36 -0500)]
python: Unit test ws fixes

    pep8 corrections for:
    - mixed leading ws (tabs & spaces)
    - spacing around arithmetic operators

Signed-off-by: Tony Asleson <tasleson@redhat.com>
9 years agopython: Make lv addTag/removeTag persistent
Tony Asleson [Tue, 7 Apr 2015 20:25:20 +0000 (15:25 -0500)]
python: Make lv addTag/removeTag persistent

Added lvm_vg_write in the addTag/removeTag paths to make the
changes persist.  Added unit test to ensure functionality.

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

Signed-off-by: Tony Asleson <tasleson@redhat.com>
9 years agoreport: lv_metadata_size, data_lv and metadata_lv also reports properties for cache...
Peter Rajnoha [Fri, 10 Apr 2015 12:55:28 +0000 (14:55 +0200)]
report: lv_metadata_size, data_lv and metadata_lv also reports properties for cache pools

9 years agoconfig: add note about 'vsn' macro use in config_settings.h
Peter Rajnoha [Fri, 10 Apr 2015 07:50:10 +0000 (09:50 +0200)]
config: add note about 'vsn' macro use in config_settings.h

9 years agoconfig: comments update
David Teigland [Thu, 9 Apr 2015 21:35:20 +0000 (16:35 -0500)]
config: comments update

missing \n

9 years agoconfig: update description
David Teigland [Thu, 9 Apr 2015 21:09:53 +0000 (16:09 -0500)]
config: update description

Remove examples that simply replicate the default shown.

9 years agoconfig: include full comments
David Teigland [Thu, 9 Apr 2015 20:26:21 +0000 (15:26 -0500)]
config: include full comments

Comments from the sample config files are copied into
the comment field of the config settings structure.
This includes only minimal changes to the text.

With this in place, the sample config files can
be generated from 'lvm dumpconfig', and content
for an lvm.conf man page can also be generated.

9 years agocache: Set correct vgid when changing PV header.
Alasdair G Kergon [Thu, 9 Apr 2015 20:13:55 +0000 (21:13 +0100)]
cache: Set correct vgid when changing PV header.

pv_write is called both to write orphans and to rewrite PV headers
of PVs in VGs.  It needs to select the correct VG id so that the
internal cache state gets updated correctly.

It only affected commands that involved further steps after
the pv_write and was often masked because the metadata would
be re-read off disk and correct itself.

"Incorrect metadata area header checksum" warnings appeared.

Example:
  Create vg1 containing dev1, dev2 and dev3.
  Hide dev1 and dev2 from the system.
  Fix up vg1 with vgreduce --removemissing.
  Bring back dev1 and dev2.
  In a single operation reinstate dev1 and dev2 into vg1 (vgextend).
Done as separate operations (automatically fix-up dev1 and dev2 as orphans,
then vgextend) it worked, but done all in one go the internal cache got
corrupted and warnings about checksum errors appeared.

9 years agotests: extend delay
Zdenek Kabelac [Thu, 9 Apr 2015 11:16:53 +0000 (13:16 +0200)]
tests: extend delay

400 was appeared to be good value in pvmove-abort.sh
so use also in abort-all.

9 years agotests: handle debug.log from clvmd
Zdenek Kabelac [Thu, 9 Apr 2015 11:13:36 +0000 (13:13 +0200)]
tests: handle debug.log from clvmd

When clvmd starts, it starts it's own command logging into debug.log.
This is interferring with our other command debug.log.
As as sideeffect we may experience log from command,
followed but lots of zeros and continued with clvmd log.

Fix it by renaming debug.log and now we could also print this trace
to get full list of clvmd activity nicely.

Also improve some post-mortem prints from udevadm and dmsetup to
make the output more usable.

9 years agotests: slowdown write on dev3 even more
Zdenek Kabelac [Wed, 8 Apr 2015 21:16:08 +0000 (23:16 +0200)]
tests: slowdown write on dev3 even more

9 years agotests: use single lvmconf call
Zdenek Kabelac [Wed, 8 Apr 2015 20:44:16 +0000 (22:44 +0200)]
tests: use single lvmconf call

9 years agotests: put "" around dev path
Zdenek Kabelac [Wed, 8 Apr 2015 20:43:52 +0000 (22:43 +0200)]
tests: put "" around dev path

9 years agoclvmd: singlenode signals only when lock changes
Zdenek Kabelac [Wed, 8 Apr 2015 21:12:29 +0000 (23:12 +0200)]
clvmd: singlenode signals only when lock changes

There is no benefit in waking-up all the waiters
when there is no actual change in lock state.
This avoid some unnecessarily ping-pong effects like:

 Resource V_LVMTEST15724vg retrying lock in mode:WRITE...
 Resource V_LVMTEST15724vg already locked lockid=40, mode:WRITE
 Resource V_LVMTEST15724vg retrying lock in mode:WRITE...
 Resource V_LVMTEST15724vg already locked lockid=40, mode:WRITE

9 years agoselect: mention { } use in lvm.8 man page and '-S help' properly
Peter Rajnoha [Wed, 8 Apr 2015 09:14:16 +0000 (11:14 +0200)]
select: mention { } use in lvm.8 man page and '-S help' properly

9 years agotests: check scsi_debug support opt_blks
Zdenek Kabelac [Tue, 7 Apr 2015 12:56:16 +0000 (14:56 +0200)]
tests: check scsi_debug support opt_blks

Some older kernels (i.e. lenny) do not have such options.

9 years agolvcreate: do not silently accept '-m #' with raid4/5/6
Heinz Mauelshagen [Tue, 7 Apr 2015 12:32:25 +0000 (14:32 +0200)]
lvcreate: do not silently accept '-m #' with raid4/5/6

If the user provides '-m #' (# > 0) with mappings
raid4/5/6, the command silently creates
'#mirrors * #stripes + #parity' image component pairs.

Patch rejects '-m #' altogether for those mappings
in order to avoid LV creation with unexpected layout.

- resolves bz#1209445

9 years agotests: when test fails collect more info
Zdenek Kabelac [Tue, 7 Apr 2015 11:40:15 +0000 (13:40 +0200)]
tests: when test fails collect more info

In some case it might be worth to know some more surrouding info
when command has crashed.

So collect  tables and some udev db content in this case.

9 years agotests: skip clvmd testing of mirrored LV vgsplit
Zdenek Kabelac [Fri, 3 Apr 2015 18:14:26 +0000 (20:14 +0200)]
tests: skip clvmd testing of mirrored LV vgsplit

There is something wrong when even inactive LV can't be splitted
without cmirrord being present for clustered VG.

9 years agotests: change default to 30s.
Zdenek Kabelac [Fri, 3 Apr 2015 17:35:18 +0000 (19:35 +0200)]
tests: change default to 30s.

Keep rather the default lower and avoid to pass it with every call.

9 years agotests: slow down devices in outer loop
Zdenek Kabelac [Fri, 3 Apr 2015 17:38:28 +0000 (19:38 +0200)]
tests: slow down devices in outer loop

Since now we have metadata parts running with normal speed,
we could avoid reinitilising delayed dev for every test.
(Saving seconds on cookie waits...)

9 years agopvmove: don't crash when name is not found
Zdenek Kabelac [Fri, 3 Apr 2015 15:14:50 +0000 (17:14 +0200)]
pvmove: don't crash when name is not found

If the device name is not found in our metadata,
we cannot call strdup few lines later with NULL name.

More intersting story goes behind how it happens -
pvmove removal is unfortunatelly 'multi-state' process
and at some point (for now)  we have in lvm2 metadata
LV  pvmove0 as stripe  and mirror image as error.

If such metadata are left - we fail with any further removal.

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