]> sourceware.org Git - lvm2.git/log
lvm2.git
6 years agotests: have some space for 2nd mda
Zdenek Kabelac [Tue, 7 Nov 2017 22:17:52 +0000 (23:17 +0100)]
tests: have some space for 2nd mda

pvcreate with 2MDAs needs some extra space.

6 years agolvconvert: update delaying message
Zdenek Kabelac [Tue, 7 Nov 2017 22:19:17 +0000 (23:19 +0100)]
lvconvert: update delaying message

Make more obvious the operation just got delayed
(using same wording as with thin snapshots)

6 years agotests: snasphot merging
Zdenek Kabelac [Sun, 5 Nov 2017 21:59:43 +0000 (22:59 +0100)]
tests: snasphot merging

6 years agocoverity: add some initilizers
Zdenek Kabelac [Tue, 7 Nov 2017 19:54:51 +0000 (20:54 +0100)]
coverity: add some initilizers

Coverity cannot do a deeper analyzis so let's make just reports
go away and initialize them to 0.

6 years agocleanup: drop unneeded headerfiles
Zdenek Kabelac [Sun, 5 Nov 2017 17:21:16 +0000 (18:21 +0100)]
cleanup: drop unneeded headerfiles

Coverity reported these are no longer in use.

6 years agocleanup: update messages in lvconvert
Zdenek Kabelac [Sun, 5 Nov 2017 09:22:31 +0000 (10:22 +0100)]
cleanup: update messages in lvconvert

Use display_lvname and update thin snapshot merge error message.

6 years agocleanup: gcc const warning
Zdenek Kabelac [Sun, 5 Nov 2017 08:20:08 +0000 (09:20 +0100)]
cleanup: gcc const warning

6 years agoshellcheck: fsadm cleanup
Zdenek Kabelac [Sun, 5 Nov 2017 17:22:02 +0000 (18:22 +0100)]
shellcheck: fsadm cleanup

Use some more "" for bash vars

6 years agoblkdeactive: use /sbin for mdamd
Zdenek Kabelac [Fri, 3 Nov 2017 16:06:16 +0000 (17:06 +0100)]
blkdeactive: use /sbin for mdamd

Do not using lvm's  @SBINDIR@ for mdadm path.
Set this directly to  /sbin/mdadm like other tools.

Group them separately

6 years agocoverity: avoid overflow_before_widen
Zdenek Kabelac [Sun, 5 Nov 2017 17:24:15 +0000 (18:24 +0100)]
coverity: avoid overflow_before_widen

TODO: it likely should be checked value is >0...

6 years agocoverity: avoid memleak
Zdenek Kabelac [Sun, 5 Nov 2017 17:39:05 +0000 (18:39 +0100)]
coverity: avoid memleak

When security_level was set, allocated filename was leaking.

6 years agoclvmd: supress ENOENT error on testing connection
Eric Ren [Mon, 30 Oct 2017 12:53:20 +0000 (20:53 +0800)]
clvmd: supress ENOENT error on testing connection

In HA cluster, we have "clvm" resource agent to manage clvmd daemon.
The agent invokes clvmd like: "clvmd -T90 -d0", which  always prints
a scaring error message:

"""
local socket: connect failed: No such file or directory
"""

When specifed with "-d" option, clvmd tries to check if an instance
of the clvmd daemon is already running through a testing connection.
The connect() will fail with this ENOENT error in such case, so supress
the error message in such case.

TODO: add missing error reaction code - since ofter log_error, program
is not supposed to continue running (log_error() is for reporting
stopping problems).

Signed-off-by: Eric Ren <zren@suse.com>
6 years agosnapshot: prevent repeated merging
Zdenek Kabelac [Sat, 4 Nov 2017 21:15:59 +0000 (22:15 +0100)]
snapshot: prevent repeated merging

Check and prevent starting another snapshot merge before
exiting merging is finished.

TODO: we can possibly implement smarter logic to drop existing
merging and start a new one.

6 years agopost-release
Alasdair G Kergon [Fri, 3 Nov 2017 04:42:54 +0000 (04:42 +0000)]
post-release

6 years agopre-release v2_02_176
Alasdair G Kergon [Fri, 3 Nov 2017 02:28:55 +0000 (02:28 +0000)]
pre-release

6 years agotestsuite: Forgot to pull 'should's after fixing RAID4/5/6 mismatch test
Jonathan Brassow [Thu, 2 Nov 2017 15:25:46 +0000 (10:25 -0500)]
testsuite:  Forgot to pull 'should's after fixing RAID4/5/6 mismatch test

Test will now fail rather than warn if conditions are not met.

6 years agotestsuite: Fix problem when checking RAID4/5/6 for mismatches.
Jonathan Brassow [Thu, 2 Nov 2017 14:49:35 +0000 (09:49 -0500)]
testsuite:  Fix problem when checking RAID4/5/6 for mismatches.

The lvchange-raid[456].sh test checks that mismatches can be detected
properly.  It does this by writing garbage to the back half of one of
the legs directly.  When performing a "check" or "repair" of mismatches,
MD does a good job going directly to disk and bypassing any buffers that
may prevent it from seeing mismatches.  However, in the case of RAID4/5/6
we have the stripe cache to contend with and this is not bypassed.  Thus,
mismatches which have /just/ happened to an area that now populates the
stripe cache may be overlooked.  This isn't a serious issue, however,
because the stripe cache is short-lived and reasonably small.  So, while
there may be a small window of time between the disk changing underneath
the RAID array and when you run a "check"/"repair" - causing a mismatch
to be missed - that would be no worse than if a user had simply run a
"check" a few seconds before the disk changed.  IOW, it simply isn't worth
making a fuss over dropping the stripe cache before beginning a "check" or
"repair" (which we actually did attempt to do a while back).

So, to get the test running smoothly, we simply deactivate and reactivate
the LV to force the stripe cache to be dropped and then proceed.  We could
just as easily wait a few seconds for the stripe cache to empty also.

6 years agotestsuite: Add and document a 'should' for "idle" -> "recover" RAID test
Jonathan Brassow [Thu, 2 Nov 2017 13:53:48 +0000 (08:53 -0500)]
testsuite: Add and document a 'should' for "idle" -> "recover" RAID test

When a "recover" is just starting for a RAID LV, it is possible to get
"idle" for the sync action if the status is issued quickly enough.  This
is fine, the MD thread just hasn't gotten things going yet.  However,
the /need/ for a "recover" should be marked in md->recovery and it would
be simple enough to fix the kernel so this doesn't happen.  May eventually
want a separate bug for this, but for now it fits with RHBZ 1507719.

6 years agosystemd: remove Install sections from socket-activated services
Bastian Blank [Wed, 1 Nov 2017 14:25:54 +0000 (15:25 +0100)]
systemd: remove Install sections from socket-activated services

We always preferred and recommended socket activation for our services
so remove the Install section in related .service units which are unused
in this case and keep only the Install section in associated .socket
units.

Signed-off-by: Bastian Blank <waldi@debian.org>
6 years agocleanup: use segtype_is_raid_with_meta
Zdenek Kabelac [Tue, 31 Oct 2017 22:16:13 +0000 (23:16 +0100)]
cleanup: use segtype_is_raid_with_meta

Replace with common macro.

6 years agocleanup: pvmove messages
Zdenek Kabelac [Tue, 31 Oct 2017 19:50:51 +0000 (20:50 +0100)]
cleanup: pvmove messages

Just add some dots to messages and remove unneeded
stack trace from return after log_error.

6 years agolv_manip: hide layered LV temporarily
Zdenek Kabelac [Tue, 31 Oct 2017 23:51:39 +0000 (00:51 +0100)]
lv_manip: hide layered LV temporarily

Since vg_validate() now rejects LVs without segments and
insert_layer_for_segments_on_pv() gets just created
'layer_lv' without segment,  it needs to be hidden
from vg->lvs during processing of _align_segment_boundary_to_pe_range()
as this function calls  lv_validate() and now requires
vg to be consistent.  LV is then put back into vg->lvs.

6 years agopvmove: simplify name generation
Zdenek Kabelac [Tue, 31 Oct 2017 19:51:11 +0000 (20:51 +0100)]
pvmove: simplify name generation

6 years agotest: clean-up failing test case and document 'should' cases
Jonathan Brassow [Tue, 31 Oct 2017 02:58:38 +0000 (21:58 -0500)]
test: clean-up failing test case and document 'should' cases

There are two known bugs in the lvconvert-raid-status-validation.sh
test.  The first one I consider to be more of an annoyance (1507719).
The second one I consider to be more serious (1507729).

RHBZ 1507719 simply documents the fact that the three RAID status
fields may not always be coherent due to the way they are set and
unset when the MD thread is shutting down and starting up.  For
example, the sync ratio may be 100% but the sync action may not
yet have switched to "idle" and the health characters may not yet
all be 'A's (i.e. the devices set to InSync).

RHBZ 1507729 is more serious.  The sync ratio can be 100% for a
short period of time after upconverting linear -> RAID1.  It is
reset to 0 once the MD sync thread gets to work on it.  It does
this because, technically, the array /is/ in-sync if the new
devices are excluded - i.e. the data is 100% available and
consistent.  I'm not sure what to do about this problem, but we'd
much rather not have this state that looks exactly like the
end of the process when the sync ratio is 100% because the
"recover" process finished, but the sync action and health
characters haven't been updated yet.  Put simply, the problem
is that we can't tell if a sync is starting or finished based
on the status output.

6 years agoliblvm: Fix segfault in lvm_pv_remove.
Alasdair G Kergon [Mon, 30 Oct 2017 22:03:35 +0000 (22:03 +0000)]
liblvm: Fix segfault in lvm_pv_remove.

Since 4fa5add6b1bd4d7f7313f2950021a09e4130ad08 ("pvcreate: Wipe cached
bootloaderarea when wiping label.") label_remove is responsible
for the lvmcache_del.  (toollib and liblvm need fixing to share
the code.)

6 years agotests: revert commit change
Zdenek Kabelac [Mon, 30 Oct 2017 16:26:42 +0000 (17:26 +0100)]
tests: revert commit change

Commit 04244107732feb5274bc24efed428a0d4ddae8f6 by mistake took also
this unwanted local modification of test - revert it.

6 years agoraid: setup LV size earlier
Zdenek Kabelac [Mon, 30 Oct 2017 16:23:56 +0000 (17:23 +0100)]
raid: setup LV size earlier

New validation code which does require to not store LV with no size
(no segments) revealed this size setup code needs to happen
earlier.

6 years agotests: load reiserfs
Zdenek Kabelac [Mon, 30 Oct 2017 12:28:08 +0000 (13:28 +0100)]
tests: load reiserfs

Preload reiserfs module for the case, fs is present/compiled for a
kernel but it's not present in memory.

Size reducition needs --yes confirmation to preceed for reiserfs.

6 years agolvreduce: check LV has segment
Zdenek Kabelac [Mon, 30 Oct 2017 13:35:31 +0000 (14:35 +0100)]
lvreduce: check LV has segment

Before accessing content make sure LV has segment.
This can be used in case code removes LV without segments
(i.e. on some error path)

6 years agovalidation: capture store of LV without segment
Zdenek Kabelac [Mon, 30 Oct 2017 13:34:30 +0000 (14:34 +0100)]
validation: capture store of LV without segment

6 years agodevcache: track more udev errors
Zdenek Kabelac [Mon, 30 Oct 2017 12:16:50 +0000 (13:16 +0100)]
devcache: track more udev errors

Add a bit more details for failing udev function.

6 years agothin: fix merging messages
Zdenek Kabelac [Mon, 30 Oct 2017 10:00:31 +0000 (11:00 +0100)]
thin: fix merging messages

Correct reported message when thin snapshot has been already merged.
So lvm2 is no longer reporting "Mergins of snapshot X will occur..."
(even with swapped names).

6 years agopool: drop create spare on error path
Zdenek Kabelac [Fri, 27 Oct 2017 22:10:16 +0000 (00:10 +0200)]
pool: drop create spare on error path

When thin/cache pool creation fails and command created _pmspare,
such volume is now removed on error path.

6 years agometadata: Avoid accessing ignored metadata.
Alasdair G Kergon [Fri, 27 Oct 2017 21:42:00 +0000 (22:42 +0100)]
metadata: Avoid accessing ignored metadata.

When an ignored metadata area gets flagged for use again, make sure the
code doesn't try to parse its old metadata.  Firstly by trying to detect
this situation and skipping the read (while still remembering the
position reached in the circular buffer), and secondly by clearing the
invalid live metadata location on disk as a precaution when subsequently
writing out the precommitted metadata.

Problems showed up when a metadata area in one VG got moved to
another VG in ignored state (still holding metadata for the original
VG) and then later got brought into use in the new VG - only the header
should be read in this case, not any of the metadata content.

6 years agovgsplit: Fix detection of moved PVs.
Alasdair G Kergon [Fri, 27 Oct 2017 20:38:16 +0000 (21:38 +0100)]
vgsplit: Fix detection of moved PVs.

vgsplit shares the vg_rename code so that must only set the PV_MOVED_VG
flag introduced in commit 486ed108481cfbe4336f0fa590cbae251188ecc6
("vgmerge: Fix intermediate metadata corruption") on PVs that moved.

6 years agotests: update checked messages
Zdenek Kabelac [Fri, 27 Oct 2017 15:02:22 +0000 (17:02 +0200)]
tests: update checked messages

6 years agosnapshot: relocate common code validation for snapshot origin
Zdenek Kabelac [Fri, 27 Oct 2017 14:48:57 +0000 (16:48 +0200)]
snapshot: relocate common code validation for snapshot origin

Since both lvcreate and lvconvert needs to check for same
type of allowed origin for snapshot - move the code into
a single function.

This way we also fix several inconsitencies where snapshot
has been allowed by mistake either through lvcreate or
lvconvert path.

6 years agoman: Makefiles with V=1 support
Zdenek Kabelac [Fri, 27 Oct 2017 14:44:11 +0000 (16:44 +0200)]
man: Makefiles with V=1 support

Generation of man pages is generating lot of barely readable output.
For normal build quietize this a bit.

For original verbose build start to use  'make V=1'
(just like i.e. linux kernel does)

TODO: apply at more places...

6 years agodmsetup: Add unknown device error to dmsetup status.
Alasdair G Kergon [Thu, 26 Oct 2017 16:47:13 +0000 (17:47 +0100)]
dmsetup: Add unknown device error to dmsetup status.

Treat status the same way as info if provided device name doesn't exist.

6 years agoWHATS_NEW: ignore stripes/stripesize on RAID takover
Heinz Mauelshagen [Thu, 26 Oct 2017 16:18:24 +0000 (18:18 +0200)]
WHATS_NEW: ignore stripes/stripesize on RAID takover

6 years agolvcreate: error message with dot.
Heinz Mauelshagen [Thu, 26 Oct 2017 15:25:22 +0000 (17:25 +0200)]
lvcreate: error message with dot.

6 years agoraid: ignore --stripes/--stripesize on takeover
Heinz Mauelshagen [Thu, 26 Oct 2017 15:16:23 +0000 (17:16 +0200)]
raid: ignore --stripes/--stripesize on takeover

Converting from one raid level to another, no changes
of stripes or stripesize can be requested because those
are subject to reshaping.  I.e. the process requires to
takeover first and secondly request raid algorithm,
stripe or stripesize changes.

Ignore any related changes display warninngs
and proceed with the takeover.

Without this patch, a takeover requesting
stripesize change causes data corruption!

6 years agotests: better clustering support
Zdenek Kabelac [Thu, 26 Oct 2017 12:00:44 +0000 (14:00 +0200)]
tests: better clustering support

Use exclusive activation for snapshot conversion since we can only
convert exclusively active volumes.

6 years agotests: allow override of LVM_LOG_FILE_MAX_LINES
Zdenek Kabelac [Thu, 26 Oct 2017 11:58:43 +0000 (13:58 +0200)]
tests: allow override of LVM_LOG_FILE_MAX_LINES

Just like with other vars support this:

make check_local T=xyz LVM_LOG_FILE_MAX_LINES=10000000

Allows easily to override existing line limit.
Also increase limiting size of logs per command since some of
our commands are becoming very verbose....

6 years agoMakefile: help shows hint about LVM_LOG_FILE_MAX_LINES
Zdenek Kabelac [Thu, 26 Oct 2017 11:57:51 +0000 (13:57 +0200)]
Makefile: help shows hint about LVM_LOG_FILE_MAX_LINES

6 years agolog: better message when reached log limit
Zdenek Kabelac [Thu, 26 Oct 2017 11:55:36 +0000 (13:55 +0200)]
log: better message when reached log limit

Add explaining message, when command was aborted due to the reach
of configure line number count (LVM_LOG_FILE_MAX_LINES)
for logging (used mainly with testing).

6 years agoWHATS_NEW: missed
Zdenek Kabelac [Thu, 26 Oct 2017 12:02:44 +0000 (14:02 +0200)]
WHATS_NEW: missed

Last patch missed to mention, we've improved/fixed generated paths
in units and init.d shell scripts when lvm2 was plainly configured
with just i.e. --prefix.

Note: some distros might have fully specified --sbindir and
--usrsbindir - thus those very not seeing problems in generated paths.

6 years agocommands: drop secondary for lvconvert --type snapshot
Zdenek Kabelac [Wed, 25 Oct 2017 17:56:40 +0000 (19:56 +0200)]
commands: drop secondary for lvconvert --type snapshot

Both form were marked and secondary thus none of the supported
syntax entered manpage.

This restores appearance of snapshot conversion in man page.

6 years agoshellcheck: some apostrophe changes and cleanups
Zdenek Kabelac [Wed, 25 Oct 2017 15:02:31 +0000 (17:02 +0200)]
shellcheck: some apostrophe changes and cleanups

6 years agoscripts: paths update
Zdenek Kabelac [Wed, 25 Oct 2017 15:08:00 +0000 (17:08 +0200)]
scripts: paths update

Correct usage of sbindir also for scripts so the path
no longer needs resolving more vars like exec_prefix & prefix.

6 years agosystemd: use proper sbindir path
Zdenek Kabelac [Wed, 25 Oct 2017 15:06:41 +0000 (17:06 +0200)]
systemd: use proper sbindir path

Replace lowercase  @sbindir@  with  @SBINDIR@ which contains
fully decoded path.

Same with  @usrsbindir@ which is also used with clvmd and cmirrord.

Also handle SYSCONFDIR for EnvironmentFile.

Patch fixes generated unit files with strings like:
ExecStart=${exec_prefix}/sbin/lvm

6 years agoconfigure: improve support for sbindir path
Zdenek Kabelac [Wed, 25 Oct 2017 14:49:17 +0000 (16:49 +0200)]
configure: improve support for sbindir path

Introduce few more AC_SUBST vars for usage in *.in generation.

In some case we want to replace i.e. $sbindir with full path
instead of current ${exec_prefix}/sbin.

This patch provides:

USRSBINDIR
SBINDIR
DEFAULT_SYS_LOCK_DIR
SYSCONFDIR

At the same time properly use sbindir & usrsbindir with
lvm, fsadm, clvmd from one primary definition.

6 years agotests: snapshot conversions
Zdenek Kabelac [Wed, 25 Oct 2017 19:56:39 +0000 (21:56 +0200)]
tests: snapshot conversions

Add missing tests for snapshost conversions.

6 years agotypo: fix invalid
Zdenek Kabelac [Wed, 25 Oct 2017 17:39:25 +0000 (19:39 +0200)]
typo: fix invalid

6 years agosnapshot: improve validation
Zdenek Kabelac [Tue, 24 Oct 2017 14:34:25 +0000 (16:34 +0200)]
snapshot: improve validation

Do not allow to take snapshot of mirror/raid leg or log or metadata LV.
This was actually never supported, but user was able to create it,
and this put device stack in hardly fixable state (needs manual work).

This prevents such creation to pass.

Also improve validation when recreating snapshot volume type
from origin and COW volume.

6 years agoclean-up: Correct the comment to match the particular test case
Jonathan Brassow [Tue, 24 Oct 2017 19:06:44 +0000 (14:06 -0500)]
clean-up:  Correct the comment to match the particular test case

6 years agotests:check lvconvert with /dev in vglvname
Zdenek Kabelac [Tue, 24 Oct 2017 13:05:13 +0000 (15:05 +0200)]
tests:check lvconvert with /dev in vglvname

6 years agolvconvert: fixing extraction of vgname
Zdenek Kabelac [Tue, 24 Oct 2017 12:56:42 +0000 (14:56 +0200)]
lvconvert: fixing extraction of vgname

Correction to function for extracting vgname out of lvconvert
parameters.

Avoid repeating some checks.

Add code to handle generic options which may provide vgname in its argument
and compare them all so they match to a single vgname (otherwise it's a
error).

Extract default (envvar) vgname only when no position nor optional vgname is
found.

Fixing regression instroduce with patchset started with commit:
1e2420bca85da9a37570871cd70192e9ae831786   (2.02.169)

6 years agofsadm: refactor resize_crypt function
Ondrej Kozina [Tue, 24 Oct 2017 09:53:22 +0000 (11:53 +0200)]
fsadm: refactor resize_crypt function

split resize_crypt function in two.

a) Detect proper dm-crypt device type and count new --size
   value for cryptsetup resize command.

b) Perform the resize

6 years agofsadm: rename local variables to avoid confusion
Ondrej Kozina [Mon, 23 Oct 2017 16:11:32 +0000 (18:11 +0200)]
fsadm: rename local variables to avoid confusion

6 years agotest: add regression test for fsadm bug
Ondrej Kozina [Tue, 24 Oct 2017 09:55:14 +0000 (11:55 +0200)]
test: add regression test for fsadm bug

the bug in LUKS grow/shrink decision in fsadm was
masked due to fact that default LVM2 extent size
was larger than LUKS1 default data offset for dm-crypt
mapping. The new test address this bug.

6 years agofsadm: fix bug in LUKS grow/shrink decision branch
Ondrej Kozina [Mon, 23 Oct 2017 13:41:16 +0000 (15:41 +0200)]
fsadm: fix bug in LUKS grow/shrink decision branch

6 years agofsadm: add luks specific error message for small devices
Ondrej Kozina [Mon, 23 Oct 2017 13:31:44 +0000 (15:31 +0200)]
fsadm: add luks specific error message for small devices

6 years agotests: check stacked cache dataLV of thin-pool
Zdenek Kabelac [Mon, 23 Oct 2017 09:51:51 +0000 (11:51 +0200)]
tests: check stacked cache dataLV of thin-pool

6 years agolvcreate: skip checking for name restriction for caching
Zdenek Kabelac [Mon, 23 Oct 2017 09:36:51 +0000 (11:36 +0200)]
lvcreate: skip checking for name restriction for caching

lvcreate supports a 'conversion' when caching LV.
This normally worked fine, however in case passed LV was
thin-pool's data LV with suffix _tdata we have failed to early.

As the easiest fix looks dropping validation of name when
caching type is select - such name check will happen later
once the VG is opened again and properly detect if the LV
with protected name already exists and can be converted,
or will be rejected as ambigiuous operation requiring user
to specify  --type cache | --type cache-pool.

6 years agolvextend: detect stacked cache lv used for thinpool
Zdenek Kabelac [Mon, 23 Oct 2017 09:20:32 +0000 (11:20 +0200)]
lvextend: detect stacked cache lv used for thinpool

Ensure, that cacheLV is not tried to be resize until full support is
added.

6 years agolvconvert: preserve names of converted LV
Zdenek Kabelac [Mon, 23 Oct 2017 08:56:44 +0000 (10:56 +0200)]
lvconvert: preserve names of converted LV

When prompting and warning for conversion, remember initial LV names,
so after conversion is finished, correct original names are printed.

6 years agotest: remove 'should's from test to test target status race fix
Heinz Mauelshagen [Thu, 19 Oct 2017 15:41:44 +0000 (17:41 +0200)]
test: remove 'should's from test to test target status race fix

6 years agoliblvm: Move lib code used exclusively into metadata-liblvm.c
Alasdair G Kergon [Wed, 18 Oct 2017 18:29:32 +0000 (19:29 +0100)]
liblvm: Move lib code used exclusively into metadata-liblvm.c

Also remove some redundant function definitions from metadata.h.

6 years agotidy: Add missing underscores to statics.
Alasdair G Kergon [Wed, 18 Oct 2017 14:57:46 +0000 (15:57 +0100)]
tidy: Add missing underscores to statics.

6 years agolibdm: fix typo in libdevmapper.pc
Zdenek Kabelac [Tue, 17 Oct 2017 22:03:08 +0000 (00:03 +0200)]
libdm: fix typo in libdevmapper.pc

Fixing name for RT libraries and using RT_LIBS.

6 years agolvmlockd: check error for sanlock access to lvmlock LV
David Teigland [Tue, 17 Oct 2017 18:45:53 +0000 (13:45 -0500)]
lvmlockd: check error for sanlock access to lvmlock LV

When the sanlock daemon does not have permission to access
the lvmlock LV, make the error messages more helpful.

6 years agodevice: Separate errors for dev not found and filtered.
Alasdair G Kergon [Tue, 17 Oct 2017 01:12:41 +0000 (02:12 +0100)]
device: Separate errors for dev not found and filtered.

Replaced the confusing device error message "not found (or ignored by
filtering)" by either "not found" or "excluded by a filter".
(Later we should be able to say which filter.)

Left the the liblvm code paths alone.

7 years agotests: check external origin is monitored
Zdenek Kabelac [Mon, 16 Oct 2017 13:45:15 +0000 (15:45 +0200)]
tests: check external origin is monitored

7 years agothin: monitor also external origin
Zdenek Kabelac [Mon, 16 Oct 2017 13:05:57 +0000 (15:05 +0200)]
thin: monitor also external origin

Add missing monitoring for external origin LVs and add -real suffix
for UUID used for monitoring of external origin.

7 years agoconfigure: autoreconf
Marian Csontos [Mon, 16 Oct 2017 05:48:23 +0000 (07:48 +0200)]
configure: autoreconf

7 years agoreplicator: remove the code
David Teigland [Fri, 13 Oct 2017 19:43:15 +0000 (14:43 -0500)]
replicator: remove the code

It has not been used in a long time and is not
expected to be used further.

7 years agoUpdate WHATS_NEW
Marian Csontos [Fri, 13 Oct 2017 11:11:01 +0000 (13:11 +0200)]
Update WHATS_NEW

7 years agolvcreate: allow 100%FREE creation of "--type mirror" to work
Heinz Mauelshagen [Thu, 12 Oct 2017 15:43:24 +0000 (17:43 +0200)]
lvcreate: allow 100%FREE creation of "--type mirror" to work

Fixes the following case with 3PVs and 3 legs "mirror" LV:

# lvcreate -l100%FREE --type mirror -m2 vg3
  Insufficient free space for log allocation for logical volume .
  Unable to allocate extents for mirror log.

Related: rhbz1269533

7 years agotest: "Disable" lvconvert-raid-reshape
Marian Csontos [Thu, 12 Oct 2017 08:53:22 +0000 (10:53 +0200)]
test: "Disable" lvconvert-raid-reshape

...when running from ramdisk. This causes test failure, so it is kept on
eyes.

7 years agotest: update fsadm-crypt to pass with legacy cryptsetup
Ondrej Kozina [Tue, 10 Oct 2017 15:44:11 +0000 (17:44 +0200)]
test: update fsadm-crypt to pass with legacy cryptsetup

7 years agofsadm: implement 'check' for a fs on top of LUKS
Ondrej Kozina [Wed, 11 Oct 2017 09:17:36 +0000 (11:17 +0200)]
fsadm: implement 'check' for a fs on top of LUKS

7 years agofsadm: fail 'check' explicitly on unsupported fs type
Ondrej Kozina [Wed, 11 Oct 2017 08:20:38 +0000 (10:20 +0200)]
fsadm: fail 'check' explicitly on unsupported fs type

7 years agofsadm: respect DM_DEV_DIR variable
Ondrej Kozina [Tue, 10 Oct 2017 15:43:45 +0000 (17:43 +0200)]
fsadm: respect DM_DEV_DIR variable

7 years agoactivation: fix activation lock
Zdenek Kabelac [Wed, 11 Oct 2017 10:41:28 +0000 (12:41 +0200)]
activation: fix activation lock

Activation lock has a primary purpose to serialize locking of individual
LV in case there is no other protecting mechanism for parallel
execution.

However in the case an activated LV is composed from several other LVs,
noone should be able to manipulate with those LVs as well.

This patch add a very 'naive' global VG activation locking in this case.
In the future we may introduce smarter function detecting minimal closed
graph components if this will appear as bottleneck

Patch checks if the  VG Write lock is held - in this case we do not
need any more locking - command has exclusive access to VG.

In case we have clustered VG and we are activating an LV which does not
need other LVs - we also do not need any more locks.

In all other cases take respective lock - for single LV - use lvid,
for complex LVs  use vgname.

7 years agoactivation: fix locking resource name for activation lock
Zdenek Kabelac [Mon, 9 Oct 2017 13:36:41 +0000 (15:36 +0200)]
activation: fix locking resource name for activation lock

Avoid cutting away 1st. character for activation lock.
Unlike with VG name locks like #orphan we should not cut-off 1st.
characted from resource name.

7 years agotest: fsadm-crypt.sh fixes
Ondrej Kozina [Tue, 10 Oct 2017 13:45:15 +0000 (15:45 +0200)]
test: fsadm-crypt.sh fixes

use conservative 'luksOpen' command instead
fix reiserfs tests on plain crypt devices

7 years agofsadm: minor fixes for crypt support
Ondrej Kozina [Tue, 10 Oct 2017 13:21:28 +0000 (15:21 +0200)]
fsadm: minor fixes for crypt support

drop useless asterisk expansion
enforce matching string prefix by adding ^

7 years agotest: add fsadm crypt test
Ondrej Kozina [Tue, 10 Oct 2017 11:15:10 +0000 (13:15 +0200)]
test: add fsadm crypt test

7 years agofsadm: add support for crypt devices
Ondrej Kozina [Fri, 6 Oct 2017 14:28:35 +0000 (16:28 +0200)]
fsadm: add support for crypt devices

7 years agothin: Improve overprovisioning and repair warnings.
Alasdair G Kergon [Mon, 9 Oct 2017 18:48:00 +0000 (19:48 +0100)]
thin: Improve overprovisioning and repair warnings.

7 years agoraid: cleanup raid4/5/6/10 validation check
Heinz Mauelshagen [Mon, 9 Oct 2017 14:13:45 +0000 (16:13 +0200)]
raid: cleanup raid4/5/6/10 validation check

7 years agoraid: fix validation check for raid0 segment data_offset member
Heinz Mauelshagen [Mon, 9 Oct 2017 13:21:51 +0000 (15:21 +0200)]
raid: fix validation check for raid0 segment data_offset member

Commit 2f754b73ffdaa95af4a6d703e31b76d4efbf7a36 missed one.

7 years agolvcreate: fix region size on striped RaidLVs
Heinz Mauelshagen [Mon, 9 Oct 2017 12:34:10 +0000 (14:34 +0200)]
lvcreate: fix region size on striped RaidLVs

Creating striped RaidLVs with lv size not divisible by region size
caused the region size to be adjusted:

# lvcreate   --type raid5 -n region_check.32.00m_3 -i 3 -L 1g --nosync -R 32.00m raid_sanity
  Using default stripesize 64.00 KiB.
  Rounding size 1.00 GiB (256 extents) up to stripe boundary size <1.01 GiB(258 extents).
  WARNING: New raid5 won't be synchronised. Don't read what you didn't write!
  Using reduced mirror region size of 8.00 MiB
  Logical volume region_check.32.00m_3 created.

Fix by not imposing "mirror" constraints on "raid".

Resolves: rhbz1404007

7 years agoraid: fix validation checks for segment data_offset member
Heinz Mauelshagen [Mon, 9 Oct 2017 12:00:46 +0000 (14:00 +0200)]
raid: fix validation checks for segment data_offset member

Commit 222e1e3acee399b0acf31565f784716d67c465a8 was not
valuing special case of data_ofset member equal to 1.

7 years agoraid: return previous reshape space allocation properly
Heinz Mauelshagen [Mon, 9 Oct 2017 11:53:27 +0000 (13:53 +0200)]
raid: return previous reshape space allocation properly

Fix returning previous allocation of reshape space.

7 years agoman: regenerate
Alasdair G Kergon [Fri, 6 Oct 2017 22:10:02 +0000 (23:10 +0100)]
man: regenerate

7 years agopost-release
Alasdair G Kergon [Fri, 6 Oct 2017 21:16:58 +0000 (22:16 +0100)]
post-release

7 years agopre-release v2_02_175
Alasdair G Kergon [Fri, 6 Oct 2017 21:10:48 +0000 (22:10 +0100)]
pre-release

7 years agovgmerge: Fix intermediate metadata corruption
Alasdair G Kergon [Fri, 6 Oct 2017 01:12:42 +0000 (02:12 +0100)]
vgmerge: Fix intermediate metadata corruption

vgmerge suffers from a similar problem to the one fixed in commit
8146548d25e9104f0d530d943290d448c1994c0a ("vgsplit: Fix intermediate
metadata corruption.")

When merging, splitting or renaming VGs, use a new PV status flag
PV_MOVED_VG to mark the PVs that hold metadata with the old VG name and
use this to provide PV-level granularity instead of incorrectly assuming
all PVs in the VG are the same.

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