]> sourceware.org Git - lvm2.git/log
lvm2.git
7 years agoblkdeactivate: split local declaration and assign
Zdenek Kabelac [Wed, 28 Jun 2017 14:50:34 +0000 (16:50 +0200)]
blkdeactivate: split local declaration and assign

7 years agoblkdeactivate: drop unused var
Zdenek Kabelac [Wed, 28 Jun 2017 17:36:49 +0000 (19:36 +0200)]
blkdeactivate: drop unused var

7 years agoblkdeactivate: double quote
Zdenek Kabelac [Wed, 28 Jun 2017 14:33:00 +0000 (16:33 +0200)]
blkdeactivate: double quote

Using double quote to prevent globbing and word splitting.

7 years agoblkdeactivate: replace obsoleted syntax
Zdenek Kabelac [Wed, 28 Jun 2017 14:15:36 +0000 (16:15 +0200)]
blkdeactivate: replace obsoleted syntax

7 years agofsadm: make if statement more clear
Zdenek Kabelac [Wed, 28 Jun 2017 14:13:29 +0000 (16:13 +0200)]
fsadm: make if statement more clear

7 years agofsadm: add -r to read
Zdenek Kabelac [Wed, 28 Jun 2017 14:07:33 +0000 (16:07 +0200)]
fsadm: add -r to read

read without -r will mangle backslashes

7 years agofsadm: no mixing string and array
Zdenek Kabelac [Thu, 29 Jun 2017 14:01:42 +0000 (16:01 +0200)]
fsadm: no mixing string and array

Argument mixes string and array. Use * or separate argument.

7 years agofsadm: split local var dev
Zdenek Kabelac [Wed, 28 Jun 2017 14:02:13 +0000 (16:02 +0200)]
fsadm: split local var dev

Split defining of local variables from being them
assigned at the same time (lossing error code).

7 years agofsadm: remove surrounding $()
Zdenek Kabelac [Thu, 29 Jun 2017 14:04:19 +0000 (16:04 +0200)]
fsadm: remove surrounding $()

Remove surrounding $() to avoid executing output

7 years agofsadm: fix shell globbing
Zdenek Kabelac [Thu, 29 Jun 2017 11:15:47 +0000 (13:15 +0200)]
fsadm: fix shell globbing

Fixing reported issue for shellcheck.
Use "" properly to avoid having shell variables split.

7 years agopost-release
Alasdair G Kergon [Wed, 28 Jun 2017 16:00:49 +0000 (17:00 +0100)]
post-release

7 years agopre-release v2_02_172
Alasdair G Kergon [Wed, 28 Jun 2017 15:38:46 +0000 (16:38 +0100)]
pre-release

7 years agocommand: we don't have all standard macros
Zdenek Kabelac [Wed, 28 Jun 2017 13:05:16 +0000 (15:05 +0200)]
command: we don't have all standard macros

So just quite warning

7 years agocoverity: checked_return of close
Zdenek Kabelac [Wed, 28 Jun 2017 12:40:35 +0000 (14:40 +0200)]
coverity: checked_return of close

Check (or make quiet) close() ret code.
NOTE: there is another duplicated code of daemonize function which
should be converted to libdaemon.

7 years agoman: regenerate
Alasdair G Kergon [Tue, 27 Jun 2017 14:47:00 +0000 (15:47 +0100)]
man: regenerate

7 years agolog: fix message prefix truncation
Alasdair G Kergon [Tue, 27 Jun 2017 11:41:59 +0000 (12:41 +0100)]
log: fix message prefix truncation

Restore the 29-character prefix limit that commit
e907535ab977ea29319aeb015cec6c06729f7ce4 ("coverity: use better
function") accidentally reduced to 28 characters.

7 years agocoverity: model few more functions
Zdenek Kabelac [Tue, 27 Jun 2017 07:23:22 +0000 (09:23 +0200)]
coverity: model few more functions

Reduce amount of FP.

7 years agocoverity: move initilization of count variable
Zdenek Kabelac [Tue, 27 Jun 2017 10:05:27 +0000 (12:05 +0200)]
coverity: move initilization of count variable

Make code more understandble for Coverity, so it sees connection
between 'extents' and 'count' and in fact code is more readable.

7 years agocoverity: drop unneeded assigns
Zdenek Kabelac [Tue, 27 Jun 2017 09:38:56 +0000 (11:38 +0200)]
coverity: drop unneeded assigns

7 years agocoverity: validate length of renaming path
Zdenek Kabelac [Tue, 27 Jun 2017 09:37:24 +0000 (11:37 +0200)]
coverity: validate length of renaming path

Make sure path fits into buffer on stack.

7 years agocoverity: check malloc results
Zdenek Kabelac [Tue, 27 Jun 2017 08:18:00 +0000 (10:18 +0200)]
coverity: check malloc results

7 years agocoverity: use better function
Zdenek Kabelac [Tue, 27 Jun 2017 08:17:33 +0000 (10:17 +0200)]
coverity: use better function

7 years agocoverity: extra check for find_pool_seg
Zdenek Kabelac [Tue, 27 Jun 2017 08:16:13 +0000 (10:16 +0200)]
coverity: extra check for find_pool_seg

find_pool_seg may return NULL in some internal error stats.
Handle it explicitely.

7 years agodebug: more display_lvname usage
Zdenek Kabelac [Tue, 27 Jun 2017 06:28:36 +0000 (08:28 +0200)]
debug: more display_lvname usage

7 years agocoverity: validate retval from get_only_segment_using_this_lv
Zdenek Kabelac [Mon, 26 Jun 2017 22:24:34 +0000 (00:24 +0200)]
coverity: validate retval from get_only_segment_using_this_lv

7 years agocoverity: add some error path for failed allocs
Zdenek Kabelac [Mon, 26 Jun 2017 21:57:12 +0000 (23:57 +0200)]
coverity: add some error path for failed allocs

Coverity reports some unchecked allocations.

7 years agodebug: use display_lvname
Zdenek Kabelac [Mon, 26 Jun 2017 21:58:06 +0000 (23:58 +0200)]
debug: use display_lvname

7 years agodebug: fix error path
Zdenek Kabelac [Mon, 26 Jun 2017 21:32:04 +0000 (23:32 +0200)]
debug: fix error path

Coverity:
log_error may have dereference NULL pointer - use directly
segtype string name.

7 years agodebug: fail in backup is not traced nor error
Zdenek Kabelac [Mon, 26 Jun 2017 21:27:10 +0000 (23:27 +0200)]
debug: fail in backup is not traced nor error

7 years agodebug: tracing error path
Zdenek Kabelac [Mon, 26 Jun 2017 21:21:22 +0000 (23:21 +0200)]
debug: tracing error path

7 years agodebug: check for fail in id validation
Zdenek Kabelac [Mon, 26 Jun 2017 21:20:29 +0000 (23:20 +0200)]
debug: check for fail in id validation

7 years agocleanup: remove unused code
Zdenek Kabelac [Mon, 26 Jun 2017 21:19:57 +0000 (23:19 +0200)]
cleanup: remove unused code

7 years agodev_manager: add missing validation for usable target_name
Zdenek Kabelac [Mon, 26 Jun 2017 21:34:38 +0000 (23:34 +0200)]
dev_manager: add missing validation for usable target_name

Coverity shown path where target_name == NULL would be dereferenced.

7 years agoraid: fix write_commit_backup
Zdenek Kabelac [Mon, 26 Jun 2017 21:25:24 +0000 (23:25 +0200)]
raid: fix write_commit_backup

With commit 41c10034aa0db3c63f18ff78b64af3a799c154a1 we actually
do require LV to be used with _vg_write_lv_suspend_commit_backup().

So write a proper separte single wrapper for write && commit && backup.

7 years agocmdline: fix missing NULL at end of array of args
Zdenek Kabelac [Mon, 26 Jun 2017 18:03:05 +0000 (20:03 +0200)]
cmdline: fix missing NULL at end of array of args

lvm_run needs to place NULL as the last element into argv[].
Otherwise we get:

Conditional jump or move depends on uninitialised value(s)
 _command_required_pos_matches (lvmcmdline.c:1443)
 _find_command (lvmcmdline.c:1610)
 lvm_run_command (lvmcmdline.c:2770)
 lvm2_run (lvmcmdlib.c:91)

7 years agolibdm: fix initialization of head for reused structure
Zdenek Kabelac [Mon, 26 Jun 2017 16:22:40 +0000 (18:22 +0200)]
libdm: fix initialization of head for reused structure

Dmeventd reuses  'dm_task' struct for some STATUS operation, but due to
missing reinitization of dm_task target list, it has caused misprocesing
of recieved events as the parsed target has been simply added to the
list of existing status and cause multiple actions being called for
single event.

7 years agotests: show more debug info
Zdenek Kabelac [Sat, 24 Jun 2017 21:01:26 +0000 (23:01 +0200)]
tests: show more debug info

Helpful for analysis (revert later).

7 years agotests: slightly longer delay
Zdenek Kabelac [Sat, 24 Jun 2017 20:58:08 +0000 (22:58 +0200)]
tests: slightly longer delay

Try to avoid race with slightly longer delay.

7 years agoraid: allow more sync action for extraction
Zdenek Kabelac [Sat, 24 Jun 2017 20:28:25 +0000 (22:28 +0200)]
raid: allow more sync action for extraction

Since we discovered status reporting from 'md' goes from large set
of weird states we can't just decided based on this word.
So let it pass for rebuild and idle as well
and check for health devices afterwards.

7 years agotests: correct percent values are reported
Zdenek Kabelac [Sat, 24 Jun 2017 15:24:38 +0000 (17:24 +0200)]
tests: correct percent values are reported

7 years agotests: unit test for percent printing
Zdenek Kabelac [Sat, 24 Jun 2017 11:33:36 +0000 (13:33 +0200)]
tests: unit test for percent printing

7 years agocleanup: use display_percent
Zdenek Kabelac [Sat, 24 Jun 2017 14:22:36 +0000 (16:22 +0200)]
cleanup: use display_percent

Replace occurence of %.2f with call of display_percent function.

7 years agodisplay: add display_percent function
Zdenek Kabelac [Sat, 24 Jun 2017 14:03:21 +0000 (16:03 +0200)]
display: add display_percent function

Add universal function to print dm_percent_t values via single
code path.

TODO: extend with configurale precision of printed values.

7 years agolibdm: use rounded float for percent print
Zdenek Kabelac [Sat, 24 Jun 2017 14:39:50 +0000 (16:39 +0200)]
libdm: use rounded float for percent print

Use new added  dm_percent_to_round_float to enhance print
of percentage values.

7 years agolibdm: implement dm_percent_to_round_float
Zdenek Kabelac [Sat, 24 Jun 2017 11:24:26 +0000 (13:24 +0200)]
libdm: implement dm_percent_to_round_float

Add function to adjust printing of percent values in better way.
Rounding here is going along following rules:

0% & 100% are always clearly reported with  .0 decimal points.

Values slightly above 0% we make sure a nearest bigger
non zero value with given precission is printed
(i.e. 0.01  for  %.2f  will be shown)

For values closely approaching 100% we again detect and adjust value
that is less then 100 when printed.
(i.e. 99.99  for %.2f will be shown).

For other values we are leaving them with standard rounding mechanism
since we care mainly about corner values 0 & 100 which need to be
printed precisely.

7 years agodmeventd: improve more raid status reporting
Zdenek Kabelac [Fri, 23 Jun 2017 22:06:12 +0000 (00:06 +0200)]
dmeventd: improve more raid status reporting

When we want to report primary leg failure, check for intial 'a',
since otherwice 'Aa idle' is normally visible.

Also reset array of bit flags marking dead devices, once
plugin detects raid is in sync.

7 years agotests: use allocate policy in raid test
Zdenek Kabelac [Fri, 23 Jun 2017 21:22:34 +0000 (23:22 +0200)]
tests: use allocate policy in raid test

7 years agotests: add transient failure test
Zdenek Kabelac [Fri, 23 Jun 2017 21:20:01 +0000 (23:20 +0200)]
tests: add transient failure test

Check raid  repairs still 'present', but failed device.

TODO: tests needs more checking about repair actually doing its work.

7 years agotests: require also no 'a' for in-sync
Zdenek Kabelac [Fri, 23 Jun 2017 19:14:29 +0000 (21:14 +0200)]
tests: require also no 'a' for in-sync

Raid easily reports  'idle' with 'a', so in this case
we will not report in-sync.

7 years agoraid: plugin does not to use --config
Zdenek Kabelac [Fri, 23 Jun 2017 19:15:37 +0000 (21:15 +0200)]
raid: plugin does not to use --config

Functionality of ignore suspend devices is already granted by:

lvm2_disable_dmeventd_monitoring() -> init_run_by_dmeventd() ->
init_ignore_suspended_devices().

In fact plugins should never use --config because it has
some unpleasant technical issues.

7 years agoraid: recognize transient failed raid leg
Zdenek Kabelac [Fri, 23 Jun 2017 20:50:19 +0000 (22:50 +0200)]
raid: recognize transient failed raid leg

When raid leg rimage device is marked as 'D'ead by mdcore,
lvm2 was not able to replace such device with allocate policy,
as device has not appared as missing.

Add detection of transiently failing devices.

7 years agotests: request 1.12 for reshaping raid
Zdenek Kabelac [Fri, 23 Jun 2017 12:52:34 +0000 (14:52 +0200)]
tests: request 1.12 for reshaping raid

We will need  1.12 as the kernel needs some mandatory md fixes,
otherwise random freezes may appear.

7 years agotests: handle su login difference
Zdenek Kabelac [Fri, 23 Jun 2017 13:11:26 +0000 (15:11 +0200)]
tests: handle su login difference

Workaround case, where it matters if 'su' was user with '-' or without.

7 years agocleanup: update messages
Zdenek Kabelac [Fri, 23 Jun 2017 08:59:12 +0000 (10:59 +0200)]
cleanup: update messages

7 years agodebug: add missing internal error message
Zdenek Kabelac [Fri, 23 Jun 2017 12:41:10 +0000 (14:41 +0200)]
debug: add missing internal error message

Do not just 'return_0'  log error would need to be shown.

7 years agocache: restore origin only reload
Zdenek Kabelac [Fri, 23 Jun 2017 15:05:24 +0000 (17:05 +0200)]
cache: restore origin only reload

Basically reverting commit 58a9f88b8c021a5e056b883053f257f1a898adf7.
We can use origin_only  in case we are snapshot's origin,
as we do support this stack.

So when we are 'uncaching'  origin+snaps - we do need to reload only
origin and we do not need to play with snaps.

7 years agoraid: switch message to verbose
Zdenek Kabelac [Fri, 23 Jun 2017 09:14:31 +0000 (11:14 +0200)]
raid: switch message to verbose

As this is not 'error' resulting query, decrease reported level.

7 years agoraid: improving messages for regionsize change
Zdenek Kabelac [Fri, 23 Jun 2017 12:40:10 +0000 (14:40 +0200)]
raid: improving messages for regionsize change

Handle change of 'region size' better and follow also standard rule
if the command can't success (i.e. size is already same) we return
error for all such cases.

Also log_pring more info about adjusted value (just like we
do for rounding)

Also avoid keep pointers on 'display_*' values - they are in
ringbuffer for immediate use - not to be kept across multiple calls
(as they could be already overwritten by later calls) - so dropped
seg_region_size_str

7 years agotests: flushing of cache is abortable
Zdenek Kabelac [Thu, 22 Jun 2017 18:09:00 +0000 (20:09 +0200)]
tests: flushing of cache is abortable

7 years agotests: check lvdisplay for cache works
Zdenek Kabelac [Thu, 22 Jun 2017 18:08:24 +0000 (20:08 +0200)]
tests: check lvdisplay for cache works

7 years agodebug: show message only when origin_only was set
Zdenek Kabelac [Thu, 22 Jun 2017 15:14:47 +0000 (17:14 +0200)]
debug: show message only when origin_only was set

7 years agocache: fix lvdisplay output
Zdenek Kabelac [Thu, 22 Jun 2017 18:05:26 +0000 (20:05 +0200)]
cache: fix lvdisplay output

Unused cache pool may have lots of fields actually undefined,
so avoid printing them, if they are not specified in metadata.

7 years agocache: fix lvdisplay --maps
Zdenek Kabelac [Thu, 22 Jun 2017 17:53:27 +0000 (19:53 +0200)]
cache: fix lvdisplay --maps

'lvdisplay -m' tried to go through NULL policy settings,
when such policy was not defined for CachedLV.

Patch is fixing display of cache-pool without defined settings,
as this is now a valid pool and we mostly want users to define
these settings when actually really caching a LV.

7 years agocache: drop usage of origin_only
Zdenek Kabelac [Thu, 22 Jun 2017 15:12:27 +0000 (17:12 +0200)]
cache: drop usage of origin_only

Since cache LV can be a stacked device, there is no real reason
trying to use slight optimised tree for origin_only cache reload
(it could be even wrongly implemented in this case).

We can easily go with stardard tree load here.

7 years agocache: make syncing abortable by user
Zdenek Kabelac [Thu, 22 Jun 2017 15:08:47 +0000 (17:08 +0200)]
cache: make syncing abortable by user

When user runs command like 'lvconvert --splitcache' the operation
might be actually either slow or not making any progress in kernel,
so lets give user a chance to abort such operation.

When user press 'Ctrl+C' device table is restored to pre-flushing state.

7 years agomirror: reformat conditional
Heinz Mauelshagen [Wed, 21 Jun 2017 22:57:16 +0000 (00:57 +0200)]
mirror: reformat conditional

7 years agoraid: fix segfault
Heinz Mauelshagen [Wed, 21 Jun 2017 22:49:00 +0000 (00:49 +0200)]
raid: fix segfault

Add missing else clause
(already missing in initial commit fe18e5e77a488618510648c7801ea3375ce5aac4).

Resolves: rhbz1463794

7 years agotests: lvresize needs --yes
Zdenek Kabelac [Wed, 21 Jun 2017 11:58:55 +0000 (13:58 +0200)]
tests: lvresize needs --yes

7 years agolvresize: support passing --yes to fsadm
Zdenek Kabelac [Wed, 21 Jun 2017 12:02:57 +0000 (14:02 +0200)]
lvresize: support passing --yes to fsadm

Since fsadm now needs --yes to pass prompting operations,
we need to pass --yes from  lvresize to fsadm.

7 years agoraid: update path for repair
Zdenek Kabelac [Wed, 21 Jun 2017 11:57:22 +0000 (13:57 +0200)]
raid: update path for repair

Updating path from commit 61980bcf0624790bfdc07d371fd510d1c4079fb5.

When repair is running, no removing PVS are given so it shall return
success in such case.

7 years agodebug: missing traces
Zdenek Kabelac [Wed, 21 Jun 2017 09:29:16 +0000 (11:29 +0200)]
debug: missing traces

7 years agoraid: use log_error on error path
Zdenek Kabelac [Wed, 21 Jun 2017 09:58:38 +0000 (11:58 +0200)]
raid: use log_error on error path

Converting log_warn to log_error since error must be logged
when tool returns error.

7 years agoraid: report error when specified devices are not contained
Zdenek Kabelac [Wed, 21 Jun 2017 09:45:20 +0000 (11:45 +0200)]
raid: report error when specified devices are not contained

lvm2 always return non-zero error code when action cannot happen.

7 years agoraid: drop debug code
Zdenek Kabelac [Wed, 21 Jun 2017 09:09:47 +0000 (11:09 +0200)]
raid: drop debug code

7 years agoraid: more origin_only updates
Zdenek Kabelac [Wed, 21 Jun 2017 09:17:03 +0000 (11:17 +0200)]
raid: more origin_only updates

Seems the code is multiplied - so keep it consistent for now.

TODO:  drop all uneeded code

7 years agolvconvert: provide better reshape reject message for open RaidLV
Heinz Mauelshagen [Tue, 20 Jun 2017 17:06:18 +0000 (19:06 +0200)]
lvconvert: provide better reshape reject message for open RaidLV

On commits
5e611c700ba1032ffb71bf0cdd33e062e5e16439 and
601ad1c73faa5fe3d74ff5b06cc47073b40a1850.

Related: rhbz1447812

7 years agoraid: avoid explicit activation of SubLVs on reshape/takeover
Heinz Mauelshagen [Tue, 20 Jun 2017 16:56:45 +0000 (18:56 +0200)]
raid: avoid explicit activation of SubLVs on reshape/takeover

Remove explicit activation of SubLVs and let lv_update_and_reload()
perform the proper (pre-)loading sequencing of tables.
This avoids related callback functions which are removed.

Related: rhbz1448116
Related: rhbz1461526
Related: rhbz1448123

7 years agoraid: provide clickable URL BZ references
Heinz Mauelshagen [Tue, 20 Jun 2017 16:42:09 +0000 (18:42 +0200)]
raid: provide clickable URL BZ references

7 years agotests: test also different lock holder
Zdenek Kabelac [Tue, 20 Jun 2017 16:22:17 +0000 (18:22 +0200)]
tests: test also different lock holder

7 years agotests: avoid double lines
Zdenek Kabelac [Tue, 20 Jun 2017 15:15:07 +0000 (17:15 +0200)]
tests: avoid double lines

Skip showing same line twice in test's verbose log.

7 years agoactivation: fix usage of origin_only
Zdenek Kabelac [Tue, 20 Jun 2017 15:11:42 +0000 (17:11 +0200)]
activation: fix usage of origin_only

When lock-holding LV differs from actually request locked LV,
we drop  origin_only flag as it has no use - it'd be applied
on completely different LV.

Example of problem:

Raid is  thin-pool _tdata LV.
Raid run  origin_only locking on stacked device.
As lock holder is discovered thinLV.
Whole origin_only operation is then applied only on thinLV
changing the meaning of whole operation.

NOTE: this patch does not change anything for LV that are
already top-level lock holding LVs (i.e. thinLVs, snahoshots/origins).

7 years agolvconvert: check open count to disable reshaping of open RAID LV
Heinz Mauelshagen [Tue, 20 Jun 2017 15:59:10 +0000 (17:59 +0200)]
lvconvert: check open count to disable reshaping of open RAID LV

Also check LV open count in addition to opening the RaidLV
exclusively as of commit 601ad1c73faa5fe3d74ff5b06cc47073b40a1850.

Related: rhbz1447812

7 years agolvconvert: enhance disable reshaping of open RAID LV
Heinz Mauelshagen [Tue, 20 Jun 2017 15:27:58 +0000 (17:27 +0200)]
lvconvert: enhance disable reshaping of open RAID LV

Enhance commit 9e9163618ab36a6b046b6380d6ef58429b219ef8
to use dev_open_flags/dev_close API.

Related: rhbz1447812

7 years agotests: check conversion of thin-pool
Zdenek Kabelac [Mon, 19 Jun 2017 21:15:46 +0000 (23:15 +0200)]
tests: check conversion of thin-pool

7 years agothin: restore conversion to raid
Zdenek Kabelac [Mon, 19 Jun 2017 21:11:11 +0000 (23:11 +0200)]
thin: restore conversion to raid

Since commit  1bc546269a7d2cae156827e282715410a4967d51 we've disabled
coversion of raid. This however already got fixed, so reenable
commands like:  'lvconvert --type raid1 vg/pool_tdata'.

7 years agolvconvert: disable reshaping of open RAID LV
Heinz Mauelshagen [Mon, 19 Jun 2017 20:25:54 +0000 (22:25 +0200)]
lvconvert: disable reshaping of open RAID LV

Disable until we have a proper fix for reshape space allocation,
switching it to begin/end of rimages and activation.

Related: rhbz1447812

7 years agolvconvert: enhance message
Heinz Mauelshagen [Mon, 19 Jun 2017 19:40:38 +0000 (21:40 +0200)]
lvconvert: enhance message

Enhance message introduced by last
commit f342e803ba3c32890a2b08736fa94bdd541d5e9c.

Related: rhbz1439399

7 years agolvconvert: disable conversion of RAID LV under snapshot
Heinz Mauelshagen [Mon, 19 Jun 2017 19:08:52 +0000 (21:08 +0200)]
lvconvert: disable conversion of RAID LV under snapshot

Disable until we have a proper fix for reshape space allocation,
switching it to begin/end of rimages and activation.

Related: rhbz1439399

7 years agolvconvert: disable reshaping of RAID LVs in the cluster
Heinz Mauelshagen [Mon, 19 Jun 2017 18:01:01 +0000 (20:01 +0200)]
lvconvert: disable reshaping of RAID LVs in the cluster

Disable until we have a proper fix for reshape space allocation,
switching it to begin/end of rimages and activation in the cluster.

Related: rhbz1448116
Related: rhbz1461526
Related: rhbz1448123

7 years agofsadm: restore no answer
Zdenek Kabelac [Mon, 19 Jun 2017 10:37:40 +0000 (12:37 +0200)]
fsadm: restore no answer

Commit 1fe4f80e45a6bfcceed5aaab97fc0e27dfcf2b88 in current version
introduced regression for a terminal user, as he could not enter 'n'
as answer. Add missing break for this case (No whats_new).

7 years agotest: New test file for validating kernel status during sync ops
Jonathan Brassow [Fri, 16 Jun 2017 15:11:58 +0000 (10:11 -0500)]
test: New test file for validating kernel status during sync ops

New tests to add checking for '100%' in-sync at start of "recover"
process (it shouldn't happen, but I've seen it before).  Also,
check status over the whole cycle of various sync processes ("resync"
and "recover").

7 years agotests: use exclusive activation
Zdenek Kabelac [Wed, 14 Jun 2017 11:59:11 +0000 (13:59 +0200)]
tests: use exclusive activation

Conversion needs exlusively active LV for clustered testing.

7 years agodebug: passing non-raid seg would be internal error
Zdenek Kabelac [Fri, 16 Jun 2017 14:24:38 +0000 (16:24 +0200)]
debug: passing non-raid seg would be internal error

7 years agocleanup: drop unused parameter
Zdenek Kabelac [Thu, 15 Jun 2017 09:21:06 +0000 (11:21 +0200)]
cleanup: drop unused parameter

7 years agocleanup: show what happens when passed prompt
Zdenek Kabelac [Thu, 15 Jun 2017 09:53:01 +0000 (11:53 +0200)]
cleanup: show what happens when passed prompt

When we show prompt and user passes --yes - we still
do tell user which action is going to happen.

7 years agocleanup: improve debug tracing
Zdenek Kabelac [Wed, 14 Jun 2017 14:26:35 +0000 (16:26 +0200)]
cleanup: improve debug tracing

7 years agocleanup: use 'dm_get_status_raid'
Zdenek Kabelac [Fri, 16 Jun 2017 08:48:38 +0000 (10:48 +0200)]
cleanup: use 'dm_get_status_raid'

Use single 'dm' call to parse raid status.
(Avoiding multiple parsers - even when we know it's slighly
less efficient).

7 years agoraid: report percent with segtype info
Zdenek Kabelac [Fri, 16 Jun 2017 11:20:25 +0000 (13:20 +0200)]
raid: report percent with segtype info

Enhance reporting code, so it does not need to do 'extra' ioctl to
get 'status' of normal raid and provide percentage directly.

When we have 'merging' snapshot into raid origin, we still need to get
this secondary number with extra status call - however, since  'raid'
is always a single segment LV - we may skip 'copy_percent' call as
we directly know the percent and also with better precision.

NOTE: for mirror we still base reported number on the percetage of
transferred extents which might get quite imprecisse if big size
of extent is used while volume itself is smaller as reporting jump
steps are much bigger the actual reported number provides.

2nd.NOTE: raid lvs line report already requires quite a few extra status
calls for the same device - but fix will be need slight code improval.

7 years agolibdm: workarounds reported raid status info
Zdenek Kabelac [Fri, 16 Jun 2017 11:20:47 +0000 (13:20 +0200)]
libdm: workarounds reported raid status info

Current existing kernels reports status sometimes in weird form.

Instead of showing what is the exact progress, we need to estimate
this in-sync state from several surrounding states.

Main reason here is to never report 100% sync state for a raid device
which will be undergoing i.e. recovery.

7 years agoraid: adjust reshape feature flag check
Heinz Mauelshagen [Fri, 16 Jun 2017 13:58:47 +0000 (15:58 +0200)]
raid: adjust reshape feature flag check

Relative to last comit ddf2a1d6564800f6d7f87e91cb8a7dfaa0edac1f:

adjust the dm-raid target version to 1.12.0 which shows
mandatory kernel MD deadlock fixes related to reshaping
are presant in the kernel.

Related: rhbz1443999

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