1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-23 21:35:29 +03:00
Commit Graph

15836 Commits

Author SHA1 Message Date
Joe Thornber
e552103027 [radix-tree] Bring radix-tree up to date with the master branch 2020-01-16 14:03:42 +00:00
Zdenek Kabelac
846ae8d49d WHATS_NEW: update 2020-01-13 17:41:44 +01:00
Zdenek Kabelac
c575c1c9ff vdo: avoid running initialization of cache pool vars
Since VDO is also pool, the old if() case missed to know about this,
and executed unnecesserily initialization of cache pool variables.
This was usually harmless when using 'smaller' sizes of VDO pools,
but for big VDO pool size, we were reporting senseless messages
about big cache chunk sizes.
2020-01-13 17:41:22 +01:00
Zdenek Kabelac
36210c2b49 raid: disallow reshape of stacked LVs
Until we resolve reshape for 'stacked' devices, we need to disable it.
So users can no longer reshape i.e. thin-pool data volumes, causing
ATM bad thin-pool problems.
2020-01-13 17:41:22 +01:00
Heinz Mauelshagen
50c56ade2a lvcreate: ensure striped raid region size is at least stripe size
The kernel MD runtime requires region size to be larger than stripe size
on striped raid layouts, thus the dm-raid target's constructor rejects
such request.

This causes e.g. an 'lvcreate --type raid10 -i3 -I4096 -R2048 -n lv vg' to fail.

Avoid failing late in the kernel by enforcing region size to be
larger or equal to stripe size.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1698225
2019-11-26 22:30:54 +01:00
Marian Csontos
61c321d110 test: Fix handling leftovers from previous tests
teardown fails current PREFIX is prefix of previously failed test with
leftovers in dmtable.

(cherry picked from commit 1e669ab315)
2019-11-20 15:31:21 +01:00
Marian Csontos
26f94d9119 WHATS_NEW: update 2019-11-20 15:30:34 +01:00
Marian Csontos
9e45ad04b0 build: autoconf 2019-11-20 15:27:42 +01:00
Heming Zhao
245d7fcd59 fix dev_unset_last_byte after write error
ev_unset_last_byte() must be called while the fd is still valid.
After a write error, dev_unset_last_byte() must be called before
closing the dev and resetting the fd.

In the write error path, dev_unset_last_byte() was being called
after label_scan_invalidate() which meant that it would not unset
the last_byte values.

After a write error, dev_unset_last_byte() is now called in
dev_write_bytes() before label_scan_invalidate(), instead of by
the caller of dev_write_bytes().

In the common case of a successful write, the sequence is still:
dev_set_last_byte(); dev_write_bytes(); dev_unset_last_byte();

Signed-off-by: Zhao Heming <heming.zhao@suse.com>
2019-11-13 11:28:22 -06:00
Zdenek Kabelac
fa4ce13e3f tests: fix else path
Code when raid is present has some 'extra' effect that can't be skipped.
2019-11-11 18:00:27 +01:00
Zdenek Kabelac
c3aa2988d1 WHATS_NEW: update 2019-11-11 17:50:03 +01:00
Zdenek Kabelac
7581cc20c9 tests: add test of resize of different segtypes 2019-11-11 17:50:03 +01:00
Zdenek Kabelac
b9926fb1be lvextend: fix resizing volumes of different segtype
When resizing 2 volumes like  thin-pool and it's metadata and they
would be of a different type - command would be actually expecting
both LVs being of a same segtype - and would throw an error in
case they are different.

This patch fixes is by setting a new segtype from last segment of
2nd. extented device.

Also it fixes the possible 'percentage' extension setup that
might have been used for 'primary' volume - while the 'secondary'
LV always goes with direct size - as we do not support 'percentage'
setup for them

This affects maily usage of thin-pool where the extension of
thin-pool data size may also lead to extension of metadata size.
2019-11-11 17:48:49 +01:00
Zdenek Kabelac
2f615e73de tests: add extra settle
To avoid removing, while 'add' might not have been processed yet.
(when emulating reboot in pvmove-restart)
2019-11-08 15:12:51 +01:00
Zdenek Kabelac
0e3e974bff tests: skip unneeded status check
If 'remove' was succesful - we can break loop immediatelly.
2019-11-08 15:12:51 +01:00
Zdenek Kabelac
bbdcdc12b2 daemons: check for non-zero thread_id
Do not call pthread_join if thread_id would be 0.
2019-11-08 15:12:51 +01:00
Zdenek Kabelac
e9b2148dab daemon: better error path handling for shutdown
Report errors for open in better order.
Ensure descriptors are not leaked.
2019-11-08 15:12:51 +01:00
Zdenek Kabelac
34bde8b6c7 lvmcache: free resource on error path
Free allocated svg on error path.
Also explicitely ignore dm_strncpy() result.
(We know it will end with failure here.)
2019-11-08 15:11:50 +01:00
Zdenek Kabelac
f90c3d69ce cov: ensure read_ahead is available
Make sure read_ahead pointer is not NULL when quering for RA.
2019-11-08 13:04:45 +01:00
Zdenek Kabelac
67bdae0697 cov: missing checks of syscalls
Check for sigaction,sigprocmask,pthread_sigmask errors
2019-11-08 13:04:02 +01:00
Zdenek Kabelac
50fb24f5c2 gcc: avoid declartion shadowing
dev_name is global in device.h
2019-11-08 13:03:20 +01:00
Heinz Mauelshagen
ffd959d2c0 man: adjust 'disks' to 'devices' as used throughout 2019-11-07 17:47:35 +01:00
Zdenek Kabelac
343d80a7fe tests: be happy with less then 90 percent
Thin metadata evolve between kernel version, so it's not always
precisely predictible its usage - so let's met test happy,
when it gets bellow 90%.
2019-11-01 16:21:52 +01:00
Zdenek Kabelac
a611f24751 tests: larger are needs to be disabled
Since we 'disable' lvmetad via --repair of 'raid'
if such target is not present, we simply skip
all tests expecting disabled lvmetad.
2019-11-01 16:12:39 +01:00
Zdenek Kabelac
4ae481bb30 tests: skip test if scsi_debug is not available 2019-11-01 16:12:39 +01:00
Zdenek Kabelac
2cd30c0d44 tests: needs some raid
Add explicit check for at least 'some' raid being present.
Slowdown 'delay' more.
2019-11-01 16:12:39 +01:00
Zdenek Kabelac
010062cf03 tests: conversion only of exclusive lv
We can 'cache' only exclusively active LV in cluster.
2019-11-01 15:59:17 +01:00
Zdenek Kabelac
df00a62fd0 tests: avoid checking command result in cluster
When running cluster test with clvmd, the actual 'monitoring'
happens in cluster - so the 'already monitored' message
is also logged within clvmd code and the command cannot
see such effect.

clvmd was incapable to report this information back to command
so it cannot be displayed this way.

Add 'lvs -o+seg_monitor' validation which also works in clustered mode.
2019-11-01 15:56:03 +01:00
Zdenek Kabelac
796efef15e WHATS_NEW: update 2019-10-31 13:16:58 +01:00
Zdenek Kabelac
50ab7b3ceb tests: reduce space requirements
Test well runs on smaller test machines.
2019-10-31 13:14:50 +01:00
Zdenek Kabelac
719ab4da05 raid: drop internal error
Fix some internal error reports and debug trace returns
2019-10-31 13:00:01 +01:00
Zdenek Kabelac
2c46c60155 manip: optimize lvs_using_lv
Instead of checking all LVs in a VG - do just a direct copy of LVs
from the existing list ->segs_using_thin_lv.

TODO: maybe it could be better to expose seg_list to /tools...
2019-10-31 13:00:01 +01:00
Zdenek Kabelac
4b7bcf3ed4 mirror: remove unused code 2019-10-31 13:00:01 +01:00
Zdenek Kabelac
cf426744ae mirror: directly activate updated mirror 2019-10-31 13:00:01 +01:00
Zdenek Kabelac
f1be01c7ef mirror: fix leg splitting
Enhance lv_info with lv_info_with_name_check.
This 'variant' not only check existance if UUID in DM table
but also compares its  DM name  whether it's matching expected LV name.
Otherwise activation may 'skip' activation with rename in case the
DM UUID already exists, just device is different name.

This change make fairly easier manipulation with i.e. detached mirror
leg which ATM is using same UUID - just the LV name have been changed.

Used code was not able to run 'activation' (and do a rename) and just
skipped the call. So the code used to do a workaround and 'tried'
to deactivate such LV firts - this however work only in non-clvmd case,
as cluster was not having the lock for deactivated LV.

With this extended lv_info code will run 'activation' and will
synchronize the name to match expected LV name.

Patch extends _lv_info() with new paramter 'with_name_check',
which is later translated into 'name_check' argument for
_info_run() which in case of name mismatch evaluates the
check as if device does not exists.

Such call is only used in one place _lv_activate() which then
let activation run.  All other invocation of _info() calls
are left intact.

TODO: fix mirror table manipulation (and raid)....
2019-10-31 12:56:24 +01:00
Zdenek Kabelac
8b741b3bba tests: needs exclusive activation for conversion
For online convertion LVs must be activated localy exclusive as
cache can only work for exclusive activation.
2019-10-30 09:36:10 +01:00
Zdenek Kabelac
5ee3d6dbdf WHATS_NEW 2019-10-26 00:48:00 +02:00
Zdenek Kabelac
9a8bff003b tests: explicit testing of thin snapshot
Check merging of old snapshot of thin LV.
2019-10-26 00:46:33 +02:00
Zdenek Kabelac
963af243bf snapshot: use single merging sequence
The resume of 'released' 'COW' should preceed the resume of origin.
The fact we need to do the sequence differently for merge was
cause by bugs fixed in 2 previous commits - so we no longer need
to recognize 'merging' and we should always go with single
sequence.

The importance of this order is - to properly remove  '-real' device
from origin LV. When COW is activated as 2nd. '-real' device is
kept in table as it cannot be removed during 1st. resume of origin,
and later activation of COW LV no longer builds tree associated
with origin LV.
2019-10-26 00:42:50 +02:00
Zdenek Kabelac
8be8b994c6 snapshot: fix checking of merged thin volume
When merging of thin snapshot is taking place, the origin target will
be of thin type.
2019-10-26 00:41:40 +02:00
Zdenek Kabelac
20d94e4072 snapshot: correctly check device id of merged thin
When checking device id of a thin device that is just being
merged - the snapshot actually could have been already finished
which means  '-real' suffix for the LV is already gone and just LV
is there - so check explicitely for this condition and use
correct UUID for this case.
2019-10-26 00:39:20 +02:00
Zdenek Kabelac
bc200e0b16 tests: really check disabling of lvmetad
Since lvconvert validated LV types that can be repaired,
the test was not working properly for longer time...
2019-10-26 00:29:44 +02:00
Zdenek Kabelac
36b8b9ed5c debug: avoid to slashes in debug message 2019-10-26 00:29:44 +02:00
Zdenek Kabelac
cd39b67b7e pvmove: detect exclusively active LVs
Before pvmove start, it need to decide if exlusive mode of pvmove
must be used - this mode needs to be used if some move LV is
already exclusively activated.
2019-10-26 00:29:44 +02:00
David Teigland
96fd312e85 config: allow_mixed_block_sizes set version 2.02.187 2019-10-24 10:26:33 -05:00
David Teigland
f53cce1804 config: allow_mixed_block_sizes set default to 1
to use the old behavior by default, which allows
using mixed block sizes.  The user will need to
set it to 0 in lvm.conf to turn on the new restrictions.
2019-10-24 10:26:28 -05:00
David Teigland
e298a87f71 Revert "tests: remove allow-mixed-block-sizes"
This reverts commit 4e99308b7c.
2019-10-24 10:26:28 -05:00
David Teigland
c285314763 Revert "Revert "vgcreate/vgextend: restrict PVs with mixed block sizes""
This reverts commit c37aa7881d.

Put back the setting again, but the next commit will just
turn off the new behavior by default.
2019-10-24 10:01:12 -05:00
David Teigland
4e99308b7c tests: remove allow-mixed-block-sizes 2019-10-23 13:26:19 -05:00
David Teigland
c37aa7881d Revert "vgcreate/vgextend: restrict PVs with mixed block sizes"
This reverts commit a57b92dec3.

This can break existing usage, so it's not suitable for the
stable branch.
2019-10-23 13:25:25 -05:00