]> sourceware.org Git - lvm2.git/log
lvm2.git
8 years agolvmdbusd: Bug fix for missing LV properties
Tony Asleson [Fri, 10 Jun 2016 16:58:55 +0000 (11:58 -0500)]
lvmdbusd: Bug fix for missing LV properties

When we are processing the LVs we need to build up dbus objects from least
dependent to most dependent, so that we have information available when
constructing.

8 years agolvmdbusd: Add data_lv and metadata_lv to cache pool interface
Tony Asleson [Mon, 6 Jun 2016 20:03:02 +0000 (15:03 -0500)]
lvmdbusd: Add data_lv and metadata_lv to cache pool interface

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

8 years agolvmdbusd: Add roles property to LV common interface
Tony Asleson [Fri, 3 Jun 2016 22:07:37 +0000 (17:07 -0500)]
lvmdbusd: Add roles property to LV common interface

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

8 years agoWHATS_NEW: add recent changes
David Teigland [Fri, 10 Jun 2016 18:39:23 +0000 (13:39 -0500)]
WHATS_NEW: add recent changes

8 years agocleanup: typo in WHATS_NEW_DM
Zdenek Kabelac [Fri, 3 Jun 2016 13:33:27 +0000 (15:33 +0200)]
cleanup: typo in WHATS_NEW_DM

8 years agodisplay: yes no prompt improvement
Zdenek Kabelac [Wed, 8 Jun 2016 18:52:14 +0000 (20:52 +0200)]
display: yes no prompt improvement

Original code missed to catch all apperances of SIGINT.
Also enhance logging when running in shell without tty.
Accept this regex as valid input:
'^[ ^t]*([Yy]([Ee]([Ss]|)|)|[Nn]([Oo]|))[ ^t]*$'

8 years agolvmdump: also collect output from lsblk command when running lvmdump -s
Peter Rajnoha [Thu, 9 Jun 2016 11:51:09 +0000 (13:51 +0200)]
lvmdump: also collect output from lsblk command when running lvmdump -s

lsblk provides nice and quick overview of the storage/sysfs structure
that is useful for debugging - collect its output when running lvmdump -s.

8 years agovgcreate, pvcreate, vgextend: don't use a device with duplicates
David Teigland [Mon, 6 Jun 2016 20:39:51 +0000 (15:39 -0500)]
vgcreate, pvcreate, vgextend: don't use a device with duplicates

If duplicate orphan PVs exist, don't allow one of them to be
used for vgcreate/pvcreate/vgextend.

8 years agolvmcache: fix duplicate handling with multiple scans
David Teigland [Mon, 6 Jun 2016 20:20:55 +0000 (15:20 -0500)]
lvmcache: fix duplicate handling with multiple scans

Some commands scan labels to populate lvmcache multiple
times, i.e. lvmcache_init, scan labels to fill lvmcache,
lvmcache_destroy, then later repeat

Each time labels are scanned, duplicates are detected,
and preferred devices are chosen.  Each time this is done
within a single command, we want to choose the same
preferred devices.  So, check for existing preferences
when choosing preferred devices.

This also fixes a problem with the list of unused duplicate
devs when run in an lvm shell.  The devs had been allocated
from cmd memory, resulting in invalid list entries between
commands.

8 years agolvmcache: add optional dev arg to lvmcache_info_from_pvid
David Teigland [Mon, 6 Jun 2016 19:04:17 +0000 (14:04 -0500)]
lvmcache: add optional dev arg to lvmcache_info_from_pvid

A number of places are working on a specific dev when they
call lvmcache_info_from_pvid() to look up an info struct
based on a pvid.  In those cases, pass the dev being used
to lvmcache_info_from_pvid().  When a dev is specified,
lvmcache_info_from_pvid() will verify that the cached
info it's using matches the dev being processed before
returning the info.  Calling code will not mistakenly
get info for the wrong dev when duplicate devs exist.

This confusion was happening when scanning labels when
duplicate devs existed.  label_read for the first dev
would add an info struct to lvmcache for that dev/pvid.
label_read for the second dev would see the pvid in
lvmcache from first dev, and mistakenly conclude that
the label_read from the second dev can be skipped
because it's already been done.  By verifying that the
dev for the cached pvid matches the dev being read,
this mismatch is avoided and the label is actually read
from the second duplicate.

8 years agolvmetad: handle update failures
David Teigland [Fri, 20 May 2016 18:32:14 +0000 (13:32 -0500)]
lvmetad: handle update failures

If a command gets stuck during an lvmetad update, lvmetad
will cancel that update after the timeout.  The next command
to check the lvmetad will see that lvmetad needs to be
populated because lvmetad will return token of "none" after
a timed out update (same as when lvmetad is not populated
at all after starting.)

If a command gets an error during an lvmetad update, it
will now just quit and leave its updating token in place.
That update will be cancelled after the timeout.

8 years agolvmetad: remove disabled case for "scan error"
David Teigland [Wed, 25 May 2016 21:10:46 +0000 (16:10 -0500)]
lvmetad: remove disabled case for "scan error"

Failures while populating lvmetad will be handling
differently in a subsequent commit.

8 years agolvmetad: define special update in progress string
David Teigland [Thu, 19 May 2016 21:19:38 +0000 (16:19 -0500)]
lvmetad: define special update in progress string

8 years agoblkdeactivate: fix regression in blkdeactivate causing dm and md devices to be skipped.
Peter Rajnoha [Mon, 6 Jun 2016 12:57:41 +0000 (14:57 +0200)]
blkdeactivate: fix regression in blkdeactivate causing dm and md devices to be skipped.

Commit #5b3a4a9 caused the "name" variable to be cleared if
declaration and assignment is on two lines so put it back
so it's on one line for it to work again.

8 years agopost-release
Alasdair G Kergon [Fri, 3 Jun 2016 22:20:43 +0000 (23:20 +0100)]
post-release

8 years agopre-release v2_02_155
Alasdair G Kergon [Fri, 3 Jun 2016 22:16:50 +0000 (23:16 +0100)]
pre-release

8 years agopvmove: disallow tag args
David Teigland [Fri, 3 Jun 2016 14:56:48 +0000 (09:56 -0500)]
pvmove: disallow tag args

pvmove began processing tags unintentionally from commit,
6d7dc87cb pvmove: use toollib

pvmove works on a single PV, but tags can match multiple PVs.
If we allowed tags, but processed only the first matching PV,
then the resulting PV would be unpredictable.

Also, the current processing code does not allow us to simply
report an error and do nothing if more than one PV matches the tag,
because the command starts processing PVs as they are found,
so it's too late to do nothing if a second PV matches.

8 years agoman: fixed typo in lvcreate.8
Tobias Stoeckmann [Mon, 30 May 2016 21:13:40 +0000 (23:13 +0200)]
man: fixed typo in lvcreate.8

It's supposed to be "smaller than" instead of "smaller then".

8 years agocleanup: compile fixes for --disable-devmapper
Zdenek Kabelac [Fri, 3 Jun 2016 10:38:46 +0000 (12:38 +0200)]
cleanup: compile fixes for --disable-devmapper

Make lvm2 compilable when configured with: --disable-devmapper.

8 years agoman: lvmconfig: add note about --type diff and --mergedconfig
Peter Rajnoha [Thu, 2 Jun 2016 12:07:07 +0000 (14:07 +0200)]
man: lvmconfig: add note about --type diff and --mergedconfig

8 years agolvmconfig: fix lvmconfig --type diff to display complete diff if config cascade used
Peter Rajnoha [Thu, 2 Jun 2016 11:41:55 +0000 (13:41 +0200)]
lvmconfig: fix lvmconfig --type diff to display complete diff if config cascade used

If configuration consists of several sources in config cascade
("config cascade" defined in man lvmconfig(8)), lvmconfig displayed
only difference from defaults of the topmost config in the cascade.
Fix lvmconfig to display complete difference, considering all
the configuration in the cascade.

For example, before this patch:

(use_lvmetad=0 set in lvm.conf which differs from defaults)
$ lvmconfig --type diff
global {
use_lvmetad=0
}

(compact_output=1 set on cmd line)
$ lvmconfig --type diff --config report/compact_output=1
report {
compact_output=1
}

(headings=0 set in profile)
$ lvmconfig --type diff --commandprofile test
report {
headings=0
}

(difference in topmost configuration source is displayed)
$ lvmconfig --type diff --commandprofile test --config report/compact_output=1
report {
compact_output=1
}

With this patch applied (the config cascade is merged before looking for
difference from defaults in configuration):

$ lvmconfig --type diff
global {
use_lvmetad=0
}

$ lvmconfig --type diff --config report/compact_output=1
report {
compact_output=1
}
global {
use_lvmetad=0
}

$ lvmconfig --type diff --profile test
report {
headings=0
}
global {
use_lvmetad=0
}

$ lvmconfig --type diff --profile test --config report/compact_output=1
report {
headings=0
compact_output=1
}
global {
use_lvmetad=0
}

8 years agomake: add generated parts of lvmdbusd to DISTCLEAN_TARGETS for make distclean
Peter Rajnoha [Thu, 2 Jun 2016 09:58:54 +0000 (11:58 +0200)]
make: add generated parts of lvmdbusd to DISTCLEAN_TARGETS for make distclean

8 years agocleanup: use display_name
Zdenek Kabelac [Wed, 1 Jun 2016 15:40:26 +0000 (17:40 +0200)]
cleanup: use display_name

8 years agotests: check losetup -P is correctly handled
Zdenek Kabelac [Wed, 1 Jun 2016 15:25:55 +0000 (17:25 +0200)]
tests: check losetup -P is correctly handled

Validate pvcreate will not overwrite partitioned loop device.

8 years agotests: extend prepare_loop
Zdenek Kabelac [Wed, 1 Jun 2016 15:25:06 +0000 (17:25 +0200)]
tests: extend prepare_loop

Treat args after size  as 'extra' params for losetup.

8 years agodevices: handle partscan loop devices
Zdenek Kabelac [Wed, 1 Jun 2016 14:39:47 +0000 (16:39 +0200)]
devices: handle partscan loop devices

Treat loop device created with 'losetup -P' as regular
partitioned device - so if it has partition table,
prevent its usage in commands like 'pvcreate'.

Before 'pvcreate /dev/loop0' could have erased and formated as PV,
after this patch, device is filtered out and cannot be used.

8 years agocoverity: fix warnings about missing return value check for sscanf
Peter Rajnoha [Tue, 31 May 2016 08:06:19 +0000 (10:06 +0200)]
coverity: fix warnings about missing return value check for sscanf

All the variables for sscanf in lvmlockctl.c and lvmlockd-sanlock.c are
zeroed before sscanf call so the failure is detected by seeing the zero
value instead of proper one in subsequent code - so use (void) for
sscanf calls to ignore return value here.

8 years agocoverity: missing check for id_write_format return value
Peter Rajnoha [Tue, 31 May 2016 07:56:10 +0000 (09:56 +0200)]
coverity: missing check for id_write_format return value

8 years agocoverity: blkdeactivate: separate format and args for printf and declare and assign...
Peter Rajnoha [Tue, 31 May 2016 07:39:06 +0000 (09:39 +0200)]
coverity: blkdeactivate: separate format and args for printf and declare and assign separately to avoid masking return values

8 years agocoverity: fix possible resource leak of descendants_buffer in _print_historical_lv fn
Peter Rajnoha [Tue, 31 May 2016 07:36:40 +0000 (09:36 +0200)]
coverity: fix possible resource leak of descendants_buffer in _print_historical_lv fn

8 years agotests: add dmstats to CLEAN_TARGETS for make clean
Peter Rajnoha [Tue, 31 May 2016 07:14:23 +0000 (09:14 +0200)]
tests: add dmstats to CLEAN_TARGETS for make clean

8 years agotoollib: properly reset selection handle on selection failure in select_match_{pv...
Peter Rajnoha [Tue, 31 May 2016 07:08:59 +0000 (09:08 +0200)]
toollib: properly reset selection handle on selection failure in select_match_{pv,vg,lv}

8 years agoreport: fix lvm devtypes internal error if -S is used with field name from pvs/vgs/lvs
Peter Rajnoha [Mon, 30 May 2016 14:37:05 +0000 (16:37 +0200)]
report: fix lvm devtypes internal error if -S is used with field name from pvs/vgs/lvs

Before this fix, when reporting 'lvm devtypes', the report was
initialized with incorrect reserved values - the ones used for
pvs/vgs/lvs report were used instead of NULL value (because devtypes
doesn't have any reserved values).

For example, trying to (incorrectly) use lv_name for the -S|--select
with lvm devtypes which doesn't have this field at all:

Before this patch (internal error issued):

$ lvm devtypes -S 'lv_name=lvol0'
  Internal error: _check_reserved_values_supported: field-specific reserved value of type 0x0 for field  not supported
  Internal error: dm_report_init_with_selection: trying to register unsupported reserved value type, skipping report selection
  DevType       MaxParts Description
  aoe                 16 ATA over Ethernet
  ataraid             16 ATA Raid
  bcache               1 bcache block device cache
  ...

With this patch applied (correct error displayed about
unrecognized selection field):

$ lvm devtypes -S 'lv_name=lvol0'
  Device Types Fields
  -------------------
    devtype_name           - Name of Device Type exactly as it appears in /proc/devices. [string]
    devtype_max_partitions - Maximum number of partitions. (How many device minor numbers get reserved for each device.) [number]
    devtype_description    - Description of Device Type. [string]

  Special Fields
  --------------
    selected               - Set if item passes selection criteria. [number]
    help                   - Show help. [unselectable number]
    ?                      - Show help. [unselectable number]

  Unrecognised selection field: lv_name
  Selection syntax error at 'lv_name=lvol0'.
  Use 'help' for selection to get more help.

8 years agotoollib: simplify internal selection calls for non-reporting tools
Peter Rajnoha [Mon, 30 May 2016 14:28:47 +0000 (16:28 +0200)]
toollib: simplify internal selection calls for non-reporting tools

Some of the variables were set superfluously - we can just use existing
"struct processing_handle" which includes "struct selection_handle".

8 years agotests: check thin is not flushed for status
Zdenek Kabelac [Fri, 27 May 2016 15:24:18 +0000 (17:24 +0200)]
tests: check thin is not flushed for status

We finally approach a moment where we generally avoid
flushing thin-pool with every lvs command...

8 years agosnapshot: for invalid snapshot show 100%
Zdenek Kabelac [Fri, 27 May 2016 15:16:14 +0000 (17:16 +0200)]
snapshot: for invalid snapshot show 100%

Recent commit 92eba53a797a011d1ce6fbd7bef88eab41af2072 started to report
empty "" data usage of invalid snapshot, restore 100% to be shown.

8 years agotests: stacked snapshot merge
Zdenek Kabelac [Fri, 27 May 2016 13:21:38 +0000 (15:21 +0200)]
tests: stacked snapshot merge

8 years agotests: check cache_mode change on cachepool
Zdenek Kabelac [Wed, 25 May 2016 14:24:58 +0000 (16:24 +0200)]
tests: check cache_mode change on cachepool

8 years agodebug: use display_lvname
Zdenek Kabelac [Fri, 20 May 2016 09:28:23 +0000 (11:28 +0200)]
debug: use display_lvname

8 years agocache: add log_error on error path
Zdenek Kabelac [Wed, 25 May 2016 14:27:12 +0000 (16:27 +0200)]
cache: add log_error on error path

Validate and report error when lv_cache_status is called
for inactive LV, or pending delete or unused cache_pool.

8 years agoreport: convert more options to use single status
Zdenek Kabelac [Wed, 25 May 2016 14:26:10 +0000 (16:26 +0200)]
report: convert more options to use single status

Convert fields into using a single status ioctl call per LV.
This is a bit tricky since when there are more complicated
stacks, at this moment its undefined which values should be shown.

It's clear we need to cache more then single ioctl per LV,
but also we need to define more explicitely relation between
reported values for snapshots.

This patch is not a final state, rather a transitional step.
It should not be giving more 'worst' values then previous
many-ioctl-calls-per-lv solution.

8 years agosnapshot: use seg_status for attrs
Zdenek Kabelac [Wed, 25 May 2016 14:19:59 +0000 (16:19 +0200)]
snapshot: use seg_status for attrs

8 years agolv: introduce lvseg_percent_with_info_and_seg_status
Zdenek Kabelac [Wed, 25 May 2016 14:18:38 +0000 (16:18 +0200)]
lv: introduce lvseg_percent_with_info_and_seg_status

Add function to obtain percentage value for cache lv_seg_status.
This API is rather evolving 'middle' step as the ultimate goal
is segment API fuctionality.

But first we need to be clear at reporting level which values
are needed to be reported for which LVs and segments.

8 years agolvstatus: enhance seg_status to handle snapshot
Zdenek Kabelac [Wed, 25 May 2016 14:14:46 +0000 (16:14 +0200)]
lvstatus: enhance seg_status to handle snapshot

Add more code to properly store status for snapshot segment
maintaining lvm2 fiction of COW and snapshot internal volumes.

The key issue here is however not though-through reporting
logic - as there is no single answer for whole line state.
It not counting with layer and we may need few more ioctl to
cover all reporting needs depending upon what is actually
needed.

In reality we need to 'cache' more ioctl status queries for
individual LVs and their segments (so they checked at most once).

The other 'hard' topic for conversion is mirror segment handling.

Also we definitelly need to relocate some logic into segment's methods,
yet it might be complex as we have not clear border between targets.

TODO: define more clearly how are reporting fields defined in case
we 'stack' volumes like   -   cache of stacked  thin LV snapshot origin.

8 years agorefresh: call resume after failing suspend
Zdenek Kabelac [Fri, 20 May 2016 11:20:54 +0000 (13:20 +0200)]
refresh: call resume after failing suspend

lv_refresh_suspend_resume() has escaped with fail ret code
after failing suspend and could have left many volumes in suspend state.

So always unconditionally call resume also  when suspend has failed.

8 years agocleanup: drop cmd and constify lv for lv_refresh_suspend_resume()
Zdenek Kabelac [Fri, 20 May 2016 08:55:05 +0000 (10:55 +0200)]
cleanup: drop cmd and constify lv for lv_refresh_suspend_resume()

Like with most other lv_manip* functions take just LV arg and get cmd
from embeded pointer when needed.

8 years agocleanup: substract integers
Zdenek Kabelac [Fri, 27 May 2016 08:39:25 +0000 (10:39 +0200)]
cleanup: substract integers

Instead of doing float arithmetic, do integer math first and
convert result to float.

8 years agocache: enhance lv_cache_wait_for_clean
Zdenek Kabelac [Fri, 27 May 2016 12:19:29 +0000 (14:19 +0200)]
cache: enhance lv_cache_wait_for_clean

Handle passthrough mode when checking cache mode state explicitely.

8 years agocache: call status only on cache pool in use
Zdenek Kabelac [Tue, 24 May 2016 13:19:01 +0000 (15:19 +0200)]
cache: call status only on cache pool in use

Check show cache status only for cache pool in use.

8 years agosetup_task: add with_flush
Zdenek Kabelac [Fri, 27 May 2016 11:45:47 +0000 (13:45 +0200)]
setup_task: add with_flush

To get better control when flushing is used add extra arg when
setting up dm task.

By default now check dm device status without flush.
(At this moment this should effect only thin and cache volumes).

Also switch dev_manager_thin_pool_status() to use more
readable 'flush' parameter instead of 'no_flush'.

8 years agosnapshot: check merging_cow is cow
Zdenek Kabelac [Fri, 27 May 2016 11:49:30 +0000 (13:49 +0200)]
snapshot: check merging_cow is cow

Check first the LV is cow before even checking it's a merging COW.
Note: previosly merging_cow was also merging origin, so without
this explicit check it used to return '1' also when passed
LV has been merging origin.

8 years agoreport: fix report copy_percent value
Zdenek Kabelac [Fri, 27 May 2016 11:48:30 +0000 (13:48 +0200)]
report: fix report copy_percent value

When mirror/raid called copy_percent function to return,
when 100% was supposed to be returned, wrong float 100.0 value
could have been reported back instead of dm_percent_t DM_PERCENT_100.

There is broken API somewhere, since the function here rely on
actively being modifid VG content even when doing 'lvs' operation.
(extents_copies)

8 years agoRevert "libdm: trace missing settings"
Alasdair G Kergon [Fri, 27 May 2016 13:35:11 +0000 (14:35 +0100)]
Revert "libdm: trace missing settings"

This reverts commit 8fd886f735125de4b3e32fc0a188af0192a0d173.

This was a deliberate omission because logging token-by-token metadata
parsing greatly increases the amount of logging for hardly any benefit.

In general, only LVM config file settings need to be logged, and in
places where it's considered important to log particular elements of
metadata that should be done using specific log_* lines.

This area can be revisited.

8 years agoWHATS_NEW: include recent changes
David Teigland [Thu, 26 May 2016 14:13:30 +0000 (09:13 -0500)]
WHATS_NEW: include recent changes

8 years agovgreduce: use process_each_vg
David Teigland [Wed, 25 May 2016 20:04:30 +0000 (15:04 -0500)]
vgreduce: use process_each_vg

8 years agolvconvert: use process_each_lv
David Teigland [Mon, 23 May 2016 18:42:17 +0000 (13:42 -0500)]
lvconvert: use process_each_lv

In the same way that process_each_vg() can be passed
a single VG name to process, also allow process_each_lv()
to be passed a single VG name and LV name to process.

8 years agoraid: Revert _lv_extend_layered_lv non-raid0 area_multiple.
Alasdair G Kergon [Tue, 24 May 2016 13:27:05 +0000 (14:27 +0100)]
raid: Revert _lv_extend_layered_lv non-raid0 area_multiple.

8 years agorefactor: split _report fn further into init and config part
Peter Rajnoha [Mon, 23 May 2016 09:18:50 +0000 (11:18 +0200)]
refactor: split _report fn further into init and config part

8 years agometadata: Tidy merge.c
Alasdair G Kergon [Mon, 23 May 2016 23:57:48 +0000 (00:57 +0100)]
metadata: Tidy merge.c

8 years agoraid10: Fix new use of area multiple calc.
Alasdair G Kergon [Mon, 23 May 2016 23:41:09 +0000 (00:41 +0100)]
raid10: Fix new use of area multiple calc.

8 years agoraid0: Standardise meta_areas checks before access.
Alasdair G Kergon [Mon, 23 May 2016 21:55:13 +0000 (22:55 +0100)]
raid0: Standardise meta_areas checks before access.

8 years agotest: lvmetad-disabled
David Teigland [Thu, 5 May 2016 20:44:27 +0000 (15:44 -0500)]
test: lvmetad-disabled

8 years agotest: lvmetad-pvscan-filter
David Teigland [Thu, 5 May 2016 20:16:38 +0000 (15:16 -0500)]
test: lvmetad-pvscan-filter

update for pvscan changes

8 years agopvscan: use process_each_vg for autoactivate
David Teigland [Thu, 28 Apr 2016 14:37:03 +0000 (09:37 -0500)]
pvscan: use process_each_vg for autoactivate

This refactors the code for autoactivation.  Previously,
as each PV was found, it would be sent to lvmetad, and
the VG would be autoactivated using a non-standard VG
processing function (the "activation_handler") called via
a function pointer from within the lvmetad notification path.

Now, any scanning that the command needs to do (scanning
only the named device args, or scanning all devices when
there are no args), is done first, before any activation
is attempted.  During the scans, the VG names are saved.
After scanning is complete, process_each_vg is used to do
autoactivation of the saved VG names.  This makes pvscan
activation much more similar to activation done with
vgchange or lvchange.

The separate autoactivate phase also means that if lvmetad
is disabled (either before or during the scan), the command
can continue with the activation step by simply not using
lvmetad and reverting to disk scanning to do the
activation.

8 years agotoollib: add vg name list arg to process_each_vg
David Teigland [Thu, 28 Apr 2016 21:18:20 +0000 (16:18 -0500)]
toollib: add vg name list arg to process_each_vg

8 years agoraid0: Add raid0 segment type.
Alasdair G Kergon [Mon, 23 May 2016 15:46:38 +0000 (16:46 +0100)]
raid0: Add raid0 segment type.

This remains experimental and quite restrictive so should only be used
for testing at this stage.  (E.g. lvreduce is not supported.)

8 years agotools: improve error message about VG name and select
David Teigland [Thu, 19 May 2016 20:06:56 +0000 (15:06 -0500)]
tools: improve error message about VG name and select

8 years agotests: test change of cache mode
Zdenek Kabelac [Thu, 19 May 2016 16:21:07 +0000 (18:21 +0200)]
tests: test change of cache mode

8 years agodebug: use display_lvname
Zdenek Kabelac [Wed, 18 May 2016 13:22:26 +0000 (15:22 +0200)]
debug: use display_lvname

Add some tracing message

8 years agolvchange: allow change of cache mode
Zdenek Kabelac [Mon, 25 Apr 2016 11:39:30 +0000 (13:39 +0200)]
lvchange: allow change of cache mode

Add support for active cache LV.
Handle --cachemode args validation during command line processing.
Rework some lvm2 internal to use lvm2 defined  CACHE_MODE  enums
indepently on libdm defines and use enum around the code instead
of passing and comparing strings.

8 years agolibdm: trace missing settings
Zdenek Kabelac [Wed, 18 May 2016 13:23:08 +0000 (15:23 +0200)]
libdm: trace missing settings

These settings have been missed in very verbose log.

8 years agolibdm: cache status reports passthrough cache mode
Zdenek Kabelac [Thu, 19 May 2016 16:20:11 +0000 (18:20 +0200)]
libdm: cache status reports passthrough cache mode

Report passthrough mode instead of 'Unknown feature'.

8 years agoWHATS_NEW: include recent changes
David Teigland [Wed, 18 May 2016 14:20:37 +0000 (09:20 -0500)]
WHATS_NEW: include recent changes

8 years agolvm2_activation_generator: don't create full context for liblvm2app
David Teigland [Tue, 17 May 2016 17:03:25 +0000 (12:03 -0500)]
lvm2_activation_generator: don't create full context for liblvm2app

Don't use lvm_init() to create a full command context, which
does a lot of command setup (like connecting to daemons), which
is unnecessary for simply reading a value from lvm.conf.

Passing a NULL context arg to the lvm_config_ function is now
allowed, in which case lvm.conf is read without doing lvm
command setup.

8 years agoliblvm: allow config settings to be read without full lvm cmd
David Teigland [Tue, 17 May 2016 16:54:13 +0000 (11:54 -0500)]
liblvm: allow config settings to be read without full lvm cmd

A program may be using liblvm2app for simply checking a config
setting in lvm.conf.  In this case, a full lvm context is not
needed, only cmd->cft (which are the config settings read from
lvm.conf).

lvm_config_find_bool() can now be passed a NULL lvm context
in which case it will only create cmd->cft, check the config
setting asked for, and destroy the cmd.

8 years agopvremove: allow clearing a duplicate PV
David Teigland [Thu, 12 May 2016 21:19:57 +0000 (16:19 -0500)]
pvremove: allow clearing a duplicate PV

Add a special case to allow modifying a duplicate PV
to erase it with pvremove -ff.

8 years agolvmetad: remove old thread locking
David Teigland [Tue, 10 May 2016 19:54:32 +0000 (14:54 -0500)]
lvmetad: remove old thread locking

The old thread locking is very fine grained and complex,
and appears to have no concurrency advantage.

8 years agolvmetad: add request level thread locking
David Teigland [Tue, 10 May 2016 19:42:26 +0000 (14:42 -0500)]
lvmetad: add request level thread locking

Use an rwlock for requests that read/write cache state.
Use a mutex for requests that read/write global info.

8 years agopython: move lvm_init
David Teigland [Wed, 11 May 2016 18:42:00 +0000 (13:42 -0500)]
python: move lvm_init

Only call lvm_init() when it's needed so that simply
loading the lvm python code in another program doesn't
make that program do lvm initialization.

The version call doesn't need a handle.

The garbage collection can just do lvm_quit to destroy
the command.  The next call that needs lvm_init will
do it first.

8 years agopost-release
Alasdair G Kergon [Sat, 14 May 2016 01:12:23 +0000 (02:12 +0100)]
post-release

8 years agopre-release v2_02_154
Alasdair G Kergon [Sat, 14 May 2016 00:57:42 +0000 (01:57 +0100)]
pre-release

8 years agolib: fix init error handling
David Teigland [Thu, 12 May 2016 18:00:33 +0000 (13:00 -0500)]
lib: fix init error handling

When setting up a toolcontext, the lib init function
was detecting an error when there was none, and then
it was returning an incompletely initialized cmd struct
instead of NULL.  The effect was that the lib would try
to use the uninitialized cmd struct and segfault.
This would happen if a non-fatal error occurred during
cmd setup, e.g. user permission failed on lvmetad socket,
causing cmd to fall back to scanning and not use lvmetad.

The only real error condition is when create_toolcontext
returns NULL.  If cmd is returned, the lib can use it.

8 years agolvmetad: Fix client error when socket access fails.
Alasdair G Kergon [Thu, 12 May 2016 00:54:09 +0000 (01:54 +0100)]
lvmetad: Fix client error when socket access fails.

8 years agolibdm: Show lib vsn even if driver vsn unavailable.
Alasdair G Kergon [Thu, 12 May 2016 00:14:25 +0000 (01:14 +0100)]
libdm: Show lib vsn even if driver vsn unavailable.

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.

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