]> sourceware.org Git - lvm2.git/log
lvm2.git
9 years agotest: Run the testcases chdir'd into --testdir.
Petr Rockai [Thu, 26 Jun 2014 23:23:14 +0000 (01:23 +0200)]
test: Run the testcases chdir'd into --testdir.

9 years agotest: Improve IO handling in the runner.
Petr Rockai [Thu, 26 Jun 2014 23:23:02 +0000 (01:23 +0200)]
test: Improve IO handling in the runner.

9 years agotest: Improve tracking of silence (stuck testcases) in the runner.
Petr Rockai [Thu, 26 Jun 2014 23:21:20 +0000 (01:21 +0200)]
test: Improve tracking of silence (stuck testcases) in the runner.

9 years agotest: Make the runner's journal more reliable.
Petr Rockai [Thu, 26 Jun 2014 23:19:15 +0000 (01:19 +0200)]
test: Make the runner's journal more reliable.

9 years agotest: Implement flavours in the runner.
Petr Rockai [Thu, 26 Jun 2014 23:13:14 +0000 (01:13 +0200)]
test: Implement flavours in the runner.

9 years agotest: Fix handling of envvars in the runner.
Petr Rockai [Thu, 26 Jun 2014 23:03:08 +0000 (01:03 +0200)]
test: Fix handling of envvars in the runner.

9 years agotest: Makefile updates.
Petr Rockai [Thu, 26 Jun 2014 23:00:37 +0000 (01:00 +0200)]
test: Makefile updates.

- make check now uses the new test runner
- the testsuite can be installed (make -C test install)

9 years agotest: Make it possible to run tests from an installed location.
Petr Rockai [Thu, 26 Jun 2014 22:59:17 +0000 (00:59 +0200)]
test: Make it possible to run tests from an installed location.

9 years agotest: Use the new flavour setup files in lib/inittest.
Petr Rockai [Thu, 26 Jun 2014 22:58:28 +0000 (00:58 +0200)]
test: Use the new flavour setup files in lib/inittest.

9 years agotest: Fix IO sink destructors in the runner.
Petr Rockai [Thu, 26 Jun 2014 22:54:56 +0000 (00:54 +0200)]
test: Fix IO sink destructors in the runner.

9 years agotest: Add a buffer-backed IO sink (for interactive runs).
Petr Rockai [Thu, 26 Jun 2014 22:54:36 +0000 (00:54 +0200)]
test: Add a buffer-backed IO sink (for interactive runs).

9 years agotest: Implement a file-backed IO sink in the runner.
Petr Rockai [Thu, 26 Jun 2014 22:53:36 +0000 (00:53 +0200)]
test: Implement a file-backed IO sink in the runner.

9 years agotest: Make runner use bigger IO buffers, put them on stack.
Petr Rockai [Thu, 26 Jun 2014 22:52:07 +0000 (00:52 +0200)]
test: Make runner use bigger IO buffers, put them on stack.

9 years agotest: Allow test devices backed by a permanent block device.
Petr Rockai [Thu, 26 Jun 2014 22:44:53 +0000 (00:44 +0200)]
test: Allow test devices backed by a permanent block device.

9 years agotest: Add new flavour definition files.
Petr Rockai [Thu, 26 Jun 2014 20:34:38 +0000 (22:34 +0200)]
test: Add new flavour definition files.

9 years agotest: Write a results/list at the end of a test run.
Petr Rockai [Wed, 25 Jun 2014 23:11:19 +0000 (01:11 +0200)]
test: Write a results/list at the end of a test run.

9 years agotest: Clean up fds properly in the runner.
Petr Rockai [Wed, 25 Jun 2014 23:08:57 +0000 (01:08 +0200)]
test: Clean up fds properly in the runner.

9 years agotest: Implement journalling and --continue.
Petr Rockai [Wed, 25 Jun 2014 23:02:13 +0000 (01:02 +0200)]
test: Implement journalling and --continue.

9 years agotest: Split up the new runner into multiple files.
Petr Rockai [Wed, 25 Jun 2014 19:34:34 +0000 (21:34 +0200)]
test: Split up the new runner into multiple files.

9 years agotest: Use the new runner in make check.
Petr Rockai [Wed, 25 Jun 2014 19:35:11 +0000 (21:35 +0200)]
test: Use the new runner in make check.

9 years agotest: Build the new test runner.
Petr Rockai [Sun, 8 Jun 2014 16:24:33 +0000 (18:24 +0200)]
test: Build the new test runner.

9 years agoconfigure: Add libexecdir/datadir to make.tmpl.in.
Petr Rockai [Thu, 26 Jun 2014 23:24:16 +0000 (01:24 +0200)]
configure: Add libexecdir/datadir to make.tmpl.in.

9 years agoconfigure: Allow C++ components.
Petr Rockai [Sun, 8 Jun 2014 16:23:47 +0000 (18:23 +0200)]
configure: Allow C++ components.

9 years agotest: Import first draft of a new test runner.
Petr Rockai [Sun, 8 Jun 2014 16:03:32 +0000 (18:03 +0200)]
test: Import first draft of a new test runner.

9 years agolibdaemon: set CLOEXEC flag on systemd socket
Ondrej Kozina [Fri, 30 Jan 2015 14:15:24 +0000 (15:15 +0100)]
libdaemon: set CLOEXEC flag on systemd socket

all sockets opened by a daemon or handed over by systemd
have to have CLOEXEC flag set. Otherwise we get nasty
warnings about leaking descriptors in processes spawned by
daemon.

9 years agolibdaemon: set CLOEXEC on client socket fd
Ondrej Kozina [Wed, 12 Nov 2014 08:50:59 +0000 (09:50 +0100)]
libdaemon: set CLOEXEC on client socket fd

9 years agopost-release
Alasdair G Kergon [Fri, 30 Jan 2015 16:18:43 +0000 (16:18 +0000)]
post-release

9 years agopre-release v2_02_116
Alasdair G Kergon [Fri, 30 Jan 2015 16:16:51 +0000 (16:16 +0000)]
pre-release

9 years agotests: add --force to sfdisk
Zdenek Kabelac [Fri, 30 Jan 2015 15:46:06 +0000 (16:46 +0100)]
tests: add --force to sfdisk

Avoid udev sync troubles for now.

9 years agoWHATS_NEW
Zdenek Kabelac [Fri, 30 Jan 2015 15:34:19 +0000 (16:34 +0100)]
WHATS_NEW

For thin fix.

9 years agothin: fix upgrade regression
Zdenek Kabelac [Fri, 30 Jan 2015 15:22:11 +0000 (16:22 +0100)]
thin: fix upgrade regression

Older lvm2 tools where always providing linear mapping for thin pool.
Recent lvm2 version however support external usage of thin pool and
empty/unused pools are loaded without such external linear mapping.

So this patch covers 'upgrade' problem, where older tool has activated
thin-pool with 'linear' layer mapping, and newer tools didn't expected
such mapping to exist and were not able to deactivate such table.

So before checking for new layout in dm-table, check if there is not
an old one already there.

9 years agothin: report proper status for thin pool
Zdenek Kabelac [Fri, 30 Jan 2015 14:29:39 +0000 (15:29 +0100)]
thin: report proper status for thin pool

After commit 158e9988768be344c0c97acdf52d1c020ab8c83e where we may
start to readlv_attr with a 'shared' ioctl call for a single lvs line
we where obtaing single status for thin pools.
However this is not properly reflecting lvm2 reality.

Correcting this by reading lv status from layered thin pool, but lv info
from non-layered (linear) mapped device which is maintained for proper
cluster locking.

9 years agocleanup: conf: auxiliary_device_status_source -> external_device_info_source
Peter Rajnoha [Fri, 30 Jan 2015 14:39:59 +0000 (15:39 +0100)]
cleanup: conf: auxiliary_device_status_source -> external_device_info_source

auxiliary_device_status_source was name used during development
of this feature, renamed later.

9 years agoraid: check lock holding LV
Zdenek Kabelac [Fri, 30 Jan 2015 13:13:25 +0000 (14:13 +0100)]
raid: check lock holding LV

Since raid could be used as stacked LV - check lock holding LV
for proper locking type for clustered usage.

9 years agoWHATS_NEW
Peter Rajnoha [Fri, 30 Jan 2015 12:29:51 +0000 (13:29 +0100)]
WHATS_NEW

9 years agocleanup: add dev-ext-udev-constants.h with constants/names of the properties/values...
Peter Rajnoha [Thu, 29 Jan 2015 15:44:34 +0000 (16:44 +0100)]
cleanup: add dev-ext-udev-constants.h with constants/names of the properties/values used from udev db

9 years agofilters: add firmware RAID filter
Peter Rajnoha [Tue, 9 Sep 2014 13:05:57 +0000 (15:05 +0200)]
filters: add firmware RAID filter

Just like MD filtering that detects components of software RAID (md),
add detection for firmware RAID.

We're not adding any native code to detect this - there are lots of
firmware RAIDs out there which is just out of LVM scope. However,
with current changes with which we're able to get device info from
external sources (e.g. external_device_info_source="udev"), we can
do this easily if the external device status source has this kind
of information - which is the case of "udev" source where the results
of blkid scans are stored.

This detection should cover all firmware RAIDs that blkid can detect and
which are identified as:
  ID_FS_TYPE = {adaptec,ddf,hpt45x,hpt37x,isw,jmicron,lsi_mega,nvidia,promise_fasttrack,silicon_medley,via}_raid_member

9 years agofilter-partitioned: use new 'udev' device status source to get partition status
Peter Rajnoha [Wed, 3 Sep 2014 13:49:36 +0000 (15:49 +0200)]
filter-partitioned: use new 'udev' device status source to get partition status

Partitioned devices are marked in udev db as:
  ID_PART_TABLE="<partition table type name>"
and at the same time they are *not* marked with:
  ID_PART_ENTRY_DISK="<parent disk major:minor>"

Where partition table type name is dos/gpt/... But checking the presence
of this variable is enough for LVM here - it just needs to know whether
there's a partition table or not, not interested in the actual type.
The same applies for parent disk major:minor.

9 years agofilter-usable: move check for pv_min_size from filter-partitioned to filter-usable...
Peter Rajnoha [Thu, 29 Jan 2015 13:24:06 +0000 (14:24 +0100)]
filter-usable: move check for pv_min_size from filter-partitioned to filter-usable and use new 'udev' external device info source for this check

The filter-partitioned code should contain only checks in "partition" domain.

The check for pv_min_size should actually be a part of filter-usable.
If the device size is less than pv_min_size, such device is not usable
as a PV so this check clearly belongs here logically.

With udev external info source, we can get device size via libudev's
sysfs reading interface and we can avoid opening the device this way
effectively.

9 years agofilter-mpath: use new 'udev' external device info source to get mpath component status
Peter Rajnoha [Wed, 3 Sep 2014 13:48:37 +0000 (15:48 +0200)]
filter-mpath: use new 'udev' external device info source to get mpath component status

mpath components are marked in udev db as:
  ID_FS_TYPE="mpath_member"
or
  DM_MULTIPATH_DEVICE_PATH="1"

(it depends on udev rule/blkid version used for handling mpath)

9 years agofilter-md: use new 'udev' external device info source to get MD component status
Peter Rajnoha [Wed, 3 Sep 2014 13:47:52 +0000 (15:47 +0200)]
filter-md: use new 'udev' external device info source to get MD component status

MD components are marked in udev db as:
  ID_FS_TYPE="linux_raid_member"

9 years agoconf: add devices/external_device_info_source to lvm.conf
Peter Rajnoha [Mon, 15 Dec 2014 15:27:33 +0000 (16:27 +0100)]
conf: add devices/external_device_info_source to lvm.conf

9 years agofilter-composite: add external device info hooks
Peter Rajnoha [Mon, 15 Dec 2014 14:12:42 +0000 (15:12 +0100)]
filter-composite: add external device info hooks

Composite filter is a filter that can put several filters in one set.
This patch adds a switch when creating the composite filter which will
enable or disable external device info handles for all the filters
the composite filter encompasses.

We want to use this external device info for majority of the filters
which are in the "lvmetad filter chain" (or the respective part if
we're not using lvmetad).

Following patches will use the enabled external device handle in
concrete filters from the composite filter...

9 years agodevice: add infrastructure to support external device info
Peter Rajnoha [Fri, 12 Dec 2014 11:55:41 +0000 (12:55 +0100)]
device: add infrastructure to support external device info

9 years agorevert "cache: add pool deps for preload"
Zdenek Kabelac [Fri, 30 Jan 2015 11:31:09 +0000 (12:31 +0100)]
revert "cache: add pool deps for preload"

This reverts commit c3bb6d77dd6193755070c62c6f3adb93c1976f19.

Since we now have  for_each_sub_lv() scanning all sub LVs,
this commit could be safely reverted.

9 years agotests: test stacked raid
Zdenek Kabelac [Fri, 30 Jan 2015 11:30:35 +0000 (12:30 +0100)]
tests: test stacked raid

9 years agocleanup: indent tabs
Zdenek Kabelac [Fri, 30 Jan 2015 11:27:16 +0000 (12:27 +0100)]
cleanup: indent tabs

9 years agolv_manip: add for_each_sub_lv_except_pools()
Zdenek Kabelac [Fri, 30 Jan 2015 11:27:49 +0000 (12:27 +0100)]
lv_manip: add for_each_sub_lv_except_pools()

for_each_sub_lv() now scans in depth also pools, however for
rename we actually do want to skip pools.

So add a new for_each_sub_lv_except_pools() to be used by rename,
every other user of for_each_sub_lv() scans every sub LV with pools
included.

This is i.e. necessary for properly working preload of pools
that are using raid arrays.

9 years agoWHATS_NEW: previous commit
Peter Rajnoha [Fri, 30 Jan 2015 10:28:10 +0000 (11:28 +0100)]
WHATS_NEW: previous commit

9 years agoproperties: also recognize LVSINFO, LVSSTATUS and LVSINFOSTATUS as subtypes of LVS
Peter Rajnoha [Fri, 30 Jan 2015 10:13:49 +0000 (11:13 +0100)]
properties: also recognize LVSINFO, LVSSTATUS and LVSINFOSTATUS as subtypes of LVS

LVSINFO, LVSSTATUS and LVSINFOSTATUS is the same as LVS, just with some
extra info/status decoration attached to it. Recognize this when looking
for properties for lvm2app. This fixes lvm_lv_get_property lvm2app call
for fields which already use LVS{INFO,STATUS,INFOSTATUS} - currently,
this is lv_attr field which was converted to LVSINFOSTATUS from
pure LVS type.

9 years agolvm2app: fix lvm_lv_get_attr regression causing unknown values
Peter Rajnoha [Fri, 30 Jan 2015 08:45:22 +0000 (09:45 +0100)]
lvm2app: fix lvm_lv_get_attr regression causing unknown values

This is a regression from v115 where some of the fields/properties
were converted to using the common "struct lvinfo" and
"struct lv_seg_status" so we don't need to issue info and status
ioctl several times per one reported line. Not all fields are
converted yet, but one that *is* converted is the lv_attr field
with the lv_attr_dup counterpart used in lvm_lv_get_attr lvm2app fn.

These changes were introduced with e34b004422f0d51263e0d34f4064556cfc9148f6
and later - this patch introduced the "info_ok" field in the
lv_with_info_and_seg_status structure which encapsulates the lvinfo
and lv_seg_status struct.

For the lv_attr_dup, the lv_attr_dup code  missed the
assignment for the "info_ok" flag which saves the result of the
lv_info_with_seg_status call. Hence such info was marked
as unusable - unknown and it was returned as such via lvm_lv_get_attr
lvm2app fn.

9 years agocache: use writethrough cache_mode for older metadata
Zdenek Kabelac [Thu, 29 Jan 2015 11:05:58 +0000 (12:05 +0100)]
cache: use writethrough cache_mode for older metadata

When cache_mode is undefined, the read of metadata will miss to
set a bit with mode and fails to process metadata on internal
error:

  Internal error: LV vg/lvol1 has uknown feature flags 0.

Fix it by setting it to writethrough mode.

9 years agoraid: preload splitted LV only when active
Zdenek Kabelac [Wed, 28 Jan 2015 17:30:08 +0000 (18:30 +0100)]
raid: preload splitted LV only when active

Check splitted leg is active before preload.
(Since splitmirrors currently only does work active raid volumes
it's not a change for current code flow).

Minor optimization included - when already positively checked
for raid image don't check again for raid metadata.

9 years agocache: add pool deps for preload
Zdenek Kabelac [Wed, 28 Jan 2015 15:29:35 +0000 (16:29 +0100)]
cache: add pool deps for preload

for_each_sub_lv() normally does not put  pool_lv into deps.

So for now go around it in 'lv_preload()' and add explicit
call with pool.

TODO: think about a better way, we want pool_lv deps only in certain
moments, so maybe for_each_sub_lv() needs new arg for this.

9 years agothin: preserve chunksize with lvconvert
Zdenek Kabelac [Wed, 28 Jan 2015 14:12:38 +0000 (15:12 +0100)]
thin: preserve chunksize with lvconvert

When repairing thin pool or swapping thin pool metadata,
preserve  chunk_size property and avoid to be automatically changed
later in the code to better match thin pool metadata size.

9 years agocleanup: use macro lv_is_visible()
Zdenek Kabelac [Wed, 28 Jan 2015 12:34:12 +0000 (13:34 +0100)]
cleanup: use macro lv_is_visible()

9 years agoraid: lock holder will skip visible raid LVs
Zdenek Kabelac [Wed, 28 Jan 2015 12:34:41 +0000 (13:34 +0100)]
raid: lock holder will skip visible raid LVs

RAID marks legs as VISIBLE with notion it's not longer
true raid leg - so skip tree scannig and take this LV
as top-level LV.

9 years agoraid: fix raid image splitting
Zdenek Kabelac [Wed, 28 Jan 2015 12:39:41 +0000 (13:39 +0100)]
raid: fix raid image splitting

When raid leg is extracted, now the preload code handles this state
correctly and put proper new table entry into dm tree,
so the activation of extracted leg and removed metadata works
after commit.

9 years agoraid: fix tree preload for splitting raid images
Zdenek Kabelac [Wed, 28 Jan 2015 12:36:25 +0000 (13:36 +0100)]
raid: fix tree preload for splitting raid images

When raid is being splitted, extracted leg & metadata
is still floating in the table - and thus we need to
detect this case and properly preload their matching
table so consequent activation of extracted LVs properly
renames (and FREES) existing raid images, so ongoing
image name shifting will work.

9 years agodevices: DASD doesn't need to be stackable.
Alasdair G Kergon [Fri, 23 Jan 2015 20:32:31 +0000 (20:32 +0000)]
devices: DASD doesn't need to be stackable.

9 years agodevices: Do not support unpartitioned DASD.
Alasdair G Kergon [Fri, 23 Jan 2015 20:01:34 +0000 (20:01 +0000)]
devices: Do not support unpartitioned DASD.

9 years agolvm.conf: update error_when_full description
David Teigland [Thu, 22 Jan 2015 19:01:02 +0000 (13:01 -0600)]
lvm.conf: update error_when_full description

Relate it to the --errorwhenfull option.

9 years agolvmthin: update monitor and autoextend
David Teigland [Thu, 22 Jan 2015 18:52:39 +0000 (12:52 -0600)]
lvmthin: update monitor and autoextend

and some more in data exhaustion

9 years agocoverity: missing return value check
Peter Rajnoha [Thu, 22 Jan 2015 09:11:19 +0000 (10:11 +0100)]
coverity: missing return value check

Reported by coverity for code added recently - _avoid_pvs_with_other_images_of_lv
which calls process_each_sub_lv and not checking return value.

9 years agolvmthin: update data space exhaustion
David Teigland [Wed, 21 Jan 2015 17:08:12 +0000 (11:08 -0600)]
lvmthin: update data space exhaustion

9 years agoconfig: improve config validation to check if setting with string value can be empty.
Peter Rajnoha [Wed, 21 Jan 2015 15:44:02 +0000 (16:44 +0100)]
config: improve config validation to check if setting with string value can be empty.

For example, with dmeventd/executable set to "" which is not allowed for
this setting, the config validation now ends up with:

$ lvm dumpconfig --validate
  Configuration setting "dmeventd/executable" invalid. It cannot be set to an empty value.
  LVM configuration invalid.

This check for empty values for string config settings was not
done before (we only checked empty arrays, but not scalar strings).

9 years agopost-release
Alasdair G Kergon [Wed, 21 Jan 2015 13:25:10 +0000 (13:25 +0000)]
post-release

9 years agopre-release v2_02_115
Alasdair G Kergon [Wed, 21 Jan 2015 13:08:12 +0000 (13:08 +0000)]
pre-release

9 years agodmeventd: Reduce waitevent EINTR message severity.
Alasdair G Kergon [Wed, 21 Jan 2015 12:54:00 +0000 (12:54 +0000)]
dmeventd: Reduce waitevent EINTR message severity.

9 years agolibdevmapper: Improve incompatible version msg.
Alasdair G Kergon [Wed, 21 Jan 2015 12:23:56 +0000 (12:23 +0000)]
libdevmapper: Improve incompatible version msg.

9 years agocleanup: for commit 7bcb3fb02d6aacc566871326c0d01c331497a5b2
Peter Rajnoha [Wed, 21 Jan 2015 10:28:58 +0000 (11:28 +0100)]
cleanup: for commit 7bcb3fb02d6aacc566871326c0d01c331497a5b2

9 years agoreport: rename lv_error_when_full field to lv_when_full and display either "error...
Peter Rajnoha [Wed, 21 Jan 2015 09:43:40 +0000 (10:43 +0100)]
report: rename lv_error_when_full field to lv_when_full and display either "error", "queue" or ""

Rename original lv_error_when_full field to lv_when_full and also
convert it from binary field to string field displaying three
possible values: "error", "queueu" or "" (blank for undefined).

$ lvs vg/pool vg/pool1 vg/linear_lv -o+lv_when_full
  LV        VG   Attr       LSize Data%  Meta%  WhenFull
  linear_lv vg   -wi-a----- 4.00m
  pool      vg   twi-aotz-- 4.00m 0.00   0.98   queue
  pool1     vg   twi-a-tz-- 4.00m 0.00   0.88   error

For -S|--select these synonyms are recognized:

"error" -> "error when full", "error if no space"
"queue" -> "queue when full", "queue if no space"
   ""   -> "undefined"

9 years agolvmthin: include errorwhenfull
David Teigland [Tue, 20 Jan 2015 16:45:47 +0000 (10:45 -0600)]
lvmthin: include errorwhenfull

and don't display the size of pmspare to avoid setting an
expectation of a specific size.

9 years agovgimportclone: remove arg check that uses pvs
David Teigland [Tue, 20 Jan 2015 19:08:22 +0000 (13:08 -0600)]
vgimportclone: remove arg check that uses pvs

The arg check using pvs is unnecessary.  If the arg is not a PV,
the command will just fail later.  Using the pvs command at this
point in the command is a problem when lvmetad is running, because
the pvs command does not report duplicate PVs when using lvmetad.
(Alternatively, use_lvmetad could be disabled by adding a --config
override to this pvs command.)

9 years agoreport: Fix warning in _str_list_append.
Alasdair G Kergon [Tue, 20 Jan 2015 17:15:28 +0000 (17:15 +0000)]
report: Fix warning in _str_list_append.

../../lib/report/report.c: In function ‘_str_list_append’:
../../lib/report/report.c:256: warning: declaration of ‘dup’ shadows a global declaration

9 years agoreport: proper lv_attr_dup emulation
Zdenek Kabelac [Tue, 20 Jan 2015 15:24:45 +0000 (16:24 +0100)]
report: proper lv_attr_dup emulation

We need to create a mempool for proper emulation of lv_attr_dup
for lvm2api.

9 years agoreport: add separate LVSINFOSTATUS field type for info+status combined fields
Peter Rajnoha [Tue, 20 Jan 2015 15:02:48 +0000 (16:02 +0100)]
report: add separate LVSINFOSTATUS field type for info+status combined fields

Add separate LVSINFOSTATUS field type for fields which display both
dm info-like and dm status-like information.

The internal interface is there with the introduction of LVSSTATUS
field type which can cope with the combination of LVSSTATUS
and LVSINFO field types (several fields).

However, till now, we considered that *single* field can display
either LVSINFO or LVSSTATUS, but not both at the same time.

Till now, we haven't had single field which needs both - hence
add LVSINFOSTATUS field type for such fields as we currently
need this for the lv_attr field which requires combination of
info and status.

This patch just adds interface for an ability to register such fields
(the code that copes with this is already in).

9 years agothin: support errorwhenfull with thin creation
Zdenek Kabelac [Tue, 20 Jan 2015 14:43:16 +0000 (15:43 +0100)]
thin: support errorwhenfull with thin creation

When thinpool and thinvolume are created at the same time,
still support usage of --errorwhenfull.

9 years agoreport: use info
Zdenek Kabelac [Tue, 20 Jan 2015 14:25:05 +0000 (15:25 +0100)]
report: use info

Use LVSINFO since  LVSSTATUS only fills status

9 years agocleanup: indent
Zdenek Kabelac [Tue, 20 Jan 2015 11:43:16 +0000 (12:43 +0100)]
cleanup: indent

9 years agoman: errorwhenfull doc
Zdenek Kabelac [Thu, 15 Jan 2015 14:20:57 +0000 (15:20 +0100)]
man: errorwhenfull doc

9 years agoreport: seg_monitor undefined
Zdenek Kabelac [Tue, 20 Jan 2015 13:36:21 +0000 (14:36 +0100)]
report: seg_monitor  undefined

Add 'undefined' value for segment which do not support monitoring.
Fixes crash for commands like 'pvs -o+seg_monitor'.

9 years agoreport: update report_object API
Zdenek Kabelac [Tue, 20 Jan 2015 12:16:41 +0000 (13:16 +0100)]
report: update report_object API

Internal API change - pass single struct for both info & seg_status.

9 years agoreport: use same info also for lv_attr
Zdenek Kabelac [Tue, 20 Jan 2015 12:14:16 +0000 (13:14 +0100)]
report: use same info also for  lv_attr

Recently the single 'status' code has been used for number of cache
features.

Extend the API a little bit to allow usage also for lv_attr_dup.

As the function itself is used in lvm2api - add a new function:
lv_attr_dup_with_info_and_seg_status() that is able to use
grabbed info & status information.

report_init() is now using directly passed lvdm struct pointer
which holds the infomation whether lv_info() was correctly obtained or
there was some error when trying to read it.

Move 'healt' attribute to status.
TODO convert raid function to use the already known status.

9 years agoreport: reporting unknown status
Zdenek Kabelac [Tue, 20 Jan 2015 11:38:38 +0000 (12:38 +0100)]
report: reporting unknown status

Add SEG_STATUS_UNKNOWN when status cannot be parsed.
Also add 'info_ok' variable when info was correctly obtained.

9 years agothin: lvchange support for errorwhenfull
Zdenek Kabelac [Thu, 15 Jan 2015 14:20:08 +0000 (15:20 +0100)]
thin: lvchange support for errorwhenfull

Support lvchange --errorwhenfull y|n for thin pools.

9 years agocleanup: add lv_is_error_when_full() macro
Zdenek Kabelac [Thu, 15 Jan 2015 14:19:00 +0000 (15:19 +0100)]
cleanup: add lv_is_error_when_full() macro

Like with other status bits use macro for testing.
(in-release update)

9 years agovgimportclone: Say safe to ignore lvmetad message.
Alasdair G Kergon [Sat, 17 Jan 2015 11:29:38 +0000 (11:29 +0000)]
vgimportclone: Say safe to ignore lvmetad message.

9 years agoman: Remove renamed writebehind field from lvs.8.
Alasdair G Kergon [Sat, 17 Jan 2015 11:05:25 +0000 (11:05 +0000)]
man: Remove renamed writebehind field from lvs.8.

9 years agolibdm-report: Fix order of NULL dm_report check.
Alasdair G Kergon [Sat, 17 Jan 2015 10:50:54 +0000 (10:50 +0000)]
libdm-report: Fix order of NULL dm_report check.

9 years agoraid_manip: v2 fix multi-segment misallocation on 'lvconvert --repair'
Heinz Mauelshagen [Fri, 16 Jan 2015 12:44:16 +0000 (13:44 +0100)]
raid_manip: v2 fix multi-segment misallocation on 'lvconvert --repair'

The previous patch felt short WRT disabling allocation on PVs holding other
legs of the RAID LV persistently; this patch introduces an internal,
transient PV flag PV_ALLOCATION_PROHIBITED to address this very problem.

General problem description for completeness:

An 'lvconvert --repair $RAID_LV" to replace a failed leg of a multi-segment
RAID10/4/5/6 logical volume can lead to allocation of (parts of) the replacement
image component pair on the physical volume of another image component
(e.g. image 0 allocated on the same PV as image 1 silently impeding resilience).

Patch fixes this severe resilince issue by prohibiting allocation on PVs
already holding other legs of the RAID set. It allows to allocate free space
on any operational PV already holding parts of the image component pair.

9 years agoWHATS_NEW: previous commits related to duplicate PVs
David Teigland [Wed, 14 Jan 2015 20:52:12 +0000 (14:52 -0600)]
WHATS_NEW: previous commits related to duplicate PVs

9 years agotoollib: search for duplicate PVs only when needed
David Teigland [Wed, 14 Jan 2015 20:38:05 +0000 (14:38 -0600)]
toollib: search for duplicate PVs only when needed

A full search for duplicate PVs in the case of pvs -a
is only necessary when duplicates have previously been
detected in lvmcache.  Use a global variable from lvmcache
to indicate that duplicate PVs exist, so we can skip the
search for duplicates when none exist.

9 years agotoollib: pvs -a should display VG name for each duplicate PV
David Teigland [Wed, 14 Jan 2015 20:16:03 +0000 (14:16 -0600)]
toollib: pvs -a should display VG name for each duplicate PV

Previously, 'pvs -a' displayed the VG name for only the device
associated with the cached PV (pv->dev), and other duplicate
devices would have a blank VG name.  This commit displays the
VG name for each of the duplicate devices.  The cost of doing
this is not small: for each PV processed, the list of all
devices must be searched for duplicates.

9 years agotoollib: override the PV device with duplicates
David Teigland [Tue, 13 Jan 2015 22:16:22 +0000 (16:16 -0600)]
toollib: override the PV device with duplicates

When multiple duplicate devices are specified on the
command line, the PV is processed once for each of them,
but pv->dev is the device used each time.

This overrides the PV device to reflect the duplicate
device that was specified on the command line.  This is
done by hacking the lvmcache to replace pv->dev with the
device of the duplicate being processed.  (It would be
preferable to override pv->dev without munging the content
of the cache, and without sprinkling special cases throughout
the code.)

This override only applies when multiple duplicate devices are
specified on the command line.  When only a single duplicate
device of pv->dev is specified, the priority is to display the
cached pv->dev, so pv->dev is not overridden by the named
duplicate device.

In the examples below, loop3 is the cached device referenced
by pv->dev, and is given priority for processing.  Only after
loop3 is processed/displayed, will other duplicate devices
loop0/loop1 appear (when requested on the command line.)

With two duplicate devices, loop0 and loop3:

  # pvs
  Found duplicate PV XhLbpVo0hmuwrMQLjfxuAvPFUFZqD4vr: using /dev/loop3 not /dev/loop0
  PV         VG           Fmt  Attr PSize   PFree
  /dev/loop3 loopa        lvm2 a--   12.00m  12.00m

  # pvs /dev/loop3
  Found duplicate PV XhLbpVo0hmuwrMQLjfxuAvPFUFZqD4vr: using /dev/loop3 not /dev/loop0
  PV         VG    Fmt  Attr PSize  PFree
  /dev/loop3 loopa lvm2 a--  12.00m 12.00m

  # pvs /dev/loop0
  Found duplicate PV XhLbpVo0hmuwrMQLjfxuAvPFUFZqD4vr: using /dev/loop3 not /dev/loop0
  PV         VG    Fmt  Attr PSize  PFree
  /dev/loop3 loopa lvm2 a--  12.00m 12.00m

  # pvs -o+dev_size /dev/loop0 /dev/loop3
  Found duplicate PV XhLbpVo0hmuwrMQLjfxuAvPFUFZqD4vr: using /dev/loop3 not /dev/loop0
  PV         VG    Fmt  Attr PSize  PFree  DevSize
  /dev/loop0 loopa lvm2 a--  12.00m 12.00m  16.00m
  /dev/loop3 loopa lvm2 a--  12.00m 12.00m  32.00m

With three duplicate devices, loop0, loop1, loop3:

  # pvs -o+dev_size
  Found duplicate PV XhLbpVo0hmuwrMQLjfxuAvPFUFZqD4vr: using /dev/loop1 not /dev/loop0
  Found duplicate PV XhLbpVo0hmuwrMQLjfxuAvPFUFZqD4vr: using /dev/loop3 not /dev/loop1
  PV         VG           Fmt  Attr PSize   PFree   DevSize
  /dev/loop3 loopa        lvm2 a--   12.00m  12.00m  32.00m

  # pvs -o+dev_size /dev/loop3
  Found duplicate PV XhLbpVo0hmuwrMQLjfxuAvPFUFZqD4vr: using /dev/loop1 not /dev/loop0
  Found duplicate PV XhLbpVo0hmuwrMQLjfxuAvPFUFZqD4vr: using /dev/loop3 not /dev/loop1
  PV         VG    Fmt  Attr PSize  PFree  DevSize
  /dev/loop3 loopa lvm2 a--  12.00m 12.00m  32.00m

  # pvs -o+dev_size /dev/loop0
  Found duplicate PV XhLbpVo0hmuwrMQLjfxuAvPFUFZqD4vr: using /dev/loop1 not /dev/loop0
  Found duplicate PV XhLbpVo0hmuwrMQLjfxuAvPFUFZqD4vr: using /dev/loop3 not /dev/loop1
  PV         VG    Fmt  Attr PSize  PFree  DevSize
  /dev/loop3 loopa lvm2 a--  12.00m 12.00m  32.00m

  # pvs -o+dev_size /dev/loop1
  Found duplicate PV XhLbpVo0hmuwrMQLjfxuAvPFUFZqD4vr: using /dev/loop1 not /dev/loop0
  Found duplicate PV XhLbpVo0hmuwrMQLjfxuAvPFUFZqD4vr: using /dev/loop3 not /dev/loop1
  PV         VG    Fmt  Attr PSize  PFree  DevSize
  /dev/loop3 loopa lvm2 a--  12.00m 12.00m  32.00m

  # pvs -o+dev_size /dev/loop3 /dev/loop0
  Found duplicate PV XhLbpVo0hmuwrMQLjfxuAvPFUFZqD4vr: using /dev/loop1 not /dev/loop0
  Found duplicate PV XhLbpVo0hmuwrMQLjfxuAvPFUFZqD4vr: using /dev/loop3 not /dev/loop1
  PV         VG    Fmt  Attr PSize  PFree  DevSize
  /dev/loop0 loopa lvm2 a--  12.00m 12.00m  16.00m
  /dev/loop3 loopa lvm2 a--  12.00m 12.00m  32.00m

  # pvs -o+dev_size /dev/loop3 /dev/loop1
  Found duplicate PV XhLbpVo0hmuwrMQLjfxuAvPFUFZqD4vr: using /dev/loop1 not /dev/loop0
  Found duplicate PV XhLbpVo0hmuwrMQLjfxuAvPFUFZqD4vr: using /dev/loop3 not /dev/loop1
  PV         VG    Fmt  Attr PSize  PFree  DevSize
  /dev/loop1 loopa lvm2 a--  12.00m 12.00m  32.00m
  /dev/loop3 loopa lvm2 a--  12.00m 12.00m  32.00m

  # pvs -o+dev_size /dev/loop0 /dev/loop1
  Found duplicate PV XhLbpVo0hmuwrMQLjfxuAvPFUFZqD4vr: using /dev/loop1 not /dev/loop0
  Found duplicate PV XhLbpVo0hmuwrMQLjfxuAvPFUFZqD4vr: using /dev/loop3 not /dev/loop1
  PV         VG    Fmt  Attr PSize  PFree  DevSize
  /dev/loop1 loopa lvm2 a--  12.00m 12.00m  32.00m
  /dev/loop3 loopa lvm2 a--  12.00m 12.00m  32.00m

  # pvs -o+dev_size /dev/loop0 /dev/loop1 /dev/loop3
  Found duplicate PV XhLbpVo0hmuwrMQLjfxuAvPFUFZqD4vr: using /dev/loop1 not /dev/loop0
  Found duplicate PV XhLbpVo0hmuwrMQLjfxuAvPFUFZqD4vr: using /dev/loop3 not /dev/loop1
  PV         VG    Fmt  Attr PSize  PFree  DevSize
  /dev/loop0 loopa lvm2 a--  12.00m 12.00m  16.00m
  /dev/loop1 loopa lvm2 a--  12.00m 12.00m  32.00m
  /dev/loop3 loopa lvm2 a--  12.00m 12.00m  32.00m

9 years agotoollib: handle duplicate pvs in process_in_pv
David Teigland [Fri, 9 Jan 2015 20:55:16 +0000 (14:55 -0600)]
toollib: handle duplicate pvs in process_in_pv

Processes a PV once for each time a device with its PV ID
exists on the command line.

This fixes a regression in the case where:

. devices /dev/sdA and /dev/sdB where clones (same PV ID)

. the cached VG references /dev/sdA

. before the regression, the command: pvs /dev/sdB
  would display the cached device clone /dev/sdA

. after the regression, pvs /dev/sdB would display nothing,
  causing vgimportclone /dev/sdB to fail.

. with this fix, pvs /dev/sdB displays /dev/sdA

Also, pvs /dev/sdA /dev/sdB will report two lines, one for each
device on the command line, but /dev/sdA is displayed for each.

This only works without lvmetad.

9 years agodmeventd: Call lvscan --cache also for mirrors (in addition to RAID).
Petr Rockai [Wed, 14 Jan 2015 17:04:46 +0000 (18:04 +0100)]
dmeventd: Call lvscan --cache also for mirrors (in addition to RAID).

9 years agoWHATS_NEW
Zdenek Kabelac [Wed, 14 Jan 2015 14:15:29 +0000 (15:15 +0100)]
WHATS_NEW

More news

9 years agothin: errrorwhenfull support
Zdenek Kabelac [Tue, 13 Jan 2015 14:23:03 +0000 (15:23 +0100)]
thin: errrorwhenfull support

Support error_if_no_space feature for thin pools.
Report more info about thinpool status:
(out_of_data (D), metadata_read_only (M), failed  (F) also as health
attribute.)

9 years agocleanup: missed for build without devmapper
Zdenek Kabelac [Wed, 14 Jan 2015 12:03:52 +0000 (13:03 +0100)]
cleanup: missed for build without devmapper

configure --disable-devmapper build fixes.

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