]> sourceware.org Git - lvm2.git/log
lvm2.git
6 years agotoollib: avoid printing default stripe size
Zdenek Kabelac [Fri, 17 Nov 2017 22:02:44 +0000 (23:02 +0100)]
toollib: avoid printing default stripe size

When user is not creating striped LV, do not print
rather confusing info about default stripe size.

6 years agopvmove: finish no longer needs explicit resumed
Zdenek Kabelac [Fri, 24 Nov 2017 13:00:22 +0000 (14:00 +0100)]
pvmove: finish no longer needs explicit resumed

Activation code can see from holders needed LVs for resume.

6 years agoactivation: automaticaly discover pvmove holders
Zdenek Kabelac [Fri, 24 Nov 2017 12:55:42 +0000 (13:55 +0100)]
activation: automaticaly discover pvmove holders

When pvmove is finished and does 'suspend/resume' on PVMOVE LV,
on resume path committed metadata are already showing 'standalone'
pvmove LV prepared just for removal.

However code should be able to 'resume' preloaded LV there were
participating in pvmove operation.

Previously this was all done in the 'tools' part of lvm2 code.
So the lvconvert upon pvmove finish had to explicitely call 'resume' on every such LV.
Now 'smarted' activation code is able to deduce and combine all information from
the active dm table and committed metadata so single  call resolves
it all in one go.

Internally holders are detected by reading sysfs directory to capture
all needed UUID which are then looked in lvm2 metadata and all such
LVs are automatically collected into dmtree.

6 years agomirror: use lv_update_and_reload_origin
Zdenek Kabelac [Fri, 24 Nov 2017 12:58:23 +0000 (13:58 +0100)]
mirror: use lv_update_and_reload_origin

Replace complex code with standard lv_update_and_reload_origin().
Extra suspend should not be necessary.
(If they would be - dependency tree would have bug for fixing).

6 years agolibdm: preload propagates delayed resume
Zdenek Kabelac [Fri, 24 Nov 2017 12:57:22 +0000 (13:57 +0100)]
libdm: preload propagates delayed resume

Propagate delayed resume at least for preload case in a simple way.
Currently  PVMOVE depends on internal logic where 'mirror' with
corelog is 'possible' PVMOVE. In such case resume of 'created'
node is 'delayed'.

This is mostly an ugly internal hack - but for the moment being when we
add propagation for preload - it does work reasonable.

TODO: provide standard API and avoid this internal 'guessing'.

6 years agolocking: pvmove is locking holding LV
Zdenek Kabelac [Fri, 24 Nov 2017 12:55:57 +0000 (13:55 +0100)]
locking: pvmove is locking holding LV

As we do get lock for pvmove LV - it's lockholder ATM.

6 years agoresume: secure critical section
Zdenek Kabelac [Fri, 24 Nov 2017 12:53:02 +0000 (13:53 +0100)]
resume: secure critical section

Only  thin-pool with origin_only suspend is allowed to be not suspending anything.
In such case pairing resume will 'decrement' critical section counter.

6 years agosuspend: handle start of pvmove
Zdenek Kabelac [Fri, 24 Nov 2017 12:51:17 +0000 (13:51 +0100)]
suspend: handle start of pvmove

Just like suspend handles preload for pvmove finish,
in similar way handle suspend of starting pvmove.

In this case the  precommited metadata are checked for list of PVMOVEed
LVs and those are suspended in with committed metadata.

6 years agolvconvert: prevent combining split snapshots in shared vg
David Teigland [Tue, 21 Nov 2017 17:45:49 +0000 (11:45 -0600)]
lvconvert: prevent combining split snapshots in shared vg

splitting snapshots was already prevented.

6 years agoman: lvmlockd steps for changing lock type
David Teigland [Tue, 21 Nov 2017 16:37:00 +0000 (10:37 -0600)]
man: lvmlockd steps for changing lock type

were not quite correct

6 years agolvmlockd: override unknown lock manager error numbers
David Teigland [Wed, 15 Nov 2017 22:00:41 +0000 (16:00 -0600)]
lvmlockd: override unknown lock manager error numbers

When sanlock or dlm lock managers return an error number
that we don't recognize, replace it with a generic -ELMERR
which is defined in the set of special lvmlockd error
numbers.  Otherwise, an unknown lock manager error number
could be misinterpreted for something else if it happened
to overlap another set of error numbers (which they have
not thus far.)

6 years agolvmlockd: retry on other sanlock errors
David Teigland [Wed, 15 Nov 2017 21:34:42 +0000 (15:34 -0600)]
lvmlockd: retry on other sanlock errors

These less common errors returned from sanlock should
also cause sanlock to retry the lock acquire:

- i/o timeout occurs during sanlock_acquire().
  other i/o on the same disk as the leases can cause
  sanlock i/o timeouts.

- low level disk paxos contention between hosts naturally
  causes one host to not acquire the lease.  There are a
  couple special error numbers associated with these cases
  that should just be recognized as a normal failure to
  acquire the lease.

6 years agodevice: log debug when I/O bounce buffer used
Alasdair G Kergon [Thu, 16 Nov 2017 19:16:10 +0000 (19:16 +0000)]
device: log debug when I/O bounce buffer used

6 years agolvmdiskscan: Remove unnecessary read.
Alasdair G Kergon [Thu, 16 Nov 2017 19:13:03 +0000 (19:13 +0000)]
lvmdiskscan: Remove unnecessary read.

dev_get_size will open the device itself.

6 years agoraid: add validation checks for reshape flags
Heinz Mauelshagen [Wed, 15 Nov 2017 20:24:44 +0000 (21:24 +0100)]
raid: add validation checks for reshape flags

Enhance vg_validate() raid checking functions to check for
flags  LV_RESHAPE and LV_RESHAPE_DELTA_DISKS_(MINUS|PLUS).

6 years agotests: pvmove supports more cases
Zdenek Kabelac [Fri, 10 Nov 2017 23:15:15 +0000 (00:15 +0100)]
tests: pvmove supports more cases

pvmove handles cached LVs as well as snapshots now.

6 years agopvmove: remove unusued code
Zdenek Kabelac [Fri, 10 Nov 2017 20:48:33 +0000 (21:48 +0100)]
pvmove: remove unusued code

Support for snapshot and cache LVs should now work.
Remove protection rejecting pvmove for them.

6 years agopvmove: activation changes
Zdenek Kabelac [Wed, 15 Nov 2017 13:26:10 +0000 (14:26 +0100)]
pvmove: activation changes

Do not use precommitted LV for suspend of pvmoving LVs.

6 years agopvmove: change locking on finish
Zdenek Kabelac [Tue, 14 Nov 2017 19:53:55 +0000 (20:53 +0100)]
pvmove: change locking on finish

6 years agocleanup: update log messages
Zdenek Kabelac [Tue, 14 Nov 2017 10:35:25 +0000 (11:35 +0100)]
cleanup: update log messages

6 years agoactivate_lvs: use exclusive activation
Zdenek Kabelac [Tue, 14 Nov 2017 10:46:43 +0000 (11:46 +0100)]
activate_lvs: use exclusive activation

There is no need to differentiation between clustered VG and normal VG.
As the activation depends on locking type.

Use unconditionally locally exclusive activation for pvmove.

6 years agopvmove: always flush when working with pvmove tree
Zdenek Kabelac [Wed, 15 Nov 2017 11:07:47 +0000 (12:07 +0100)]
pvmove: always flush when working with pvmove tree

6 years agoactivation: suspend pvmove using lv.
Zdenek Kabelac [Wed, 15 Nov 2017 11:08:33 +0000 (12:08 +0100)]
activation: suspend pvmove using lv.

Whenever pvmove tree is going to be generated for suspend
and such LV has a user - use this 'using LV' to generate
correct dm tree  holding all components.

6 years agoactivation: check subLV before skipping resume
Zdenek Kabelac [Fri, 10 Nov 2017 20:15:50 +0000 (21:15 +0100)]
activation: check subLV before skipping resume

LV is asked for resume, and its already resume and tool
is inside 'critical_section()' check if there is any suspended sub LV.
In that case 'resume' operation will not be skipped.

6 years agoactivate_lvs: deactivate on uniterate
Zdenek Kabelac [Tue, 14 Nov 2017 10:35:50 +0000 (11:35 +0100)]
activate_lvs: deactivate on uniterate

When activation of LVs fails prior pvmove start, try to deactivate
already activated LVs.

TODO: possibly remember which LVs where already activate and only those
take down - devices which are already in-use will stay active.

6 years agolayers: collect only lock holding LVs
Zdenek Kabelac [Thu, 9 Nov 2017 10:41:16 +0000 (11:41 +0100)]
layers: collect only lock holding LVs

6 years agopvmove: return pvmove itself
Zdenek Kabelac [Tue, 14 Nov 2017 19:44:32 +0000 (20:44 +0100)]
pvmove: return pvmove itself

When find_pvmove_lv_in_lv() get already a 'pvmoving' LV - return it.

6 years agopvmove: snapshots need to go with origin device
Zdenek Kabelac [Fri, 10 Nov 2017 20:18:55 +0000 (21:18 +0100)]
pvmove: snapshots need to go with origin device

Enable future support for pvmove for COW LVs.

6 years agoUpdate WHATS_NEW
Marian Csontos [Wed, 15 Nov 2017 09:01:50 +0000 (10:01 +0100)]
Update WHATS_NEW

6 years agoregenerate man and conf
Alasdair G Kergon [Wed, 15 Nov 2017 01:05:07 +0000 (01:05 +0000)]
regenerate man and conf

6 years agolog: Add io debug class
Alasdair G Kergon [Wed, 15 Nov 2017 00:59:30 +0000 (00:59 +0000)]
log: Add io debug class

6 years agometadata: Eliminate redundant nested VG metadata
Alasdair G Kergon [Tue, 14 Nov 2017 15:38:55 +0000 (15:38 +0000)]
metadata: Eliminate redundant nested VG metadata

Only lv_committed() now uses vg->vg_committed and it appears redundant
if its contents match the enclosing VG so don't waste cycles creating it
when that's known to be true when no write lock is held so the struct
won't get modified.

6 years agotest: additional avoid have_raid overhead
Heinz Mauelshagen [Tue, 14 Nov 2017 13:17:54 +0000 (14:17 +0100)]
test: additional avoid have_raid overhead

6 years agotest: avoid have_raid overhead
Heinz Mauelshagen [Tue, 14 Nov 2017 13:15:09 +0000 (14:15 +0100)]
test: avoid have_raid overhead

6 years agoraid: correct raid6_n_6 -> raid5 convenience type
Heinz Mauelshagen [Mon, 13 Nov 2017 17:03:50 +0000 (18:03 +0100)]
raid: correct raid6_n_6 -> raid5 convenience type

Fix "lvconvert --type raid5 RaidLV" on a "raid6_n_6" LV offering
false "raid6_ls_6" instead of "raid5_n".

6 years agometadata: Remove unused vg.cft_precommitted
Alasdair G Kergon [Tue, 14 Nov 2017 01:09:58 +0000 (01:09 +0000)]
metadata: Remove unused vg.cft_precommitted

The precommitted metadata config_tree is now only referenced from a
single function so just use a local variable instead.

6 years agolog: Improve various device-related messages
Alasdair G Kergon [Mon, 13 Nov 2017 14:43:32 +0000 (14:43 +0000)]
log: Improve various device-related messages

- Use 'lvmcache' consistently instead of 'metadata cache'
- Always use 5 characters for source line number
- Remember to convert uuids into printable form
- Use <no name> rather than (null) when VG has no name.

6 years agopersistent filter: Skip import before rescan
Alasdair G Kergon [Mon, 13 Nov 2017 19:45:16 +0000 (19:45 +0000)]
persistent filter: Skip import before rescan

The persistent filter should not be imported by any command that doesn't
use it so take addtional note of REQUIRES_FULL_LABEL_SCAN (for vgrename)
and introduce IGNORE_PERSISTENT_FILTER for vgscan and pvscan.

6 years agotests: use nonflusing status
Zdenek Kabelac [Fri, 10 Nov 2017 15:18:41 +0000 (16:18 +0100)]
tests: use nonflusing status

Avoid being blocked when reporting status with flushing on some stacked
device tree.

6 years agolv_lock_holder: unused cache-pool is not lock holder
Zdenek Kabelac [Fri, 10 Nov 2017 23:18:22 +0000 (00:18 +0100)]
lv_lock_holder: unused cache-pool is not lock holder

Unused cache-pool is only a constainer for data and metadata,
and does not present localble entity.

6 years agolvremove: for unused cache deactive sublv
Zdenek Kabelac [Fri, 10 Nov 2017 23:19:04 +0000 (00:19 +0100)]
lvremove: for unused cache deactive sublv

6 years agoreload: do not take backup with suspended devices
Zdenek Kabelac [Fri, 10 Nov 2017 12:28:33 +0000 (13:28 +0100)]
reload: do not take backup with suspended devices

If the suspend/resume sequence would leave some device in suspend
for possible later resume, backup cannot be takes (fs holding backups
could be still frozen in critical section())

6 years agocleanup: remove stack tracing for ok path
Zdenek Kabelac [Fri, 10 Nov 2017 12:41:45 +0000 (13:41 +0100)]
cleanup: remove stack tracing for ok path

6 years agocleanup: constify lv parameter
Zdenek Kabelac [Wed, 8 Nov 2017 13:24:09 +0000 (14:24 +0100)]
cleanup: constify lv parameter

6 years agoraid: protect raid4 activation
Zdenek Kabelac [Thu, 9 Nov 2017 12:00:28 +0000 (13:00 +0100)]
raid: protect raid4 activation

Move check for presence of raid4 into the right place
so there is no way how to hit activation of any LV
with raid4 on kernel which does not support it.

6 years agotest: check dmsetup hides integrity encryption keys
Ondrej Kozina [Fri, 10 Nov 2017 14:15:43 +0000 (15:15 +0100)]
test: check dmsetup hides integrity encryption keys

6 years agodmsetup: hide integrity encryption keys on table output
Ondrej Kozina [Fri, 10 Nov 2017 12:55:04 +0000 (13:55 +0100)]
dmsetup: hide integrity encryption keys on table output

6 years agotest: D-Bus test_nesting requires filter
Marian Csontos [Thu, 9 Nov 2017 09:56:15 +0000 (10:56 +0100)]
test: D-Bus test_nesting requires filter

6 years agotest: Rename test nothing methods
Marian Csontos [Thu, 9 Nov 2017 08:52:36 +0000 (09:52 +0100)]
test: Rename test nothing methods

These two methods might be useful for debugging, but are not testing
anything.

6 years agoraid: reject message for 2-legged raid4/5 -> striped
Heinz Mauelshagen [Wed, 8 Nov 2017 17:17:26 +0000 (18:17 +0100)]
raid: reject message for 2-legged raid4/5 -> striped

Commit 763db8aab02d7df551a3e8500d261ef6c9651bdb rejects 2-legged
conversions to striped/raid0 but different messages are displayed
for raid0 or striped. This commit provides the same rejection messages.

6 years agoraid: reject conversion request to striped/raid0 on 2-legged raid4/5
Heinz Mauelshagen [Wed, 8 Nov 2017 16:49:04 +0000 (17:49 +0100)]
raid: reject conversion request to striped/raid0 on 2-legged raid4/5

raid4/5 LVs may only be converted to striped or raid0/raid0_meta
in case they have at least 3 legs. 2-legged raid4/5 are a result
of either converting a raid1 to raid4/5 (takeover) or converting
a raid4/5 with more than 2 legs to raid1 with 2 legs (reshape).

The raid4/5 personalities map those as raid1,
thus reject conversion to striped/raid0.

Resolves: rhbz1511047

6 years agotests: allow to proceed futher with test
Zdenek Kabelac [Tue, 7 Nov 2017 23:00:06 +0000 (00:00 +0100)]
tests: allow to proceed futher with test

So raid doesn't want to create raid arrays with bigger regionsize ATM,
so just use smaller regionsize.

6 years agotests: detect racy systemd version
Zdenek Kabelac [Tue, 7 Nov 2017 22:59:04 +0000 (23:59 +0100)]
tests: detect racy systemd version

Systemd 222 has a bug - where it's sometimes umount unpredictibly just
mounted device - skip testing when this happens.

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.

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