]> sourceware.org Git - lvm2.git/log
lvm2.git
9 years agoman: lvmthin section about use-policies
David Teigland [Wed, 29 Apr 2015 15:00:38 +0000 (10:00 -0500)]
man: lvmthin section about use-policies

9 years agoman: 'lvmconfig' is preferred over 'lvm config'
David Teigland [Wed, 29 Apr 2015 15:13:13 +0000 (10:13 -0500)]
man: 'lvmconfig' is preferred over 'lvm config'

9 years agoWHATS_NEW: commit e0a62b8fdc8d041c14ca523643e319
Ondrej Kozina [Wed, 29 Apr 2015 15:04:39 +0000 (17:04 +0200)]
WHATS_NEW: commit  e0a62b8fdc8d041c14ca523643e319

9 years agolibdaemon: introduce support for exit on idle
Ondrej Kozina [Wed, 29 Apr 2015 14:59:30 +0000 (16:59 +0200)]
libdaemon: introduce support for exit on idle

works with systemd activated daemons only as of now

each daemon implementation may decide to signalize its
internal idle state (i.e. all background tasks unrelated to
client threads are finished)

9 years agotoollib: code cleanup in lv_spawn_background_polling
Ondrej Kozina [Wed, 29 Apr 2015 14:25:50 +0000 (16:25 +0200)]
toollib: code cleanup in lv_spawn_background_polling

we're going to extract parameters from lv_mirr later
with code refactoring of polldaemon

9 years agoman: 'lvm config' is preferred over 'lvm lvmconfig'
David Teigland [Wed, 29 Apr 2015 15:04:28 +0000 (10:04 -0500)]
man: 'lvm config' is preferred over 'lvm lvmconfig'

9 years agocleanup: lvmconfig man page typo
Peter Rajnoha [Wed, 29 Apr 2015 14:35:49 +0000 (16:35 +0200)]
cleanup: lvmconfig man page typo

9 years agoconfig: consolidate CFG_UNSUPPORTED and CFG_ADVANCED settings
Peter Rajnoha [Wed, 29 Apr 2015 14:07:52 +0000 (16:07 +0200)]
config: consolidate CFG_UNSUPPORTED and CFG_ADVANCED settings

These settings are in the "unsupported" group:

devices/loopfiles
log/activate_file
metadata/disk_areas (section)
metadata/disk_areas/<disk_area> (section)
metadata/disk_areas/<disk_area>/size
metadata/disk_areas/<disk_area>/id

These settings are in the "advanced" group:

devices/dir
devices/scan
devices/types
global/proc
activation/missing_stripe_filler
activation/mlock_filter
metadata/pvmetadatacopies
metadata/pvmetadataignore
metadata/stripesize
metadata/dirs

Also, this patch causes the --ignoreunsupported and --ignoreadvanced
switches to be honoured for all config types (lvmconfig --type).

By default, the --type current and --type diff display unsupported
settings, the other types ignore them - this patch also introduces
--showunsupported switch for all these other types to display even
unsupported settings in their output if needed.

9 years agotests: minimize teardown when uneeded
Zdenek Kabelac [Wed, 29 Apr 2015 11:37:13 +0000 (13:37 +0200)]
tests: minimize teardown when uneeded

If test has not yet initilized any device,
make teardown a bit faster.

9 years agotests: bash-fu for lvmconf
Zdenek Kabelac [Wed, 29 Apr 2015 10:26:12 +0000 (12:26 +0200)]
tests: bash-fu for lvmconf

Sqeeze about 0.1s out of every created conf and use internal
bash associative arrays instead of lot of command forking

9 years agolvmetad: drop unused vars
Zdenek Kabelac [Wed, 29 Apr 2015 13:00:33 +0000 (15:00 +0200)]
lvmetad: drop unused vars

Squash some unused vars introduced in some previous commit.s

9 years agopython: python 3 compat patch for lvm2
bkabrda@redhat.com [Tue, 2 Sep 2014 13:42:01 +0000 (15:42 +0200)]
python: python 3 compat patch for lvm2

As provided by rhbz: 1136366

9 years agolvmetad: Avoid duplicate entries in the list of alternate devices.
Petr Rockai [Wed, 22 Apr 2015 23:39:39 +0000 (01:39 +0200)]
lvmetad: Avoid duplicate entries in the list of alternate devices.

9 years agolvmconfig: add --type list and -l|--list
Peter Rajnoha [Wed, 29 Apr 2015 09:11:58 +0000 (11:11 +0200)]
lvmconfig: add --type list and -l|--list

lvmconfig --type list displays plain list of configuration settings.
Some of the existing decorations can be used (--withsummary and
--withversions) as well as existing options/switches (--ignoreadvanced,
--ignoreunsupported, --ignorelocal, --atversion).

For example (displaying only "config" section so the list is not long):

$lvmconfig --type list config
config/checks
config/abort_on_errors
config/profile_dir

$ lvmconfig --type list --withsummary config
config/checks - If enabled, any LVM configuration mismatch is reported.
config/abort_on_errors - Abort the LVM process if a configuration mismatch is found.
config/profile_dir - Directory where LVM looks for configuration profiles.

$ lvmconfig -l config
config/checks - If enabled, any LVM configuration mismatch is reported.
config/abort_on_errors - Abort the LVM process if a configuration mismatch is found.
config/profile_dir - Directory where LVM looks for configuration profiles.

$ lvmconfig --type list --withsummary --withversions config
config/checks - If enabled, any LVM configuration mismatch is reported. [2.2.99]
config/abort_on_errors - Abort the LVM process if a configuration mismatch is found. [2.2.99]
config/profile_dir - Directory where LVM looks for configuration profiles. [2.2.99]

Example with --atversion (displaying global section):

$ lvmconfig --type list global
global/umask
global/test
global/units
global/si_unit_consistency
global/suffix
global/activation
global/fallback_to_lvm1
global/format
global/format_libraries
global/segment_libraries
global/proc
global/etc
global/locking_type
global/wait_for_locks
global/fallback_to_clustered_locking
global/fallback_to_local_locking
global/locking_dir
global/prioritise_write_locks
global/library_dir
global/locking_library
global/abort_on_internal_errors
global/detect_internal_vg_cache_corruption
global/metadata_read_only
global/mirror_segtype_default
global/raid10_segtype_default
global/sparse_segtype_default
global/lvdisplay_shows_full_device_path
global/use_lvmetad
global/thin_check_executable
global/thin_dump_executable
global/thin_repair_executable
global/thin_check_options
global/thin_repair_options
global/thin_disabled_features
global/cache_check_executable
global/cache_dump_executable
global/cache_repair_executable
global/cache_check_options
global/cache_repair_options
global/system_id_source
global/system_id_file

$ lvmconfig --type list global --atversion 2.2.50
global/umask
global/test
global/units
global/suffix
global/activation
global/fallback_to_lvm1
global/format
global/format_libraries
global/segment_libraries
global/proc
global/locking_type
global/wait_for_locks
global/fallback_to_clustered_locking
global/fallback_to_local_locking
global/locking_dir
global/library_dir
global/locking_library

9 years agorefactor: dumpconfig: keep --withcomments to display full comment and use --withsumma...
Peter Rajnoha [Wed, 29 Apr 2015 08:53:25 +0000 (10:53 +0200)]
refactor: dumpconfig: keep --withcomments to display full comment and use --withsummary for one line summary

9 years agopolldaemon: remove redundant log messages
Ondrej Kozina [Tue, 14 Apr 2015 12:43:16 +0000 (14:43 +0200)]
polldaemon: remove redundant log messages

also alter comments describing the change in _poll_vg
wrt correct handling of multiple LVs

9 years agopvmove: make log messages more comprehensible
Ondrej Kozina [Thu, 16 Apr 2015 15:40:53 +0000 (17:40 +0200)]
pvmove: make log messages more comprehensible

clarify messages printed during pvmove set up (in
_update_metadata fn) and subsequent metadata updates
during a segment progression

9 years agoupdate copyright info in various files
Ondrej Kozina [Thu, 16 Apr 2015 15:31:07 +0000 (17:31 +0200)]
update copyright info in various files

basically transfer former date ranges from files where
the code originated from (pvmove.c and lvconvert.c)

9 years agotests: try harder to kill all dangling procs
Ondrej Kozina [Tue, 28 Apr 2015 13:31:47 +0000 (15:31 +0200)]
tests: try harder to kill all dangling procs

also simplify and make less prone to an error checks
for running bg processes inside a pvmove-resume tests

9 years agotests: simplify removal of dangling bg procs
Ondrej Kozina [Mon, 27 Apr 2015 08:33:45 +0000 (10:33 +0200)]
tests: simplify removal of dangling bg procs

some tests left dangling bg processes originating in
lvm2 commands being able to spawn any bg polling process
(lvchange, vgchange, pvmove, lvconvert...)

Initial fn 'add_to_kill_list' should collect processes with
specific parameters (proc's command line and parent processes ID).
After testing finishes the fn kill_listed_processes should remove these
listed by 'add_to_kill_list'.

Unfortunately it proved to be prone to an error especially in scenarios
where cmd line of initiating command contained characters required to
be espaced before passing to shell script to make it work correctly.
(Or if cmd spawned more than one bg process with same cmd line. i.e.:
vgchange or lvchange).

The new implementation is much simpler. It uses env. variable (LVM_TEST_TAG)
for marking a process desired to be killed later or during test env. teardown.
(i.e.: LVM_TEST_TAG=kill_me_$PREFIX to kill only processes related to
current test environment)

9 years agoconfig: Introduce lvmconfig.
Alasdair G Kergon [Tue, 28 Apr 2015 16:00:37 +0000 (17:00 +0100)]
config: Introduce lvmconfig.

'lvm dumpconfig' now does a lot more than just dumping configuration
information and is no longer only a support tool.  Users now need
to run it to find out about configuration information that has been
removed from the lvm.conf man page so we need to promote this to full
command line status as 'lvmconfig'.  Also accept 'lvm config' and mention
it in the usage information of lvmconf (which should also get merged in
eventually).

9 years agodevices: improve handling of duplicate PVs
David Teigland [Fri, 24 Apr 2015 19:58:58 +0000 (14:58 -0500)]
devices: improve handling of duplicate PVs

Example:

/dev/loop0 and /dev/loop1 are duplicates,
created by copying one backing file to the
other.

'identity /dev/loopX' creates an identity
mapping for loopX named idmloopX, which
adds a duplicate for the named device.

The duplicate selection code for lvmetad is
incomplete, and lvmetad is disabled for this
example.

[~]# losetup -f loopfile0
[~]# pvs
  PV         VG           Fmt  Attr PSize   PFree
  /dev/loop0 foo          lvm2 a--  308.00m 296.00m

[~]# losetup -f loopfile1
[~]# pvs
  Found duplicate PV LnSOEqzEYED3RvIOa5PZP2s7uyuBLmAV: using /dev/loop1 not /dev/loop0
  Using duplicate PV /dev/loop1 which is more recent, replacing /dev/loop0
  PV         VG           Fmt  Attr PSize   PFree
  /dev/loop1 foo          lvm2 a--  308.00m 308.00m

[~]# ./identity /dev/loop0
[~]# pvs
  Found duplicate PV LnSOEqzEYED3RvIOa5PZP2s7uyuBLmAV: using /dev/loop1 not /dev/loop0
  Using duplicate PV /dev/loop1 without holders, replacing /dev/loop0
  Found duplicate PV LnSOEqzEYED3RvIOa5PZP2s7uyuBLmAV: using /dev/mapper/idmloop0 not /dev/loop1
  Using duplicate PV /dev/mapper/idmloop0 from subsystem DM, replacing /dev/loop1
  PV                   VG           Fmt  Attr PSize   PFree
  /dev/mapper/idmloop0 foo          lvm2 a--  308.00m 296.00m

[~]# ./identity /dev/loop1
[~]# pvs
  WARNING: duplicate PV LnSOEqzEYED3RvIOa5PZP2s7uyuBLmAV is being used from both devices /dev/loop0 and /dev/loop1
  Found duplicate PV LnSOEqzEYED3RvIOa5PZP2s7uyuBLmAV: using /dev/loop1 not /dev/loop0
  Using duplicate PV /dev/loop1 which is more recent, replacing /dev/loop0
  Found duplicate PV LnSOEqzEYED3RvIOa5PZP2s7uyuBLmAV: using /dev/mapper/idmloop0 not /dev/loop1
  Using duplicate PV /dev/mapper/idmloop0 from subsystem DM, replacing /dev/loop1
  Found duplicate PV LnSOEqzEYED3RvIOa5PZP2s7uyuBLmAV: using /dev/mapper/idmloop1 not /dev/mapper/idmloop0
  Using duplicate PV /dev/mapper/idmloop1 which is more recent, replacing /dev/mapper/idmloop0
  PV                   VG           Fmt  Attr PSize   PFree
  /dev/mapper/idmloop1 foo          lvm2 a--  308.00m 308.00m

9 years agoconfig: improve the description of options lists
David Teigland [Tue, 28 Apr 2015 15:06:23 +0000 (10:06 -0500)]
config: improve the description of options lists

Describe
thin_check_options, thin_repair_options,
cache_check_option, scache_repair_options

as a "list of options", rather than a "string of options"
because a single string, e.g. "-q --clear-needs-check-flag"
does not work, and needs to be entered as a list,
e.g. ["-q", "--clear-needs-check-flag"]

9 years agoconfig: also evaluate default unconfigured values in runtime for 'cfg_runtime' settings
Peter Rajnoha [Tue, 28 Apr 2015 13:29:08 +0000 (15:29 +0200)]
config: also evaluate default unconfigured values in runtime for 'cfg_runtime' settings

The settings which have their default value evaluated in runtime should
have their 'unconfigured' counterparts also evaluated in runtime since
those values can be constructed by using other settings.

For example, before this patch:

$ lvm dumpconfig --type default --unconfigured devices/cache_dir devices/cache
cache_dir="@DEFAULT_SYS_DIR@/@DEFAULT_CACHE_SUBDIR@"
cache="/etc/lvm/cache/.cache

With this patch applied:

$ lvm dumpconfig --type default --unconfigured devices/cache_dir devices/cache
cache_dir="@DEFAULT_SYS_DIR@/@DEFAULT_CACHE_SUBDIR@"
cache="@DEFAULT_SYS_DIR@/@DEFAULT_CACHE_SUBDIR@/.cache"

9 years agoconfig: make it possible to set default unconfigured_value for settings of all types...
Peter Rajnoha [Tue, 28 Apr 2015 11:50:23 +0000 (13:50 +0200)]
config: make it possible to set default unconfigured_value for settings of all types, not just strings

The @something@ used for unconfigured default value is not bound to
CFG_TYPE_STRING settings defined in config_settings.h, it can be
used for any other config type too.

9 years agorefactor: rename struct cfg_def_item's 'unconfigured_path' to 'unconfigured_value'
Peter Rajnoha [Tue, 28 Apr 2015 11:29:18 +0000 (13:29 +0200)]
refactor: rename struct cfg_def_item's 'unconfigured_path' to 'unconfigured_value'

It's not only path that can be used for setting's default value
in unconfigured form as @something@.

9 years agoconf: Avoid temp files when generating config.
Alasdair G Kergon [Tue, 28 Apr 2015 12:02:19 +0000 (13:02 +0100)]
conf: Avoid temp files when generating config.

9 years agotests: more help#
Zdenek Kabelac [Tue, 28 Apr 2015 09:35:56 +0000 (11:35 +0200)]
tests: more help#

9 years agotests: always zero disk header
Zdenek Kabelac [Tue, 28 Apr 2015 09:32:52 +0000 (11:32 +0200)]
tests: always zero disk header

It appear that older wipefs doesn't wipe partition table.
So ensure there is no partition on LVM_TEST_BACKING_DEVICE.

9 years agotests: more descriptive aux
Zdenek Kabelac [Mon, 27 Apr 2015 15:45:10 +0000 (17:45 +0200)]
tests: more descriptive aux

Tell what's reason of aux fail here.

9 years agotests: drop debug test
Zdenek Kabelac [Mon, 27 Apr 2015 15:44:29 +0000 (17:44 +0200)]
tests: drop debug test

Remove 'debug leftover' from test.

9 years agoexample.conf.in: regenerate
David Teigland [Mon, 27 Apr 2015 19:15:24 +0000 (14:15 -0500)]
example.conf.in: regenerate

From recent config_settings.h changes.

9 years agoconfig: fix a couple mistakes with defaults
David Teigland [Mon, 27 Apr 2015 18:17:15 +0000 (13:17 -0500)]
config: fix a couple mistakes with defaults

for archive, archive_dir, and cache

9 years agotests: use new help in aux
Zdenek Kabelac [Fri, 24 Apr 2015 22:38:06 +0000 (00:38 +0200)]
tests: use new help in aux

Simplify tests and use aux mdadm helpers.

9 years agotests: aux for mdadm
Zdenek Kabelac [Fri, 24 Apr 2015 22:37:27 +0000 (00:37 +0200)]
tests: aux for mdadm

Implement aux helper fce for mdadm.

9 years agotests: allow add printable skip message
Zdenek Kabelac [Fri, 24 Apr 2015 18:32:21 +0000 (20:32 +0200)]
tests: allow add printable skip message

9 years agotests: check sysfs more generically
Zdenek Kabelac [Fri, 24 Apr 2015 18:31:22 +0000 (20:31 +0200)]
tests: check sysfs more generically

Allow to access more files in device sysfs subtree.

9 years agotests: add double quotes around add_to_kill_list parms
Ondrej Kozina [Fri, 24 Apr 2015 09:42:26 +0000 (11:42 +0200)]
tests: add double quotes around add_to_kill_list parms

9 years agotests: try more advanced clean
Zdenek Kabelac [Fri, 24 Apr 2015 09:12:55 +0000 (11:12 +0200)]
tests: try more advanced clean

When test is executed on real device - lets try a more complete
cleanup - discard whole device first and try to wipe any
headers it might be left from previous test.

9 years agocleanup: ancestors -> lv_ancestors, descendants -> lv_descendants
Peter Rajnoha [Fri, 24 Apr 2015 12:19:23 +0000 (14:19 +0200)]
cleanup: ancestors -> lv_ancestors, descendants -> lv_descendants

Use "lv_" prefix as they're LV fields.

9 years agoreport: add lv_ancestors and lv_descendants reporting fields
Peter Rajnoha [Fri, 24 Apr 2015 09:51:52 +0000 (11:51 +0200)]
report: add lv_ancestors and lv_descendants reporting fields

Show full chain of ancestors and descendants for snapshots
(both thick and thin - in case of thick, the "ancestor" field
is actually equal to "origin" field as snapshots can't be
chained for thick snapshots).

These fields display current state as it is, they do not
display any history! If the snapshot chain is broken in
the middle, we don't report the historical origin (this
is going to be a part of another patch and a different
set of fields or just a switch for existing fields to
show ancestors and descendants with history included).

For example:

(origin --> snapshot)

lvol1 --> lvol2 --> lvol3 --> lvol4
              \
                --> lvol5 --> lvol6 --> lvol7 --> lvol8

$ lvs -o name,pool_lv,origin,ancestors,descendants vg
  LV    Pool Origin Ancestors                     Descendants
  lvol1 pool                                      lvol2,lvol3,lvol4,lvol5,lvol6,lvol7,lvol8
  lvol2 pool lvol1  lvol1                         lvol3,lvol4,lvol5,lvol6,lvol7,lvol8
  lvol3 pool lvol2  lvol2,lvol1                   lvol4
  lvol4 pool lvol3  lvol3,lvol2,lvol1
  lvol5 pool lvol2  lvol2,lvol1                   lvol6,lvol7,lvol8
  lvol6 pool lvol5  lvol5,lvol2,lvol1             lvol7,lvol8
  lvol7 pool lvol6  lvol6,lvol5,lvol2,lvol1       lvol8
  lvol8 pool lvol7  lvol7,lvol6,lvol5,lvol2,lvol1

9 years agoselect: fix matching reserved values while <,<=,>,>= is used in selection criteria
Peter Rajnoha [Fri, 24 Apr 2015 07:47:25 +0000 (09:47 +0200)]
select: fix matching reserved values while <,<=,>,>= is used in selection criteria

Scenario:

$ vgs -o+vg_mda_copies
  VG     #PV #LV #SN Attr   VSize VFree #VMdaCps
  fedora   1   2   0 wz--n- 9.51g    0  unmanaged
  vg      16   9   0 wz--n- 1.94g 1.83g         2

$ lvs -o+read_ahead vg/lvol6 vg/lvol7
  LV    VG   Attr       LSize Pool Origin Data%  Rahead
  lvol6 vg   Vwi-a-tz-- 1.00g pool lvol5  0.00      auto
  lvol7 vg   Vwi---tz-k 1.00g pool lvol6         256.00k

Before this patch:

$vgs -o vg_name,vg_mda_copies -S 'vg_mda_copies < unmanaged'
  VG   #VMdaCps
  vg          2

Problem:
Reserved values can be only used with exact match = or !=, not <,<=,>,>=.
In the example above, the "unamanaged" is internally represented as
18446744073709551615, but this should be ignored while not comparing
field directly with "unmanaged" reserved name with = or !=. Users
should not be aware of this internal mapping of the reserved value
name to its internal value and hence it doesn't make sense for such
reserved value to take place in results of <,<=,> and >=.
There's no order defined for reserved values!!! It's a special
*reserved* value that is taken out of the usual value range
of that type.

This is very similar to what we have already fixed with
2f7f6932dcd450ba75fe590aba8c09838d2618dc, but it's the other way round
now - we're using reserved value name in selection criteria now
(in the patch 2f7f693, we had concrete value and we compared it
with the reserved value). So this patch completes patch 2f7f693.

This patch also fixes this problem:

$ lvs -o+read_ahead vg/lvol6 vg/lvol7 -S 'read_ahead > 32k'
  LV    VG   Attr       LSize Pool Origin Data%  Rahead
  lvol6 vg   Vwi-a-tz-- 1.00g pool lvol5  0.00      auto
  lvol7 vg   Vwi---tz-k 1.00g pool lvol6         256.00k

Problem:
In the example above, the internal reserved value "auto" is in the
range of selection "> 32k" - it shouldn't match as well. Here the
"auto" is internally represented as MAX_DBL and of course, numerically,
MAX_DBL > 256k. But for users, the reserved value should be uncomparable
to any number so the mapping of the reserved value name to its interna
 value is transparent to users. Again, there's no order defined for
reserved values and hence it should never match if using <,<=,>,>=
operators.

This is actually exactly the same problem as already described in
2f7f6932dcd450ba75fe590aba8c09838d2618dc, but that patch failed for
size field types because of incorrect internal representation used.

With this patch applied, both problematic scenarios mentioned
above are fixed now:

$ vgs -o vg_name,vg_mda_copies -S 'vg_mda_copies < unmanaged'
(blank)

$ lvs -o+read_ahead vg/lvol6 vg/lvol7 -S 'read_ahead > 32k'
  LV    VG   Attr       LSize Pool Origin Rahead
  lvol7 vg   Vwi---tz-k 1.00g pool lvol6  256.00k

9 years agotests: fix md raid test on real /dev
Zdenek Kabelac [Thu, 23 Apr 2015 18:26:19 +0000 (20:26 +0200)]
tests: fix md raid test on real /dev

Zero raid signatures when raid is stopped - so signatures
are not requiring wipe when pvcreate follows.

Handle real /dev

9 years agolibdm: Add uuid/devno to ioctl failure log message.
Alasdair G Kergon [Thu, 23 Apr 2015 18:26:52 +0000 (19:26 +0100)]
libdm: Add uuid/devno to ioctl failure log message.

9 years agolibdm: Add DM_INTERNAL_SUSPEND_FLAG.
Alasdair G Kergon [Thu, 23 Apr 2015 17:39:04 +0000 (18:39 +0100)]
libdm: Add DM_INTERNAL_SUSPEND_FLAG.

Still needs to be reported by dmsetup.

9 years agoconfig: fix check_options array
David Teigland [Thu, 23 Apr 2015 15:35:34 +0000 (10:35 -0500)]
config: fix check_options array

The code used it as both a single string, and as
an array of strings in different places.  Fix it
so that it's an array of strings everywhere.

9 years agoconfig: thin_disabled_features default should be undefined
David Teigland [Thu, 23 Apr 2015 15:19:00 +0000 (10:19 -0500)]
config: thin_disabled_features default should be undefined

An array that's empty by default should be flagged as
undefined.

9 years agoImprove duplicate PV handling
David Teigland [Mon, 20 Apr 2015 19:13:50 +0000 (14:13 -0500)]
Improve duplicate PV handling

Make the processing of duplicate PVs the
same with and without lvmetad.

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

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

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

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

v4.0-9804-gdb4fd9c

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

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

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

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

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

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

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

DESTDIR already comes with '/'

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

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

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

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

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

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

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

Even on success remove debug.log here.

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

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

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

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

Some tests are checking functinality of lvm2 with mdadm.

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

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

thin_repair_options=""
cache_repair_options=""

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

Also regenerate lvm.conf.in.

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

These were created by 'make generate'.

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

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

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

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

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

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

- configure
  with options

- make
  creates tools/lvm

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

LVM_LOG_FILE_EPOCH

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

LVM_LOG_FILE_UNLINK_STATUS

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

API is still for now experimental to catch various issue.

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

add info for various commits, most significant were:

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

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

- pvmove: split pvmove_update_metadata function
  (65623b63a20a221b48dfd87455dc77f5ac0c6bf4)

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

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

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

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

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

fix regression introduced in 65623b63a20a221b48dfd87455dc77f5ac0c6bf4

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

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

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

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

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

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

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

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

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

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

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

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

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

Hide error message if pid is already away.

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

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

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

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

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

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

No tracing if test is skipped.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

This completes commit 7a4e27eee51e89a550bc55f78daea6d943293202.

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

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

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

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

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

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