]> sourceware.org Git - lvm2.git/log
lvm2.git
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).

8 years agolibdm: report: fix json reporting to escape '"' character that may appear in reported...
Peter Rajnoha [Tue, 26 Jul 2016 10:27:41 +0000 (12:27 +0200)]
libdm: report: fix json reporting to escape '"' character that may appear in reported string

8 years agolvconvert: --trackchanges requires --splitmirrors 1
Alasdair G Kergon [Mon, 25 Jul 2016 20:15:25 +0000 (21:15 +0100)]
lvconvert: --trackchanges requires --splitmirrors 1

8 years agolvmlockd: improve error message about missing global lock
David Teigland [Mon, 25 Jul 2016 19:45:11 +0000 (14:45 -0500)]
lvmlockd: improve error message about missing global lock

If the VG holding the global lock is removed, we can indicate
that as the reason for not being able to acquire the global
lock in subsequent error messages, and can suggest enabling
the global lock in another VG.  (This helpful error message
will go away if the global lock is enabled in another VG,
or if lvmlockd is restarted.)

8 years agolvconvert: --trackchanges requires --splitmirrors
Alasdair G Kergon [Mon, 25 Jul 2016 18:32:10 +0000 (19:32 +0100)]
lvconvert: --trackchanges requires --splitmirrors

8 years agolvconvert: remove warnings about deprecated split option
David Teigland [Mon, 25 Jul 2016 16:01:56 +0000 (11:01 -0500)]
lvconvert: remove warnings about deprecated split option

A warning seems too severe for this message, so leave it
out until there's a better idea.

8 years agolvmlockd: improve message for lock-start
David Teigland [Mon, 25 Jul 2016 15:40:48 +0000 (10:40 -0500)]
lvmlockd: improve message for lock-start

Only print this for shared VGs, and include the
time it may take for sanlock.

8 years agoman: add note about 'lastlog' built-in command
Peter Rajnoha [Mon, 25 Jul 2016 13:05:08 +0000 (15:05 +0200)]
man: add note about 'lastlog' built-in command

8 years agosegtype: Fix unrecognised flag message.
Alasdair G Kergon [Mon, 25 Jul 2016 11:56:25 +0000 (12:56 +0100)]
segtype: Fix unrecognised flag message.

Show in hex not decimal.

8 years agoconf: regenerate example.conf.in
Peter Rajnoha [Mon, 25 Jul 2016 11:54:59 +0000 (13:54 +0200)]
conf: regenerate example.conf.in

8 years agoraid_manip: Some validation functions.
Alasdair G Kergon [Sun, 24 Jul 2016 00:40:24 +0000 (01:40 +0100)]
raid_manip: Some validation functions.

8 years agoraid_manip: Fix stripe_size type to uint32_t.
Alasdair G Kergon [Sun, 24 Jul 2016 00:35:04 +0000 (01:35 +0100)]
raid_manip: Fix stripe_size type to uint32_t.

8 years agoraid_manip: Reorder some functions.
Alasdair G Kergon [Sun, 24 Jul 2016 00:31:30 +0000 (01:31 +0100)]
raid_manip: Reorder some functions.

8 years agolvmlockd: improve activation locking error message
David Teigland [Fri, 22 Jul 2016 19:50:33 +0000 (14:50 -0500)]
lvmlockd: improve activation locking error message

to include the LV type

8 years agolvconvert: change error message
David Teigland [Fri, 22 Jul 2016 15:00:24 +0000 (10:00 -0500)]
lvconvert: change error message

for implicit pool conversion since it's also used
when the lv is already a pool

8 years agotests: check thin resize of raid10
Zdenek Kabelac [Fri, 22 Jul 2016 09:07:54 +0000 (11:07 +0200)]
tests: check thin resize of raid10

8 years agoman: drop .R
Zdenek Kabelac [Thu, 21 Jul 2016 12:56:30 +0000 (14:56 +0200)]
man: drop .R

Avoid using .R as its not a valid man macro.

8 years agolvconvert: reusing old cache pool metadata needs -Zn
Zdenek Kabelac [Fri, 22 Jul 2016 12:16:55 +0000 (14:16 +0200)]
lvconvert: reusing old cache pool metadata needs -Zn

When cache pool is reused for a new cached volume, there is
normally no need to 'keep' old cache-pool metadata as this
could cause major data lose.

Unlike with 'lvcreate -H -LX --cachepool' conversion, this lvconvert
path left the metadata unzeroed - partly for making easier some
debugging, but this was rather a bug.

So to keep possible reattach of 'unzeroed' metadata, user
now has to use 'lvconvert -Zn' for such conversion. In this case
the prompt will appear about possibe data loss and to proceed,
user has to confirm such operation. Without -Zn metadata are wiped.

8 years agolvcreate: conditionally set stripesize
Heinz Mauelshagen [Thu, 21 Jul 2016 00:32:39 +0000 (02:32 +0200)]
lvcreate: conditionally set stripesize

Stripe size may not be set unconditionally in
_read_mirror_and_raid_params() or creation of
striped LV will fail

8 years agolvconvert: allow implied cache pool convert
David Teigland [Wed, 20 Jul 2016 15:44:28 +0000 (10:44 -0500)]
lvconvert: allow implied cache pool convert

Just as with the implied thin pool convert when
given ambiguous command line options.

8 years agolvmetad: fix use committed metadata to update
David Teigland [Wed, 20 Jul 2016 15:18:58 +0000 (10:18 -0500)]
lvmetad: fix use committed metadata to update

In some cases, the command will update VG metadata
in lvmetad without writing it.  In these cases there
is no vg->vg_committed and it should use 'vg' directly.
This happens when the command finds that the lvmetad
VG has been invalidated, rereads the metadata from disk,
then updates lvmetad with that metadata.  This happens
often with lvmlockd or foreign VGs, and can happen without
lvmlockd if a previous command fails after invalidating
the VG in lvmetad.

8 years agolvcreate: raid0 needs default number of stripes
Heinz Mauelshagen [Wed, 20 Jul 2016 15:20:15 +0000 (17:20 +0200)]
lvcreate: raid0 needs default number of stripes

Commit 3928c96a37941d765bf467d82502cd2aec7fd809 introduced
new defaults for raid number of stripes, which may cause
backwards compatibility issues with customer scripts.

Adding configurable option 'raid_stripe_all_devices' defaulting
to '0' (i.e. off = new behaviour) to select the old behaviour
of using all PVs in the VG or those provided on the command line.

In case any scripts rely on the old behaviour, just set
'raid_strip_all_devices = 1'.

- resolves rhbz1354650

8 years agoscripts: blkdeactivate: fix typo for DEV_DIR when executing blkdeactivate -m disableq...
Peter Rajnoha [Wed, 20 Jul 2016 11:48:59 +0000 (13:48 +0200)]
scripts: blkdeactivate: fix typo for DEV_DIR when executing blkdeactivate -m disablequeueing

8 years agotests: enforce flush of cache target
Zdenek Kabelac [Tue, 19 Jul 2016 15:21:56 +0000 (17:21 +0200)]
tests: enforce flush of cache target

Since now  lvm command no longer is flushing cache target with status
query - enforce it with extra status.

8 years agolvconvert: enable work with partial LVs
Zdenek Kabelac [Tue, 19 Jul 2016 15:11:57 +0000 (17:11 +0200)]
lvconvert: enable work with partial LVs

Fix printed message and enable handling of missing PVs.

8 years agolvmetad: use committed metadata to update
David Teigland [Mon, 18 Jul 2016 19:46:08 +0000 (14:46 -0500)]
lvmetad: use committed metadata to update

This fixes a regression from commit a7c45ddc5, which moved
the lvmetad VG update from vg_commit() to unlock_vg().

The lvmetad VG update needs to send the version of metadata
that was committed rather than sending the state of struct 'vg'.
The 'vg' may have been partially modified since vg_commit(),
and contain non-committed metadata that shouldn't be sent
to lvmetad.

8 years agolvconvert: raid0 replace attempt segfaults
Heinz Mauelshagen [Mon, 18 Jul 2016 18:16:40 +0000 (20:16 +0200)]
lvconvert: raid0 replace attempt segfaults

Any failing stripes in raid0/raid0_meta type LVs cause data loss,
thus replacement via 'lvconvert --replace...' does not make sense.

Patch prohibits replacement on raid0/raid0_meta LVs.

- resolves rhbz1356734

8 years agodmstats: fix bounds leak in _do_stats_create_regions() (Coverity)
Bryn M. Reeves [Mon, 18 Jul 2016 17:46:21 +0000 (18:46 +0100)]
dmstats: fix bounds leak in _do_stats_create_regions() (Coverity)

8 years agodmstats: check uuid, major, and alldevices before argc (Coverity)
Bryn M. Reeves [Mon, 18 Jul 2016 17:28:07 +0000 (18:28 +0100)]
dmstats: check uuid, major, and alldevices before argc (Coverity)

The --uuid, --major and --alldevices arguments were incorrectly tested
after confirming argc is > 0, in a branch that only executes if argc
== 0 (i.e. they were unreachable).

Move all device checks before the test for argc and log an appropriate
error before returning.

8 years agolibdm: document use of dm_free() with histogram bounds
Bryn M. Reeves [Mon, 18 Jul 2016 17:20:01 +0000 (18:20 +0100)]
libdm: document use of dm_free() with histogram bounds

8 years agodmstats: free bounds string in _stats_create_file() (Coverity)
Bryn M. Reeves [Mon, 18 Jul 2016 17:17:42 +0000 (18:17 +0100)]
dmstats: free bounds string in _stats_create_file() (Coverity)

8 years agolibdm: free hist_arg in _stats_create_file_regions() (Coverity)
Bryn M. Reeves [Mon, 18 Jul 2016 17:08:51 +0000 (18:08 +0100)]
libdm: free hist_arg in _stats_create_file_regions() (Coverity)

8 years agolvmetad: free memory on exit
David Teigland [Mon, 18 Jul 2016 16:31:00 +0000 (11:31 -0500)]
lvmetad: free memory on exit

This is unnecessary but it quiets complaints (valgrind).

8 years agopost-release
Alasdair G Kergon [Fri, 15 Jul 2016 21:02:58 +0000 (22:02 +0100)]
post-release

8 years agopre-release v2_02_161
Alasdair G Kergon [Fri, 15 Jul 2016 20:55:38 +0000 (21:55 +0100)]
pre-release

8 years agoRevert "lvcreate: raid0 needs default number of stripes"
Alasdair G Kergon [Fri, 15 Jul 2016 20:53:37 +0000 (21:53 +0100)]
Revert "lvcreate: raid0 needs default number of stripes"

This reverts commit 3928c96a37941d765bf467d82502cd2aec7fd809.

A new setting is required in lvm.conf to control this.

8 years agoman: drop lvmraid references from lvconvert
David Teigland [Fri, 15 Jul 2016 20:08:02 +0000 (15:08 -0500)]
man: drop lvmraid references from lvconvert

8 years agocleanup: local static functions with _
Zdenek Kabelac [Fri, 15 Jul 2016 11:20:35 +0000 (13:20 +0200)]
cleanup: local static functions with _

8 years agocoverity: close socket before closing app
Zdenek Kabelac [Fri, 15 Jul 2016 13:42:01 +0000 (15:42 +0200)]
coverity: close socket before closing app

Opened socket descriptor goes out-of-sight still opened.
Close it - but since this happens before app exit, it
just fixed valgrind report.

8 years agotests: check fail path on cache creation
Zdenek Kabelac [Fri, 15 Jul 2016 13:47:33 +0000 (15:47 +0200)]
tests: check fail path on cache creation

8 years agotests: require better cache driver
Zdenek Kabelac [Thu, 14 Jul 2016 11:40:22 +0000 (13:40 +0200)]
tests: require better cache driver

Version 1.4 can't handle this test without killing itself.

8 years agostring: Add first_substring().
Alasdair G Kergon [Thu, 14 Jul 2016 13:46:38 +0000 (14:46 +0100)]
string: Add first_substring().

8 years agomacros: Add lv_is_not_synced.
Alasdair G Kergon [Thu, 14 Jul 2016 13:21:01 +0000 (14:21 +0100)]
macros: Add lv_is_not_synced.

8 years agolvmdump: include major and minor numbers for pvs and lvs reports
Peter Rajnoha [Thu, 14 Jul 2016 12:33:33 +0000 (14:33 +0200)]
lvmdump: include major and minor numbers for pvs and lvs reports

Including major and minor numbers in pvs and lvs output when calling
lvmdump -a makes it a bit easier to match these items with possible
system log/journal.

8 years agocoverity: add some tests for function results
Zdenek Kabelac [Tue, 12 Jul 2016 14:43:12 +0000 (16:43 +0200)]
coverity: add some tests for function results

Even though they cannot normally happen...

8 years agocoverity: cleaning some PW.NOT_COMPATIBLE_WITH_PREVIOUS_DECL
Zdenek Kabelac [Tue, 12 Jul 2016 14:42:14 +0000 (16:42 +0200)]
coverity: cleaning some PW.NOT_COMPATIBLE_WITH_PREVIOUS_DECL

Some very low-prio warns....

8 years agocoverity: easier to follow set-up of vsn variable
Zdenek Kabelac [Tue, 12 Jul 2016 14:41:25 +0000 (16:41 +0200)]
coverity: easier to follow set-up of vsn variable

Helping coverity to see 'vsn' really can't be NULL.

8 years agotests: skip more cache tests for older driver
Zdenek Kabelac [Wed, 13 Jul 2016 14:13:29 +0000 (16:13 +0200)]
tests: skip more cache tests for older driver

8 years agotests: resize of filesystem
Zdenek Kabelac [Wed, 13 Jul 2016 19:15:34 +0000 (21:15 +0200)]
tests: resize of filesystem

Test for https://bugzilla.redhat.com/1354396

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