]> sourceware.org Git - lvm2.git/log
lvm2.git
8 years agodevice: Retry open without O_NOATIME if it fails.
Alasdair G Kergon [Thu, 12 May 2016 00:05:52 +0000 (01:05 +0100)]
device:  Retry open without O_NOATIME if it fails.

8 years agotest: process-each-duplicate-pvs
David Teigland [Wed, 11 May 2016 14:35:07 +0000 (09:35 -0500)]
test: process-each-duplicate-pvs

skip on RHEL5 where DEV_USED_FOR_LV doesn't work
because it depends on a newer bit of sysfs.

8 years agorefactor: separate original _report fn into _report and _do_report fn
Peter Rajnoha [Tue, 10 May 2016 11:57:23 +0000 (13:57 +0200)]
refactor: separate original _report fn into _report and _do_report fn

The _report fn is getting big - separate it in two:

  - _report fn to get all the options and arguments
  - _do_report fn for reporting itself

Also, place all the variables/arguments in one structure for easier
handling of the variables around.

8 years agopost-release
Alasdair G Kergon [Fri, 6 May 2016 23:48:40 +0000 (00:48 +0100)]
post-release

8 years agopre-release v2_02_153
Alasdair G Kergon [Fri, 6 May 2016 23:36:59 +0000 (00:36 +0100)]
pre-release

8 years agoactivation: activation check is mandatory
Zdenek Kabelac [Fri, 6 May 2016 11:59:50 +0000 (13:59 +0200)]
activation: activation check is mandatory

Make missing activation() check before calling target_persent
an INTERNAL_ERROR.

8 years agocleanup: drop tracing
Zdenek Kabelac [Fri, 6 May 2016 11:59:13 +0000 (13:59 +0200)]
cleanup: drop tracing

When activation is disabled, avoid tracing it in cache target.

8 years agosegtype: check for activation2
Zdenek Kabelac [Fri, 6 May 2016 11:57:36 +0000 (13:57 +0200)]
segtype: check for activation2

Previous patch 8857b227645e97b7cb52ae8d007e87e07db58b4e missed
to check for activation for raid target.

8 years agoWHATS_NEW: duplicate PVs
David Teigland [Fri, 6 May 2016 14:30:01 +0000 (09:30 -0500)]
WHATS_NEW: duplicate PVs

8 years agometadata: move warning message about repairing VG
David Teigland [Thu, 5 May 2016 17:47:29 +0000 (12:47 -0500)]
metadata: move warning message about repairing VG

Move the message to just before the repair is going
to happen to avoid printing the message in cases
where repair is skipped.

8 years agotest: vgcfgbackup-lvm1
David Teigland [Tue, 26 Apr 2016 17:21:49 +0000 (12:21 -0500)]
test: vgcfgbackup-lvm1

The lvm1 part of vgcfgbackup-usage.

8 years agotest: vgcfgbackup-usage
David Teigland [Tue, 26 Apr 2016 17:20:09 +0000 (12:20 -0500)]
test: vgcfgbackup-usage

Split the lvm1 part into a separate test.

8 years agotest: vgsplit-usage
David Teigland [Mon, 25 Apr 2016 19:22:42 +0000 (14:22 -0500)]
test: vgsplit-usage

Restart clvmd between testing each mdatype to
avoid a problem with dev state being kept from
one test to the next.

8 years agotest: lvmetad-ambiguous
David Teigland [Fri, 22 Apr 2016 21:11:01 +0000 (16:11 -0500)]
test: lvmetad-ambiguous

update for duplicate changes

8 years agotest: pv-duplicate-uuid
David Teigland [Thu, 21 Apr 2016 20:53:15 +0000 (15:53 -0500)]
test: pv-duplicate-uuid

update for duplicate changes

8 years agotest: process-each-duplicate-pvs
David Teigland [Wed, 20 Apr 2016 21:45:53 +0000 (16:45 -0500)]
test: process-each-duplicate-pvs

Update for new duplicate processing.

8 years agolvmetad: add duplicate resolution advice
David Teigland [Tue, 3 May 2016 20:56:34 +0000 (15:56 -0500)]
lvmetad: add duplicate resolution advice

8 years agolvmetad: disable if device scan fails
David Teigland [Fri, 15 Apr 2016 19:19:46 +0000 (14:19 -0500)]
lvmetad: disable if device scan fails

If a command begins repopulating the lvmetad cache,
and fails part way through, it should set the disabled
state in lvmetad so other commands don't use bad data.
If a subsequent scan succeeds, the disabled state is
cleared.

8 years agolvmcache: use active LVs and device sizes to choose between duplicates
David Teigland [Tue, 29 Mar 2016 18:29:39 +0000 (13:29 -0500)]
lvmcache: use active LVs and device sizes to choose between duplicates

If duplicate devices exist for a PV, and one device's
size matches the PV size, but the other doesn't, then
prefer the matching device.

If one device is used by an active LV, prefer that device.

8 years agopvs: new attr and field for unchosen duplicate device
David Teigland [Fri, 29 Apr 2016 19:42:14 +0000 (14:42 -0500)]
pvs: new attr and field for unchosen duplicate device

When there are duplicate devices for a PV, one device
is preferred and chosen to exist in the VG.  The other
devices are not used by lvm, but are displayed by pvs
with a new PV attr "d", indicating that they are
unchosen duplicate PVs.

The "duplicate" reporting field is set to "duplicate"
when the PV is an unchosen duplicate, and that field
is blank for the chosen PV.

8 years agolvmcache: process duplicate PVs directly
David Teigland [Thu, 11 Feb 2016 18:37:36 +0000 (12:37 -0600)]
lvmcache: process duplicate PVs directly

Previously, duplicate PVs were processed as a side effect
of processing the "chosen" PV in lvmcache.  The duplicate
PV would be hacked into lvmcache temporarily in place of
the chosen PV.

In the old way, we had to always process the "chosen" PV
device, even if a duplicate of it was named on the command
line.  This meant we were processing a different device than
was asked for.  This could be worked around by naming
multiple duplicate devs on the command line in which case
they were swapped in and out of lvmcache for processing.

Now, the duplicate devs are processed directly in their
own processing loop.  This means we can remove the old
hacks related to processing dups as a side effect of
processing the chosen device.  We can now simply process
the device that was named on the command line.

When the same PVID exists on two or more devices, one device
is preferred and used in the VG, and the others are duplicates
and are not used in the VG.  The preferred device exists in
lvmcache as usual.  The duplicates exist in a specical list
of unused duplicate devices.

The duplicate devs have the "d" attribute and the "duplicate"
reporting field displays "duplicate" for them.

'pvs' warns about duplicates, but the formal output only
includes the single preferred PV.

'pvs -a' has the same warnings, and the duplicate devs are
included in the output.

'pvs <path>' has the same warnings, and displays the named
device, whether it is preferred or a duplicate.

8 years agolvmcache: improve duplicate PV handling
David Teigland [Tue, 9 Feb 2016 19:06:27 +0000 (13:06 -0600)]
lvmcache: improve duplicate PV handling

Wait to compare and choose alternate duplicate devices until
after all devices are scanned.  During scanning, the first
duplicate dev is kept in lvmcache, and others are kept in a
new list (_found_duplicate_devs).

After all devices are scanned, compare all the duplicates
available for a given PVID and decide which is best.

If the dev used in lvmcache is changed, drop the old dev
from lvmcache entirely and rescan the replacement dev.
Previously the VG metadata from the old dev was kept in
lvmcache and only the dev was replaced.

A new config setting devices/allow_changes_with_duplicate_pvs
can be set to 0 which disallows modifying a VG or activating
LVs in it when the VG contains PVs with duplicate devices.
Set to 1 is the old behavior which allowed the VG to be
changed.

The logic for which of two devs is preferred has changed.
The primary goal is to choose a device that is currently
in use if the other isn't, e.g. by an active LV.

. prefer dev with fs mounted if the other doesn't, else
. prefer dev that is dm if the other isn't, else
. prefer dev in subsystem if the other isn't

If neither device is preferred by these rules, then don't
change devices in lvmcache, leaving the one that was found
first.

The previous logic for preferring a device was:

. prefer dev in subsystem if the other isn't, else
. prefer dev without holders if the other has holders, else
. prefer dev that is dm if the other isn't

8 years agolvmetad: remove client side altdev code
David Teigland [Fri, 29 Jan 2016 21:36:55 +0000 (15:36 -0600)]
lvmetad: remove client side altdev code

This is no longer used since lvmetad no longer
keeps track of alternate devices for duplicate PVs,
but is simply disabled when duplicates appear.

8 years agolvmetad: set disabled flag when duplicate PVs are seen
David Teigland [Fri, 29 Jan 2016 19:31:54 +0000 (13:31 -0600)]
lvmetad: set disabled flag when duplicate PVs are seen

When duplicate PVs are detected, set the disabled
flag so that commands will disable use of lvmetad.

This duplicate detection is done by lvmetad itself
when it's told about a single new PV with a PVID
that matches an existing PV on another device.
(This is different from the case where the command
is scanning all devices and detects the duplicate.)

Remove the "altdev" logic that attempted to keep
track of multiple devices for a single PV.  It
is no longer used since lvmetad is disabled in
this case.

8 years agolvmetad: set disabled flag in lvmetad if duplicate PVs are found
David Teigland [Fri, 29 Jan 2016 18:25:20 +0000 (12:25 -0600)]
lvmetad: set disabled flag in lvmetad if duplicate PVs are found

When devices are being scanned, if duplicate PVs are seen,
tell lvmetad to set its disabled flag because of duplicate PVs.

8 years agopvscan: fix errors for single dev scan while lvmetad is disabled
David Teigland [Wed, 27 Apr 2016 20:06:43 +0000 (15:06 -0500)]
pvscan: fix errors for single dev scan while lvmetad is disabled

While lvmetad was disabled, 'pvscan --cache dev' would produce
confusing error messages.

8 years agotests: do not use EPOCH for get wrapper
Zdenek Kabelac [Tue, 3 May 2016 19:22:34 +0000 (21:22 +0200)]
tests: do not use EPOCH for get wrapper

Avoid poluting filesystem with debug.log_DEBUG for get wrapper

8 years agotests: update aux raid support
Zdenek Kabelac [Thu, 5 May 2016 19:00:42 +0000 (21:00 +0200)]
tests: update aux raid support

For raid1  use chunksize as bitmap-chunk specification.
Always enforce usage of bitmap - getting comparable outcome
as lvm2 raid support uses.
Add udev_wait after stopping  md array - as in fact leg-device
are still in use by target even command has finished.

(mdadm --stop causes WATCH rule wakeup, and
ioctl(STOP_ARRAY) returns IMHO to early - it should finish
and fsync work on leg devices first).

8 years agotests: check default policy is used when unspecified
Zdenek Kabelac [Thu, 5 May 2016 19:35:19 +0000 (21:35 +0200)]
tests: check default policy is used when unspecified

If the policy is not given with policy settings we assume
the default one is going to be used - it's users responsibility
to pair them properly.

8 years agotests: check for thin tools
Zdenek Kabelac [Thu, 5 May 2016 21:14:38 +0000 (23:14 +0200)]
tests: check for thin tools

Test needs repair utils to be available.

8 years agocleanup: use unsigned with EPOCH printf format
Zdenek Kabelac [Tue, 3 May 2016 19:24:12 +0000 (21:24 +0200)]
cleanup: use unsigned with EPOCH printf format

8 years agocleanup: enhance warning message
Zdenek Kabelac [Thu, 5 May 2016 19:13:41 +0000 (21:13 +0200)]
cleanup: enhance warning message

Add WARNING: for log_warn.
Show device name which is marked missing.

8 years agocleanup: just switch error path
Zdenek Kabelac [Thu, 5 May 2016 21:12:30 +0000 (23:12 +0200)]
cleanup: just switch error path

Check for error case in if() like we normally do.
Let code continue on success.

8 years agolvcreate: improve --chunksize support for cached volume.
Zdenek Kabelac [Thu, 5 May 2016 19:34:21 +0000 (21:34 +0200)]
lvcreate: improve --chunksize support for cached volume.

Support parsing --chunksize option also when converting.
Now user can use cache pool created with i.e. 32K chunksize,
while in caching user can select 512K blocks.
Tool is supposed to validate cache metadata size is big enough
to support such chunk size. Otherwise error is shown.

8 years agolvcreate: check for lv type and created segtype
Zdenek Kabelac [Wed, 27 Apr 2016 13:02:54 +0000 (15:02 +0200)]
lvcreate: check for lv type and created segtype

When creating LV - in some case we change created segment type
(ATM for cache and snapshot) and we then manipulate with
lv segment according to 'lp' segtype.
Fix this by checking for proper type before accessing segment members.

This makes command like:

lvcreate --type cache-pool -L10 vg/cpool
lvcreate -H -L10 --cachesettings migtation_threshold=10000  vg/cpool

to pass since now tool correctly selects default cache policy.

8 years agodebug: enhance debug msg for cache
Zdenek Kabelac [Wed, 27 Apr 2016 10:55:52 +0000 (12:55 +0200)]
debug: enhance debug msg for cache

8 years agocache: use target_present_version
Zdenek Kabelac [Wed, 27 Apr 2016 09:13:36 +0000 (11:13 +0200)]
cache: use target_present_version

Using new function.
Also add trace for error path.

8 years agocleanup: gather version info with single check
Zdenek Kabelac [Wed, 27 Apr 2016 09:11:58 +0000 (11:11 +0200)]
cleanup: gather version info with single check

As we already collect version info anyway, allow to use it through
a single call (can makes logs shorter and saves ioctl).

8 years agocache: add cache_set_params function
Zdenek Kabelac [Thu, 5 May 2016 19:30:15 +0000 (21:30 +0200)]
cache: add cache_set_params function

Wrapping function to handle setup of various cache related params.
Reusable with lvcreate & lvconvert.

8 years agocache: add validate_lv_cache_chunk_size
Zdenek Kabelac [Tue, 3 May 2016 19:50:04 +0000 (21:50 +0200)]
cache: add validate_lv_cache_chunk_size

8 years agocache: function for min metadata size estimation
Zdenek Kabelac [Thu, 28 Apr 2016 16:08:36 +0000 (18:08 +0200)]
cache: function for min metadata size estimation

Move min code into reusable function.

8 years agopvcreate: improve debug message
David Teigland [Wed, 4 May 2016 17:11:13 +0000 (12:11 -0500)]
pvcreate: improve debug message

state what the printed UUID is.

8 years agopvcreate, pvremove: translate arg name to device once
David Teigland [Wed, 4 May 2016 16:28:28 +0000 (11:28 -0500)]
pvcreate, pvremove: translate arg name to device once

Rather than doing repeated translations from name to
device when comparing args to existing PVs, do one
translation of the arg names and saving the device,
before checking existing PVs.

8 years agopost-release
Alasdair G Kergon [Sat, 30 Apr 2016 00:12:33 +0000 (01:12 +0100)]
post-release

8 years agopre-release v2_02_152
Alasdair G Kergon [Sat, 30 Apr 2016 00:07:26 +0000 (01:07 +0100)]
pre-release

8 years agoraid: Use inherited tags when wiping rmeta.
Alasdair G Kergon [Fri, 29 Apr 2016 18:49:21 +0000 (19:49 +0100)]
raid: Use inherited tags when wiping rmeta.

If there's an activation volume_filter, it might not be possible
to activate the rmeta LVs to wipe them.  At least inherit any
LV tags from the parent LV while attempting this.

8 years agodatastruct: Add str_list_wipe.
Alasdair G Kergon [Fri, 29 Apr 2016 18:47:15 +0000 (19:47 +0100)]
datastruct: Add str_list_wipe.

8 years agolibdm: Add dm_udev_wait_immediate.
Alasdair G Kergon [Wed, 27 Apr 2016 23:54:27 +0000 (00:54 +0100)]
libdm: Add dm_udev_wait_immediate.

dm_udev_wait() waits inside the library.
dm_udev_wait_immediate allows the caller to do other things if the
cookie isn't yet ready to be decremented.

8 years agopvscan: autoactivation should ignore some VGs
David Teigland [Wed, 27 Apr 2016 20:33:23 +0000 (15:33 -0500)]
pvscan: autoactivation should ignore some VGs

pvscan autoactivation has its own VG processing implementation,
so it can't properly handle things like foreign or shared VGs,
so make it ignore those VG types (or errors from them) as best
as possible.

Add a FIXME stating that pvscan autoactivation must really be
moved to the standard VG processing by calling process_each_vg
to do activation once the scanning / cache update is finished.

8 years agolvmetad: improve warning after lvmetad message fails
David Teigland [Wed, 27 Apr 2016 19:49:27 +0000 (14:49 -0500)]
lvmetad: improve warning after lvmetad message fails

Make it more consistent with the other similar warning.

8 years agometadata: fix segfault when filters reject devices
David Teigland [Wed, 27 Apr 2016 17:13:26 +0000 (12:13 -0500)]
metadata: fix segfault when filters reject devices

Checking for devices uses is_missing_pv() to check
if there is a device for the PV.  is_missing_pv()
is based on the MISSING_PV flag, which does not
always correspond to !pv->dev.  When using lvmetad,
a command like:

pvs --config 'devices/filter=["a|/dev/sdb|", "r|.*|"]'

will cause a number of PVs to have NULL pv->dev, but
not the MISSING_PV flag.  So, NULL pv->dev needs to
also be checked.

8 years agocache: better support for alias check
Zdenek Kabelac [Tue, 26 Apr 2016 22:19:04 +0000 (00:19 +0200)]
cache: better support for alias check

To still support disabling of policies for test we need
better logic for alias detection introduced in
588455d03ea40ffa37f466023691b0ec2bdf5e82.

8 years agocleanup: use log_debug_activation
Zdenek Kabelac [Tue, 26 Apr 2016 22:01:08 +0000 (00:01 +0200)]
cleanup: use log_debug_activation

8 years agocleanup: smaller timeout
Zdenek Kabelac [Tue, 26 Apr 2016 21:59:20 +0000 (23:59 +0200)]
cleanup: smaller timeout

1s -> 0.5s
Also indent fix.

8 years agoman: lvcreate doc passthrough
Zdenek Kabelac [Mon, 25 Apr 2016 11:38:24 +0000 (13:38 +0200)]
man: lvcreate doc passthrough

Add few more words about passthough mode.

8 years agoman: lvchange updates
Zdenek Kabelac [Sun, 24 Apr 2016 09:40:59 +0000 (11:40 +0200)]
man: lvchange updates

Drop never existing --degrade.

8 years agolvchange: use better arg functions
Zdenek Kabelac [Tue, 26 Apr 2016 20:04:19 +0000 (22:04 +0200)]
lvchange: use better arg functions

8 years agolvchange: always check for sigint
Zdenek Kabelac [Mon, 25 Apr 2016 11:44:42 +0000 (13:44 +0200)]
lvchange: always check for sigint

Check sigint() state during process_each_lv.

8 years agolvchange: fix return code
Zdenek Kabelac [Mon, 25 Apr 2016 11:40:26 +0000 (13:40 +0200)]
lvchange: fix return code

We already opened VG for this - so not an invalid cmdline.

8 years agothin: zero and transaction_id also with thin volumes
Zdenek Kabelac [Sat, 23 Apr 2016 19:08:46 +0000 (21:08 +0200)]
thin: zero and transaction_id also with thin volumes

Show trasaction_id when thin volume was created.
Also show zeroing state of thin-pool with thin volume (so user
doesn't need to lookup thin-pool).

8 years agocache: check for clean cache as separete function
Zdenek Kabelac [Tue, 26 Apr 2016 19:45:48 +0000 (21:45 +0200)]
cache: check for clean cache as separete function

8 years agocache: with cache target 1.9 mq is alias to smq
Zdenek Kabelac [Tue, 26 Apr 2016 19:43:41 +0000 (21:43 +0200)]
cache: with cache target 1.9 mq is alias to smq

Avoid useless check for mq policy, it's loaded as smq
and aliased.

8 years agomodprobe: check /sys/module entry first
Zdenek Kabelac [Tue, 26 Apr 2016 19:41:04 +0000 (21:41 +0200)]
modprobe: check /sys/module entry first

Before executing modprobe for given module name, just check
if the module is not already present in /sys/module.

Useful when checking dm-cache-policy modules as we do not
having matching interface like for targets.

8 years agoudev: rules: add comments explaining subsystem-specific rules
Peter Rajnoha [Tue, 26 Apr 2016 10:51:06 +0000 (12:51 +0200)]
udev: rules: add comments explaining subsystem-specific rules

8 years agoudev: rules: remove mpath from 10-dm.rules, superseded by 11-dm-mpath.rules (mpath...
Peter Rajnoha [Mon, 25 Apr 2016 12:48:46 +0000 (14:48 +0200)]
udev: rules: remove mpath from 10-dm.rules, superseded by 11-dm-mpath.rules (mpath>=0.6.0)

Multipath 0.6.0 contains new 11-dm-mpath.rules which supersede the rule
that was in 10-dm.rules. The 11-dm-mpath.rules are also more complete,
fixing several other issues. Using the new 11-dm-mpath.rules from
multipath-tools >= 0.6.0 is strongly recommended for proper
DM multipath functionality!

See also:
  http://christophe.varoqui.free.fr
  http://git.opensvc.com/gitweb.cgi?p=multipath-tools/.git;a=blob;f=multipath/11-dm-mpath.rules

8 years agocleanup: do not mention segment in warning message if device not found for a PV when...
Peter Rajnoha [Mon, 25 Apr 2016 09:41:36 +0000 (11:41 +0200)]
cleanup: do not mention segment in warning message if device not found for a PV when checking used/assumed devs for an LV

[0] fedora/~ # pvs --config 'devices/filter=["a|/dev/sda|", "r|.*|"]'
  WARNING: Device for PV Qcxpcy-XgtP-UD3s-PmG0-qLyE-Z0ho-DYsxoz not found or rejected by a filter.
  WARNING: Device for PV Qcxpcy-XgtP-UD3s-PmG0-qLyE-Z0ho-DYsxoz not found or rejected by a filter.
  WARNING: Couldn't find device for segment belonging to fedora/root while checking used and assumed devices.
  WARNING: Couldn't find device for segment belonging to fedora/swap while checking used and assumed devices.
  PV         VG     Fmt  Attr PSize   PFree
  /dev/sda          lvm2 ---  128.00m 128.00m
  [unknown]  fedora lvm2 a-m   19.49g      0

Probably not worth mentioning "segments" here, just state that devices
for an LV can't be all found during the check - it's less mysterious for
user then:

[0] fedora/~ # pvs --config 'devices/filter=["a|/dev/sda|", "r|.*|"]'
  WARNING: Device for PV Qcxpcy-XgtP-UD3s-PmG0-qLyE-Z0ho-DYsxoz not found or rejected by a filter.
  WARNING: Device for PV Qcxpcy-XgtP-UD3s-PmG0-qLyE-Z0ho-DYsxoz not found or rejected by a filter.
  WARNING: Couldn't find all devices for LV fedora/root while checking used and assumed devices.
  WARNING: Couldn't find all devices for LV fedora/swap while checking used and assumed devices.
  PV         VG     Fmt  Attr PSize   PFree
  /dev/sda          lvm2 ---  128.00m 128.00m
  [unknown]  fedora lvm2 a-m   19.49g      0

8 years agometadata: log warning instead of error if device not found while checking used and...
Peter Rajnoha [Mon, 25 Apr 2016 09:15:44 +0000 (11:15 +0200)]
metadata: log warning instead of error if device not found while checking used and assumed devs

When checking assumed PVs against real devices used for LVs and if
there's no device assigned for an assumed PV (e.g. due to filters),
do log_warn instead of log_error and continue checking LV segments
and associated assumed PVs further, just like we do log_warn elsewhere
in this situation.

This way user will see the warning for each LV which couldn't be
checked completely against real PVs used. Before, we logged only
the very first occurence of missing device for an LV in a VG and we
returned from the function doing this check for all the LVs in VG
immediately which may be a bit misleading because it didn't tell
user about all the other LVs and whether they could be checked
or not.

For example, we have this setup:

[0] fedora/~ # pvs
  PV         VG     Fmt  Attr PSize   PFree
  /dev/sda          lvm2 ---  128.00m 128.00m
  /dev/vda2  fedora lvm2 a--   19.49g      0

[0] fedora/~ # lvs -o+devices
  LV   VG     Attr       LSize   Devices
  root fedora -wi-ao----  19.00g /dev/vda2(0)
  swap fedora -wi-ao---- 500.00m /dev/vda2(4864)

Before this patch (only the very first LV in a VG is logged to have a
problem while checking used and assumed devices):

[0] fedora/~ # pvs --config 'devices/filter=["a|/dev/sda|", "r|.*|"]'
  WARNING: Device for PV Qcxpcy-XgtP-UD3s-PmG0-qLyE-Z0ho-DYsxoz not found or rejected by a filter.
  WARNING: Device for PV Qcxpcy-XgtP-UD3s-PmG0-qLyE-Z0ho-DYsxoz not found or rejected by a filter.
  Couldn't find device for segment belonging to fedora/root while checking used and assumed devices.
  PV         VG     Fmt  Attr PSize   PFree
  /dev/sda          lvm2 ---  128.00m 128.00m
  [unknown]  fedora lvm2 a-m   19.49g      0

With this patch applied (all LVs where we hit problem while checking
used and assumed devices are logged and it's warning, not error):

[0] fedora/~ # pvs --config 'devices/filter=["a|/dev/sda|", "r|.*|"]'
  WARNING: Device for PV Qcxpcy-XgtP-UD3s-PmG0-qLyE-Z0ho-DYsxoz not found or rejected by a filter.
  WARNING: Device for PV Qcxpcy-XgtP-UD3s-PmG0-qLyE-Z0ho-DYsxoz not found or rejected by a filter.
  WARNING: Couldn't find device for segment belonging to fedora/root while checking used and assumed devices.
  WARNING: Couldn't find device for segment belonging to fedora/swap while checking used and assumed devices.
  PV         VG     Fmt  Attr PSize   PFree
  /dev/sda          lvm2 ---  128.00m 128.00m
  [unknown]  fedora lvm2 a-m   19.49g      0

8 years agopost-release
Alasdair G Kergon [Fri, 22 Apr 2016 23:43:13 +0000 (00:43 +0100)]
post-release

8 years agopre-release v2_02_151
Alasdair G Kergon [Fri, 22 Apr 2016 23:33:59 +0000 (00:33 +0100)]
pre-release

8 years agotests: drop cluster testing with pvmove
Zdenek Kabelac [Fri, 22 Apr 2016 12:08:31 +0000 (14:08 +0200)]
tests: drop cluster testing with pvmove

Unwanteadly enabled in previous check-in.

8 years agocoverity: check for sys error in clock call
Zdenek Kabelac [Fri, 22 Apr 2016 12:06:58 +0000 (14:06 +0200)]
coverity: check for sys error in clock call

8 years agocoverity: ignore some dm_strncpy results
Zdenek Kabelac [Fri, 22 Apr 2016 12:06:15 +0000 (14:06 +0200)]
coverity: ignore some dm_strncpy results

Using them only for debug so ignorable.
Also don't mark stack char buffer alignment, compiler already knows
what's the best here.

8 years agocoverity: keep expression using 64bit
Zdenek Kabelac [Fri, 22 Apr 2016 12:05:03 +0000 (14:05 +0200)]
coverity: keep expression using 64bit

Use 64bit input to remain with whole evaluation in 64bit.

8 years agocoverity: is_used_pv needs valid pv pointer
Zdenek Kabelac [Thu, 21 Apr 2016 18:23:13 +0000 (20:23 +0200)]
coverity: is_used_pv needs valid pv pointer

8 years agotests: make test independent on usage [] for hidden LVs
Zdenek Kabelac [Fri, 22 Apr 2016 10:51:54 +0000 (12:51 +0200)]
tests: make test independent on usage [] for hidden LVs

8 years agocache: fix previous change and correct ()
Zdenek Kabelac [Fri, 22 Apr 2016 10:31:02 +0000 (12:31 +0200)]
cache: fix previous change and correct ()

412f09ca332c644e08421e289a3e8d54890971ba missed parentheses.

8 years agolibdm-stats: check for empty region and area lists
Bryn M. Reeves [Fri, 22 Apr 2016 09:35:07 +0000 (10:35 +0100)]
libdm-stats: check for empty region and area lists

Check that @stats_list and @stats_print returned data in the
_stats_parse_list() and _stats_parse_region() functions before
attempting to operate on region and area values.

This avoids a coverity warning since fgets() could potentially
return no data from the memory buffer returned by the ioctl.

In both cases the ioctl would return an error, preventing these
functions from running, however it is cleaner to test for the
condition explicitly and fail in those cases.

8 years agotests: keep using [] for hidden volumes
Zdenek Kabelac [Thu, 21 Apr 2016 22:04:23 +0000 (00:04 +0200)]
tests: keep using [] for hidden volumes

Figure out which test needs to see hidden volumes without [].
But normally use [] for debug printing in tests.
It's confusing otherwise.

8 years agocoverity: drop abadoing object
Zdenek Kabelac [Thu, 21 Apr 2016 18:55:23 +0000 (20:55 +0200)]
coverity: drop abadoing object

As mempool is destroyed on by caller don't bother for
mempool freeing here.

8 years agocoverity: avoid using signed types for single bits
Zdenek Kabelac [Thu, 21 Apr 2016 18:54:54 +0000 (20:54 +0200)]
coverity: avoid using signed types for single bits

8 years agocoverity: return non-null string with internal error
Zdenek Kabelac [Thu, 21 Apr 2016 18:53:22 +0000 (20:53 +0200)]
coverity: return non-null string with internal error

While we return internal error we should not let tool crash on NULL
access, so return valid string for such case.

8 years agocoverity: use wider type for whole expression
Zdenek Kabelac [Thu, 21 Apr 2016 22:14:40 +0000 (00:14 +0200)]
coverity: use wider type for whole expression

Coverity likes when the types are same through the whole expression.
And since dev_t is 64b - widen int type early.

8 years agocoverity: drop unused header file
Zdenek Kabelac [Thu, 21 Apr 2016 18:20:13 +0000 (20:20 +0200)]
coverity: drop unused header file

8 years agocoverity: fix error paths
Zdenek Kabelac [Thu, 21 Apr 2016 18:19:24 +0000 (20:19 +0200)]
coverity: fix error paths

Patch 74e704bb4465960b361711c890733cbae1f06e42 missed to update
error path. Since now we just need to 'return_0' as 'dmt is NULL
and thus may not be destroyed.

8 years agocoverity: fix memory access
Zdenek Kabelac [Thu, 21 Apr 2016 18:21:59 +0000 (20:21 +0200)]
coverity: fix memory access

Commit  52e0d0db4460d90172e9bd45b9ef30e7f4f75ae7 introduced regression
as code may access   buf[0 - 1].

Reorder code to first remove '\n' and then check buffer size for
empty.

8 years agocleanup: use kdev_t header in lvm tree
Zdenek Kabelac [Thu, 21 Apr 2016 18:52:12 +0000 (20:52 +0200)]
cleanup: use kdev_t header in lvm tree

Reuse libdm header in lvm so we have single definition
of MAJOR/MINOR/MKDEV macros in use.

8 years agocleanup: simplify code
Zdenek Kabelac [Thu, 21 Apr 2016 18:19:53 +0000 (20:19 +0200)]
cleanup: simplify code

dm_strncpy() also check the size fits.

8 years agoWHATS_NEW: disable lvmetad for lvm1
David Teigland [Thu, 21 Apr 2016 21:40:44 +0000 (16:40 -0500)]
WHATS_NEW: disable lvmetad for lvm1

8 years agoactivate: Hide errors when snapshot merge delayed.
Alasdair G Kergon [Thu, 21 Apr 2016 21:14:10 +0000 (22:14 +0100)]
activate: Hide errors when snapshot merge delayed.

8 years agopoll daemon: only call lvmetad_connect when needed
David Teigland [Thu, 21 Apr 2016 20:58:34 +0000 (15:58 -0500)]
poll daemon: only call lvmetad_connect when needed

When lvm is not using lvmetad, the lvmetad_connect()
in the forked polling process is not needed and was
generating unwanted warnings.

8 years agotests: GLIBC decided to obsolete readdir_r
Zdenek Kabelac [Thu, 21 Apr 2016 13:30:14 +0000 (15:30 +0200)]
tests: GLIBC decided to obsolete readdir_r

Keep the code compilatible without warnings on newer glibc.

8 years agolvmetad: warn about making changes while not using lvmetad
David Teigland [Thu, 21 Apr 2016 15:28:01 +0000 (10:28 -0500)]
lvmetad: warn about making changes while not using lvmetad

If lvmetad is running, and a command opts to not use it
(--config global/use_lvmetad=0), and the command changes
metadata, then the metadata change is not visible to
lvmetad.  Subsequent commands using lvmetad to change
metadata may cause corruption based on the invalid
lvmetad state.

Eventually we can set the disabled state in lvmetad
to prevent this problem, but for now print a warning
about the possibility.

8 years agolvmetad: fix compile without lvmetad
David Teigland [Thu, 21 Apr 2016 15:06:47 +0000 (10:06 -0500)]
lvmetad: fix compile without lvmetad

Last commit was missing stub function.

8 years agolvmetad: check pid for warning case
David Teigland [Thu, 21 Apr 2016 14:50:59 +0000 (09:50 -0500)]
lvmetad: check pid for warning case

When command is not using lvmetad because
use_lvmetad=0 in the config, but the lvmetad
pidfile exists, print a warning (previously
this checked for the socket existing instead
of the pidfile existing.)

8 years agolvmetad: check for socket in connect
David Teigland [Thu, 21 Apr 2016 14:27:20 +0000 (09:27 -0500)]
lvmetad: check for socket in connect

We can connect if the socket is present, even
though the pidfile may not exist, since systemd
may start the process when the socket is opened.

8 years agodisplay: Avoid internal snapshot LV names in msgs.
Alasdair G Kergon [Wed, 20 Apr 2016 23:30:17 +0000 (00:30 +0100)]
display: Avoid internal snapshot LV names in msgs.

vg/snapshotN should not appear anywhere.

No code should be showing this, but it was noticed in some logs last
week and we can deal with it in display_lvname().

8 years agolvmetad: fix compilation without lvmetad#
Zdenek Kabelac [Wed, 20 Apr 2016 22:16:17 +0000 (00:16 +0200)]
lvmetad: fix compilation without lvmetad#

8 years agotests: minor update
Zdenek Kabelac [Wed, 20 Apr 2016 21:21:03 +0000 (23:21 +0200)]
tests: minor update

8 years agotests: still show systems stas when command has not produced debug.log file
Zdenek Kabelac [Wed, 20 Apr 2016 21:19:33 +0000 (23:19 +0200)]
tests: still show systems stas when command has not produced debug.log file

When no debug.log* file is present whole stacktracking was skipped.
Add extra test the file exists to catch this case.

8 years agotests: document make parametr for tracing aux scripts
Zdenek Kabelac [Wed, 20 Apr 2016 21:18:51 +0000 (23:18 +0200)]
tests: document make parametr for tracing aux scripts

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