]> sourceware.org Git - lvm2.git/log
lvm2.git
8 years agopre-release v2_02_164
Alasdair G Kergon [Mon, 15 Aug 2016 12:01:27 +0000 (13:01 +0100)]
pre-release

8 years agoconf: add comment about cfg_runtime
Peter Rajnoha [Mon, 15 Aug 2016 08:38:38 +0000 (10:38 +0200)]
conf: add comment about cfg_runtime

8 years agoraid_manip: pay attention to PVs listed on command line when allocating MetaLVs
Heinz Mauelshagen [Fri, 12 Aug 2016 22:20:01 +0000 (00:20 +0200)]
raid_manip: pay attention to PVs listed on command line when allocating MetaLVs

Adding MetaLVs to given DataLVs (e.g. raid0 -> raid0_meta takeover) wasn't
paying attention to any PVs listed on the lvconvert command line.

8 years agoraid_manip: add missing code avoiding MetaLV collocation on the same PV
Heinz Mauelshagen [Fri, 12 Aug 2016 20:46:57 +0000 (22:46 +0200)]
raid_manip: add missing code avoiding MetaLV collocation on the same PV

Adding MetaLVs to given DataLVs (e.g. raid0 -> raid0_meta takeover),
_avoid_pvs_with_other_images_of_lv() was missing code to prohibit
allocation when called with a just allocated MetaLV to prohibit
collaocation of the next allocated MetaLV on the same PV.

- resolves rhbz1366738

8 years agonotify: Fix hang with lvm shell & --enable-notify-dbus
Tony Asleson [Fri, 12 Aug 2016 19:31:06 +0000 (14:31 -0500)]
notify: Fix hang with lvm shell & --enable-notify-dbus

When lvm is compiled with --enable-notify-dbus and a user uses lvm
shell, after they issue 200+ commands the lvm shell will hang for
~30 seconds trying to notify the lvm dbus service that a change
has occurred.  This appears to be caused by resource exhaustion,
because the sockets used for dbus communication are not be closed.

8 years agolvcreate/lvconvert: fix validation of maximum mirrors/stripes
Heinz Mauelshagen [Fri, 12 Aug 2016 17:14:28 +0000 (19:14 +0200)]
lvcreate/lvconvert: fix validation of maximum mirrors/stripes

Enforce mirror/raid0/1/10/4/5/6 type specific maximum images when
creating LVs or converting them from mirror <-> raid1.

Document those maxima in the lvcreate/lvconvert man pages.

- resolves rhbz1366060

8 years agoraid: Avoid double suffix on rmeta LV name paired with rimage LV.
Alasdair G Kergon [Thu, 11 Aug 2016 22:31:49 +0000 (23:31 +0100)]
raid: Avoid double suffix on rmeta LV name paired with rimage LV.

8 years agospec: Add new files
Marian Csontos [Thu, 11 Aug 2016 12:10:24 +0000 (14:10 +0200)]
spec: Add new files

8 years agolvmcmdline: use long int for number returned by strtol
Peter Rajnoha [Wed, 10 Aug 2016 07:10:28 +0000 (09:10 +0200)]
lvmcmdline: use long int for number returned by strtol

8 years agopost-release
Alasdair G Kergon [Wed, 10 Aug 2016 02:01:55 +0000 (03:01 +0100)]
post-release

8 years agopre-release v2_02_163
Alasdair G Kergon [Wed, 10 Aug 2016 01:42:35 +0000 (02:42 +0100)]
pre-release

8 years agoman: fix references to names for --configreport arg in pvs, vgs and lvs man page
Peter Rajnoha [Tue, 9 Aug 2016 15:55:34 +0000 (17:55 +0200)]
man: fix references to names for --configreport arg in pvs, vgs and lvs man page

8 years agoman: add lvm fullreport man page
Peter Rajnoha [Tue, 9 Aug 2016 15:53:32 +0000 (17:53 +0200)]
man: add lvm fullreport man page

8 years agoreport: add report_reset_cmdlog_seqnum and call it for each new cmd executed in lvm...
Peter Rajnoha [Mon, 8 Aug 2016 13:45:46 +0000 (15:45 +0200)]
report: add report_reset_cmdlog_seqnum and call it for each new cmd executed in lvm shell

8 years agoconf: mark selected settings with CFG_DISALLOW_INTERACTIVE flag
Peter Rajnoha [Mon, 8 Aug 2016 08:43:33 +0000 (10:43 +0200)]
conf: mark selected settings with CFG_DISALLOW_INTERACTIVE flag

8 years agoconfig: add support for CFG_DISALLOW_INTERACTIVE flag to mark settings as not suitabl...
Peter Rajnoha [Mon, 8 Aug 2016 08:43:18 +0000 (10:43 +0200)]
config: add support for CFG_DISALLOW_INTERACTIVE flag to mark settings as not suitable for override in interactive mode

Some settings are not suitable for override in interactive/shell
mode because such settings may confuse the code and it may end
up with unexpected behaviour. This is because of the fact that
once we're in the interactive/shell mode, we have already applied
some settings for the shell itself and we can't override them
further because we're already using those settings to drive the
interactive/shell mode. Such settings would get ignored silently
or, in worse case, they would mess up the existing configuration.

8 years agorefactor: modify original _check_profile fn and rename to config_force_check for...
Peter Rajnoha [Mon, 8 Aug 2016 10:55:15 +0000 (12:55 +0200)]
refactor: modify original _check_profile fn and rename to config_force_check for general use

8 years agoconf: add lvmdbusd.profile
Peter Rajnoha [Thu, 4 Aug 2016 16:16:21 +0000 (18:16 +0200)]
conf: add lvmdbusd.profile

8 years agolvm: shell: honor log/command_log_selection as default and reset to this value after...
Peter Rajnoha [Thu, 4 Aug 2016 16:15:54 +0000 (18:15 +0200)]
lvm: shell: honor log/command_log_selection as default and reset to this value after lastlog

8 years agolvmcmdline: profile: early profile load for lvm shell
Peter Rajnoha [Thu, 4 Aug 2016 14:45:27 +0000 (16:45 +0200)]
lvmcmdline: profile: early profile load for lvm shell

Make it possible to also load profile for lvm shell by honouring
LVM_COMMAND_PROFILE environment variable.

8 years agolvm: shell: extend log report to cover whole lvm shell's main loop
Peter Rajnoha [Thu, 4 Aug 2016 11:42:57 +0000 (13:42 +0200)]
lvm: shell: extend log report to cover whole lvm shell's main loop

When lvm commands are executed in lvm shell, we cover the whole lvm
command execution within this shell now. That means, all messages logged
and status caught during each command execution is now recorded in the
log report, including overall command's return code.

8 years agolibdm: report: add dm_report_group_output_and_pop_all
Peter Rajnoha [Thu, 4 Aug 2016 11:50:45 +0000 (13:50 +0200)]
libdm: report: add dm_report_group_output_and_pop_all

The dm_report_group_output_and_pop_all calls dm_report_output and
dm_report_group_pop for all the items that are currently in report
group. This is just a shortcut that makes it easier to output and
pop group's content so the group handle can be reused again without
a need to initialize and configure it again.

The functionality of dm_report_group_output_and_pop_all is the
same as dm_report_destroy but without destroying the report group
handle.

8 years agolibdm: report: postpone printing of JSON starting '{' character till it's needed
Peter Rajnoha [Thu, 4 Aug 2016 09:05:20 +0000 (11:05 +0200)]
libdm: report: postpone printing of JSON starting '{' character till it's needed

This patch moves printing of starting '{' character for JSON output up
untili it's known there's any further output following - either the
content or ending '}' character.

Also, remove unnecessary switch for different report group types and
calling individual functions to handle dm_report_group_create as that
code is shared for all existing types at the moment.

8 years agolibdm: report: add dm_report_destroy_rows
Peter Rajnoha [Thu, 4 Aug 2016 07:42:33 +0000 (09:42 +0200)]
libdm: report: add dm_report_destroy_rows

Calling dm_report_destroy_rows makes it possible to destroy any report
content we have but at the same time it doesn't destroy the report
handle itself, thus it's possible to reuse that handle again for new
report content.

Functionally, this is the same as calling dm_report_output with the
report handle but omitting the output iself. This functionality may
be useful if we, for whatever reason, need to discard the report
content and start a fresh new one but with the same report configuration
and initialization and thus we can just reuse the existing handle.

8 years agolvmcmdline: return 0/NULL if cmd->arg_values not set and arg_count/grouped_arg_count...
Peter Rajnoha [Thu, 4 Aug 2016 07:32:05 +0000 (09:32 +0200)]
lvmcmdline: return 0/NULL if cmd->arg_values not set and arg_count/grouped_arg_count/arg_value called

We may call arg_count/grouped_arg_count/arg_value soon enough that
cmd->arg_values is not set yet.

Normally, when running a command, we execute lvm_run_command which in
turn calls _process_command_line to allocate and parse the command line
values and stores them in cmd->arg_values.

However, if we run lvm shell, this one doesn't accept any command line
options and we parse the command line for each command that is executed
within the lvm shell then. If we used any code that tries to access
cmd->arg_values through any of the the arg handling functions too
early, we could end up with a segfault due to uninitialized (NULL)
cmd->arg_values.

This patch just saves extra checks in all the code where arg handling
may be called too early so that the cmd->arg_values is not set up yet.
This does not apply to any of existing code, but subsequent patches
will need that.

8 years agorefactor: move report grouping and log reporting handles from processing_handle to...
Peter Rajnoha [Wed, 3 Aug 2016 13:37:14 +0000 (15:37 +0200)]
refactor: move report grouping and log reporting handles from processing_handle to cmd_context

With patches that will follow, this will make it possible to widen log
report coverage when commands are executed from lvm shell so the amount
of messages that may end up in stderr/stdout instead of log report are
minimized.

8 years agoshell: also collect last command's return code for subsequent 'lastlog' invocation
Peter Rajnoha [Mon, 25 Jul 2016 10:20:22 +0000 (12:20 +0200)]
shell: also collect last command's return code for subsequent 'lastlog' invocation

Add new log_context=shell and with log_object_type=cmd and
log_object_name=<command_name> for command log report to collect
overall return code from last command (this is reported under
log_type=status).

8 years agolog: separate output and make it possible to use given FDs
Peter Rajnoha [Fri, 8 Jul 2016 14:47:51 +0000 (16:47 +0200)]
log: separate output and make it possible to use given FDs

Currently, the output is separated in 3 parts and each part can go into
a separate and user-defined file descriptor:

  - common output (stdout by default, customizable by LVM_OUT_FD environment variable)
  - error output (stderr by default, customizable by LVM_ERR_FD environment variable)
  - report output (stdout by default, customizable by LVM_REPORT_FD environment variable)

For example, each type of output goes to different output file:

  [0] fedora/~ # export LVM_REPORT_FD=3

  [0] fedora/~ # lvs fedora vg/abc 1>out 2>err 3>report

  [0] fedora/~ # cat out

  [0] fedora/~ # cat err
    Volume group "vg" not found
    Cannot process volume group vg

  [0] fedora/~ # cat report
    LV   VG     Attr       LSize   Layout     Role       CTime
    root fedora -wi-ao----  19.00g linear     public     Wed May 27 2015 08:09:21
    swap fedora -wi-ao---- 500.00m linear     public     Wed May 27 2015 08:09:21

Another example in LVM shell where the report goes to "report" file:

  [0] fedora/~ # export LVM_REPORT_FD=3
  [0] fedora/~ # lvm 3>report

  (in lvm shell)
  lvm> vgs

  (content of "report" file)
  [1] fedora/~ # cat report
    VG     #PV #LV #SN Attr   VSize  VFree
    fedora   1   2   0 wz--n- 19.49g    0

  (in lvm shell)
  lvm> lvs

  (content of "report" file)
  [1] fedora/~ # cat report
    VG     #PV #LV #SN Attr   VSize  VFree
    fedora   1   2   0 wz--n- 19.49g    0
    LV   VG     Attr       LSize   Layout     Role       CTime
    root fedora -wi-ao----  19.00g linear     public     Wed May 27 2015 08:09:21
    swap fedora -wi-ao---- 500.00m linear     public     Wed May 27 2015 08:09:21

8 years agotest: fix/enhance lvcreate-large-raid*.sh
Heinz Mauelshagen [Tue, 9 Aug 2016 16:16:01 +0000 (18:16 +0200)]
test: fix/enhance lvcreate-large-raid*.sh

Multi-step extend to even larger raid10 LV lvcreate-large-raid.sh.

Comment fixes.

8 years agotest: fix lvcreate-large-raid.sh
Heinz Mauelshagen [Tue, 9 Aug 2016 15:45:37 +0000 (17:45 +0200)]
test: fix lvcreate-large-raid.sh

RAID6 LVs may not be created with --nosync or data corruption
may occur in case of device failures.  The underlying MD raid6
personality used to drive the RaidLV performs read-modify-write
updates on stripes and thus relies on properly written parity
(P and Q Syndromes) during initial synchronization.

Once on it, enhance test to create/extend more and
larger RaidLVs and check sync/nosync status.

8 years agotest: add lvconvert-raid-takeover.sh
Heinz Mauelshagen [Tue, 9 Aug 2016 12:17:26 +0000 (14:17 +0200)]
test: add lvconvert-raid-takeover.sh

Commit 76ef2d15d839106adac4d82005d517be05a657eb introduced
raid0 <-> raid4 takeover and full mirror <-> raid1 support.

Add tests for these conversions.

Tests exposed a kernel semantics change freezing resynchronization
on conversions from raid0[_meta] -> raid4 or adding raid1 legs
because kernel kept the RAID mapped device in 'frozen' state unless
an 'idle' message was sent or the table was reloaded (kernel patch pending).

8 years agolvconvert: Fix repair and replace routing.
Alasdair G Kergon [Mon, 8 Aug 2016 22:13:34 +0000 (23:13 +0100)]
lvconvert: Fix repair and replace routing.

8 years agoman: explain deletion of 1st group member in dmstats.8.in
Bryn M. Reeves [Mon, 8 Aug 2016 18:29:12 +0000 (19:29 +0100)]
man: explain deletion of 1st group member in dmstats.8.in

Although the use of the first region_id in a group to store the
DMS_GROUP=... aux_data tag is an internal implementation detail,
it has a user visible consequence in that deleting this region will
cause the group to disappear: add an explanation of this to the
'group' command and 'Regions, areas, and groups' section.

8 years agoman: minor fixes to dmstats.8.in
Bryn M. Reeves [Mon, 8 Aug 2016 18:06:40 +0000 (19:06 +0100)]
man: minor fixes to dmstats.8.in

Remove obsolete reference to '--target'.

8 years agotest: Drop --mirrorlog when not a mirror.
Alasdair G Kergon [Mon, 8 Aug 2016 17:43:54 +0000 (18:43 +0100)]
test: Drop --mirrorlog when not a mirror.

8 years agolvconvert: separate type raid to mirror
David Teigland [Mon, 8 Aug 2016 15:37:24 +0000 (10:37 -0500)]
lvconvert: separate type raid to mirror

By the current division of unique operations,
converting type raid to type mirror is distinct
from converting type raid to raid.

8 years agoWHATS_NEW: reject --nosync option for RAID6 LVs in lvcreate
Heinz Mauelshagen [Mon, 8 Aug 2016 14:00:49 +0000 (16:00 +0200)]
WHATS_NEW: reject --nosync option for RAID6 LVs in lvcreate

8 years agolvconvert: Limit --corelog and --mirrorlog to mirrors.
Alasdair G Kergon [Mon, 8 Aug 2016 13:25:46 +0000 (14:25 +0100)]
lvconvert: Limit --corelog and --mirrorlog to mirrors.

It's an error to specify a log when the final result is not of type
mirror.

8 years agolvcreate: reject '--nosync' option for RAID6 LVs
Heinz Mauelshagen [Mon, 8 Aug 2016 11:52:35 +0000 (13:52 +0200)]
lvcreate: reject '--nosync' option for RAID6 LVs

The MD raid6 personality being used to drive lvm raid6 LVs does
read-modify-write updates to any stripes and thus relies on correct
P and Q Syndromes being written during initial synchronization or
it may fail reconstructing proper user data in case of SubLVs failing.

We may not allow the '--nosync' option on
creation of raid6 LVs for that reason.

Update/fix 'man lvcreate' in that regard.

add lvcreate-raid-nosync.sh test script.

- Resolves rhbz1358532

8 years agolvmcmdline: do not refresh whole cmd context if profile dropped after processing...
Peter Rajnoha [Mon, 8 Aug 2016 09:57:13 +0000 (11:57 +0200)]
lvmcmdline: do not refresh whole cmd context if profile dropped after processing LVM cmd

We don't need to refresh whole cmd context if we drop profile after
processing LVM command - just like we don't refresh cmd context when
we're applying the profile. It's because profiles contain only safe
subset of settings which do not require complete cmd context refresh.

This patch calls process_profilable_config instead of
refresh_toolcontext if there was profile applied for the LVM
command only, not --config which requires toolcontext refresh.
The process_profilable_config just sets proper values based on
values of profilable settings, but it does not do complete
reinitialization of various parts (e.g. filters, logging etc.).

8 years agolvconvert: Support raid0<->raid4 and mirror<->raid1.
Alasdair G Kergon [Sat, 6 Aug 2016 23:56:08 +0000 (00:56 +0100)]
lvconvert: Support raid0<->raid4 and mirror<->raid1.

Only simple takeover cases so far.

8 years agoraid: Report supported lvconvert conversions if invalid.
Alasdair G Kergon [Sat, 6 Aug 2016 23:30:26 +0000 (00:30 +0100)]
raid: Report supported lvconvert conversions if invalid.

8 years agoraid: Add workaround to prepare for raid4 conversions.
Alasdair G Kergon [Sat, 6 Aug 2016 23:07:06 +0000 (00:07 +0100)]
raid: Add workaround to prepare for raid4 conversions.

8 years agoraid: Pass list of LVs to remove into more fns.
Alasdair G Kergon [Sat, 6 Aug 2016 22:46:45 +0000 (23:46 +0100)]
raid: Pass list of LVs to remove into more fns.

8 years agoraid: Move two functions.
Alasdair G Kergon [Sat, 6 Aug 2016 22:29:27 +0000 (23:29 +0100)]
raid: Move two functions.

8 years agoWHATS_NEW: fixup order
Heinz Mauelshagen [Fri, 5 Aug 2016 14:31:46 +0000 (16:31 +0200)]
WHATS_NEW: fixup order

8 years agoraid_manip: fix log print format from commit d2c3b23e6dc3
Heinz Mauelshagen [Fri, 5 Aug 2016 14:29:56 +0000 (16:29 +0200)]
raid_manip: fix log print format from commit d2c3b23e6dc3

8 years agoWHATS_NEW: add '--rebuild PV' option to lvchange to allow for PV selective rebuilds
Heinz Mauelshagen [Fri, 5 Aug 2016 14:07:14 +0000 (16:07 +0200)]
WHATS_NEW: add '--rebuild PV' option to lvchange to allow for PV selective rebuilds

8 years agolvchange: Allow device specification when requesting a repair
Heinz Mauelshagen [Fri, 5 Aug 2016 13:54:49 +0000 (15:54 +0200)]
lvchange: Allow device specification when requesting a repair

'lvchange --resync LV' or 'lvchange --syncaction repair LV' request the
RAID layout specific parity blocks in raid4/5/6 to be recreated or the
mirrored blocks to be copied again from the master leg/copy for raid1/10,
thus not allowing a rebuild of a particular PV.

Introduce repeatable option '--[raid]rebuild PV' to allow to request
rebuilds of specific PVs in a RaidLV which are known to contain corrupt
data (e.g. rebuild a raid1 master leg).

Add test lvchange-rebuild-raid.sh to test/shell doing rebuild
variations on raid1/10 and 5; add aux function check_status_chars
to support the new test.

 - Resolves rhbz1064592

8 years agoraid: Tell lib whether stripesize was specified
Alasdair G Kergon [Fri, 5 Aug 2016 13:28:14 +0000 (14:28 +0100)]
raid: Tell lib whether stripesize was specified

8 years agoraid: Turn lv_raid_change_image_count into wrapper
Alasdair G Kergon [Fri, 5 Aug 2016 13:10:41 +0000 (14:10 +0100)]
raid: Turn lv_raid_change_image_count into wrapper

Eventually the separate entry point will disappear.

8 years agosegtypes: Further segtype macros.
Alasdair G Kergon [Fri, 5 Aug 2016 13:00:08 +0000 (14:00 +0100)]
segtypes: Further segtype macros.

8 years agoraid0: Validate presence of raid0 meta_areas more tightly.
Alasdair G Kergon [Thu, 4 Aug 2016 20:13:36 +0000 (21:13 +0100)]
raid0: Validate presence of raid0 meta_areas more tightly.

8 years agolvconvert: add FIXME
David Teigland [Thu, 4 Aug 2016 16:40:27 +0000 (11:40 -0500)]
lvconvert: add FIXME

operations are no longer identified correctly.

8 years agostriped: Add precise macros for original segtype.
Alasdair G Kergon [Thu, 4 Aug 2016 00:24:39 +0000 (01:24 +0100)]
striped: Add precise macros for original segtype.

The existing striped macros include raid0 segments.

8 years agolvconvert: Improve error message when no -m.
Alasdair G Kergon [Wed, 3 Aug 2016 22:31:50 +0000 (23:31 +0100)]
lvconvert: Improve error message when no -m.

8 years agoman: minor corrections in pvscan
David Teigland [Wed, 3 Aug 2016 20:49:43 +0000 (15:49 -0500)]
man: minor corrections in pvscan

8 years agoman: include info about disabled lvmetad
David Teigland [Wed, 3 Aug 2016 20:39:43 +0000 (15:39 -0500)]
man: include info about disabled lvmetad

8 years agolvconvert: Provide entry point for new functionality.
Alasdair G Kergon [Wed, 3 Aug 2016 02:53:29 +0000 (03:53 +0100)]
lvconvert: Provide entry point for new functionality.

Prepare for new segment type conversion functionality in cases that
currently fail.  In the short-term, we need to do this while limiting
the changes to the code paths for the conversions that are already
supported.

8 years agolvconvert: Pass region_size to lv_raid_convert.
Alasdair G Kergon [Tue, 2 Aug 2016 22:51:20 +0000 (23:51 +0100)]
lvconvert: Pass region_size to lv_raid_convert.

8 years agolvconvert: Preserve mirror region size with --repair.
Alasdair G Kergon [Tue, 2 Aug 2016 18:50:04 +0000 (19:50 +0100)]
lvconvert: Preserve mirror region size with --repair.

8 years agolvconvert: Divide into 12 categories.
Alasdair G Kergon [Tue, 2 Aug 2016 15:40:33 +0000 (16:40 +0100)]
lvconvert: Divide into 12 categories.

8 years agolvconvert: Treat --repair as an independent case.
Alasdair G Kergon [Tue, 2 Aug 2016 15:21:34 +0000 (16:21 +0100)]
lvconvert: Treat --repair as an independent case.

8 years agolvconvert: Forbid stripe parameters with --repair.
Alasdair G Kergon [Tue, 2 Aug 2016 14:57:45 +0000 (15:57 +0100)]
lvconvert: Forbid stripe parameters with --repair.

8 years agovg_validate: correct min_recovery_rate check message
Heinz Mauelshagen [Tue, 2 Aug 2016 13:27:13 +0000 (15:27 +0200)]
vg_validate: correct min_recovery_rate check message

8 years agovg_validate: new RAID segment checks in check_lv_segments()
Heinz Mauelshagen [Mon, 1 Aug 2016 20:42:05 +0000 (22:42 +0200)]
vg_validate: new RAID segment checks in check_lv_segments()
             introduced with commit 8f62b7bfe56c rely on complete
             defintions of the relations between the LVs of a VG.
             Hence only run these checks when the complete_vg flag
             is set on calls to check_lv_segments().

             lvconvert failed in test lvconvert-thin-raid.sh when
             calling check_lv_segments() from _read_segments() without
             providing a complete definition.

8 years agoRevert "thin: when converting a thin pool data or metadata LV from"
Alasdair G Kergon [Mon, 1 Aug 2016 14:17:44 +0000 (15:17 +0100)]
Revert "thin: when converting a thin pool data or metadata LV from"

This reverts commit 237f84e0383c7e3003050be7c072ee0a092fd426.

This case failed:
    lvcreate --type raid1 -m1 -l2 vg99
    lvcreate -aey -l2 -s vg99/lvol0
    lvconvert -m2 vg99/lvol0

8 years agolvconvert: Set lp->segtype in only one place.
Alasdair G Kergon [Sat, 30 Jul 2016 17:12:57 +0000 (18:12 +0100)]
lvconvert: Set lp->segtype in only one place.

8 years agolvconvert: Rely upon lp->thin and lp->cache.
Alasdair G Kergon [Sat, 30 Jul 2016 14:56:17 +0000 (15:56 +0100)]
lvconvert: Rely upon lp->thin and lp->cache.

8 years agolvconvert: Fix --type thin recognition.
Alasdair G Kergon [Sat, 30 Jul 2016 14:08:50 +0000 (15:08 +0100)]
lvconvert: Fix --type thin recognition.

lp->thin already holds the result of the cmdline arg resolution.

8 years agotools: Also recognise segtype with thin and cache.
Alasdair G Kergon [Sat, 30 Jul 2016 03:12:58 +0000 (04:12 +0100)]
tools: Also recognise segtype with thin and cache.

(--type thin still needs this for lvcreate - more logic should be
shared between lvcreate and lvconvert)

8 years agotools: mirror also supports stripesize
Alasdair G Kergon [Sat, 30 Jul 2016 02:52:49 +0000 (03:52 +0100)]
tools: mirror also supports stripesize

8 years agolvconvert: Move stripe validation code later.
Alasdair G Kergon [Sat, 30 Jul 2016 01:52:06 +0000 (02:52 +0100)]
lvconvert: Move stripe validation code later.

Simpler to delay it all until the actual LV being changed is available,
rather than having it split in two parts.

8 years agotools: Unify stripesize parameter validation.
Alasdair G Kergon [Sat, 30 Jul 2016 01:05:50 +0000 (02:05 +0100)]
tools: Unify stripesize parameter validation.

Move it all into get_stripe_params().
Some code paths missed --stripesize checks.
E.g. lvcreate --type raid4 -i1

8 years agolvconvert: Rearrange code that decides segtype.
Alasdair G Kergon [Fri, 29 Jul 2016 23:22:13 +0000 (00:22 +0100)]
lvconvert: Rearrange code that decides segtype.

8 years agolvconvert: Only obtain --type parameter once.
Alasdair G Kergon [Fri, 29 Jul 2016 20:45:22 +0000 (21:45 +0100)]
lvconvert: Only obtain --type parameter once.

8 years agolvconvert: Remove hard-coded segment names.
Alasdair G Kergon [Fri, 29 Jul 2016 20:11:12 +0000 (21:11 +0100)]
lvconvert: Remove hard-coded segment names.

8 years agothin: when converting a thin pool data or metadata LV from
Heinz Mauelshagen [Fri, 29 Jul 2016 17:17:12 +0000 (19:17 +0200)]
thin: when converting a thin pool data or metadata LV from
      linear to raid1, the linear wasnt't switched to the
      raid1 mapping, thus creating the false impression of
      resilience.

8 years agopost-release
Alasdair G Kergon [Thu, 28 Jul 2016 18:58:22 +0000 (19:58 +0100)]
post-release

8 years agopre-release v2_02_162
Alasdair G Kergon [Thu, 28 Jul 2016 17:35:32 +0000 (18:35 +0100)]
pre-release

8 years agovgsplit: ea90a3d622 added an unconditional call to lv_is_on_pvs()
Heinz Mauelshagen [Thu, 28 Jul 2016 16:34:46 +0000 (18:34 +0200)]
vgsplit: ea90a3d622 added an unconditional call to lv_is_on_pvs()
         on any thin snap external origin LV which caused a segfault
         when none existed as exposed by the vgsplit-thin.sh test.

         Only call lv_is_on_pvs() if an external origin LV actually
         exists and correct the related splitting logic.

8 years agolvmdbusd: Add '-y' to lvconvert for lv cache create
Tony Asleson [Wed, 27 Jul 2016 23:43:27 +0000 (18:43 -0500)]
lvmdbusd: Add '-y' to lvconvert for lv cache create

When converting to a cache lv, tests were hanging with a prompt for
"Do you want wipe existing metadata of cache pool volume
To preserve cache metadata add option "--zero n".
WARNING: Reusing mismatched cache pool metadata MAY DESTROY YOUR DATA!"

This is new.

8 years agolvmdbusd: Fix hang for Job.Wait(n)
Tony Asleson [Wed, 27 Jul 2016 23:27:58 +0000 (18:27 -0500)]
lvmdbusd: Fix hang for Job.Wait(n)

When a client is doing a wait on a job, any other clients will hang
when trying to do anything with the service.  This is caused by
the wait code which  was placing the thread that handles
incoming dbus requests to sleep until either the timeout expired or
the job operation completed.

This change creates a thread for the wait request, so that the thread
processing incoming requests can continue to run.

8 years agoman: lvcreate correction on --stripes explanation and examples
Heinz Mauelshagen [Thu, 28 Jul 2016 15:34:42 +0000 (17:34 +0200)]
man: lvcreate correction on --stripes explanation and examples
     with respect to the changed, configurable default behaviour
     introduced with commit 7eb79091937d.

     E.g. raid default of 2 stripes rather than number of PVs in the VG
     or on the command line minus one.

8 years agotests: updates for new raid allocation logic
Zdenek Kabelac [Thu, 28 Jul 2016 14:37:20 +0000 (16:37 +0200)]
tests: updates for new raid allocation logic

(with backward compatible settings user as well to check old logic
is still available when needed).

8 years agoconfig: keep new setting commented out
Zdenek Kabelac [Thu, 28 Jul 2016 13:08:11 +0000 (15:08 +0200)]
config: keep new setting commented out

8 years agovg_validate: only reject min_recovery_rate in case max_recovery_rate is set and smaller
Heinz Mauelshagen [Wed, 27 Jul 2016 21:20:58 +0000 (23:20 +0200)]
vg_validate: only reject min_recovery_rate in case max_recovery_rate is set and smaller

8 years agovg_validate: add missing check for raid6 segment types
Heinz Mauelshagen [Wed, 27 Jul 2016 21:14:46 +0000 (23:14 +0200)]
vg_validate: add missing check for raid6 segment types

8 years agovg_validate: fix seg->extents_copied check introduced with
Heinz Mauelshagen [Wed, 27 Jul 2016 21:09:54 +0000 (23:09 +0200)]
vg_validate: fix seg->extents_copied check introduced with
             commit 8f62b7bfe5 and add comment for the member
             to 'struct lv_segment'

8 years agovgsplit: restore check for thin pool external origin
David Teigland [Wed, 27 Jul 2016 19:00:57 +0000 (14:00 -0500)]
vgsplit: restore check for thin pool external origin

Fix a regression from commit 4420d41f, in which the
check was skipped for splitting a thin pool and an
external origin.

8 years agoman: lvmthin clean up syntax example
David Teigland [Wed, 27 Jul 2016 18:13:59 +0000 (13:13 -0500)]
man: lvmthin clean up syntax example

The syntax for converting an LV to a thin LV
included an unnecessary --thin option.  I was
probably still confused about these options
when writing this.

8 years agolvcreate.c: respect DEFAULT_RAID_MAX_IMAGES on creation of any RaidLV
Heinz Mauelshagen [Wed, 27 Jul 2016 16:20:48 +0000 (18:20 +0200)]
lvcreate.c: respect DEFAULT_RAID_MAX_IMAGES on creation of any RaidLV

8 years agovg_validate: segment check enhancements for raids to catch bogus metadata
Heinz Mauelshagen [Wed, 27 Jul 2016 16:17:29 +0000 (18:17 +0200)]
vg_validate: segment check enhancements for raids to catch bogus metadata

General RAID and RAID segment type specific checks are added
to merge.c. New static _check_raid_seg() is called on each segment
of a RaidLV (which have just one) from check_lv_segments().

New checks caught some unititialized segment members
which are addressed here as well:

- initialize seg->region_size to 0 in lvcreate.c for raid0/raid0_meta

- initialize list seg->origin_list in lv_manip.c

8 years agotests: check we don't warn when converting to thin LV
Zdenek Kabelac [Wed, 27 Jul 2016 13:59:48 +0000 (15:59 +0200)]
tests: check we don't warn when converting to thin LV

Tool produced warning for non-zeroing thin-pools.

8 years agotests: adapt for new cache-pool zeroing
Zdenek Kabelac [Sat, 23 Jul 2016 19:18:30 +0000 (21:18 +0200)]
tests: adapt for new cache-pool zeroing

8 years agolvconvert: support --zero for full cache pool conversion.
Zdenek Kabelac [Wed, 27 Jul 2016 14:14:47 +0000 (16:14 +0200)]
lvconvert: support --zero for full cache pool conversion.

Add matching support for -Z option also we doing full conversion
to cache-pool.

Extending coversion message to show which pool type is created
and whether the metadata will be wiped or remain unmodified.

8 years agolvconvert: tune cache-pool zeroing
Zdenek Kabelac [Sat, 23 Jul 2016 19:17:56 +0000 (21:17 +0200)]
lvconvert: tune cache-pool zeroing

Follow-up to 27a767d5e8cedf9cac31eb3562cf8fdd4aa88b7c.
Tunning behavior in a way we always prompt when option --zero is NOT specified.
Without -Z lvm expects user wants to 'reset' cache-pool metadata
(they could have been splitted from some cached LV)

If user doesn't want to zero metadata he needs to specify -Zn.

User may also avoid prompting for zeroing by using -Zy for
cache-pool (basically equals using --yes  without -Z being given)
(unlike full convert case, there is no cache-pool being converted,
so there is not 'uncoditional' prompt in this case).

8 years agolvconvert: suppress zeroing warning when converting to thin
Zdenek Kabelac [Wed, 27 Jul 2016 11:36:25 +0000 (13:36 +0200)]
lvconvert: suppress zeroing warning when converting to thin

When volume was lvconvert-ed to a thin-volume with external origin,
then in case thin-pool was in non-zeroing mode
it's been printing WARNING about not zeroing thin volume - but
this is wanted and expected - so nothing to warn about.

So in this particular use case WARNING needs to be suppressed.

Adding parameter support for lvcreate_params.

So now lvconvert creates 'normal thin LV' in read-only mode
(so any read will 'return 0' for a moment)
then deactivate regular thin LV and reacreate in 'final R/RW' mode
thin LV with external origin and activate again.

8 years agotests: add pv-ext-update.sh test
Peter Rajnoha [Wed, 27 Jul 2016 10:11:53 +0000 (12:11 +0200)]
tests: add pv-ext-update.sh test

Tests automatic update of PV header (its "extension" part) to recent
version.

8 years agometadata: fix automatic updates of PV extension headers to newest version
Peter Rajnoha [Tue, 26 Jul 2016 13:46:36 +0000 (15:46 +0200)]
metadata: fix automatic updates of PV extension headers to newest version

Before, the automatic update from older to newer version of PV extension
header happened within vg_write call. This may have caused problems under
some circumnstances where there's a code in between vg_write and vg_commit
which may have failed. In such situation, we reverted precommitted metadata
and put back the state to working version of VG metadata.

However, we don't have revert for PV write operation at the moment. So
if we updated PV headers already and we reverted vg_write due to failure
in subsequent code (before vg_commit), we ended up with lost VG metadata
(because old metadata pointers got reset by the PV write operation).

To minimize problematic situations here, we should put vg_write and
vg_commit that is done after PV header rewrites as close to each
other as possible.

This patch moves the automatic PV header rewrite for new extension
header part from vg_write to _vg_read where it's done the same way
as we do any other VG repairs if detected during VG read operation
(under VG write lock).

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