1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
Commit Graph

16795 Commits

Author SHA1 Message Date
Zdenek Kabelac
38617213f0 tests: add test of resize of different segtypes 2019-11-11 22:44:25 +01:00
Zdenek Kabelac
08f36dd093 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 22:44:25 +01:00
Zdenek Kabelac
3b05fd4d07 tests: add extra settle
To avoid removing, while 'add' might not have been processed yet.
(when emulating reboot in pvmove-restart)
2019-11-11 22:44:25 +01:00
Zdenek Kabelac
ba313ac84a tests: skip unneeded status check
If 'remove' was succesful - we can break loop immediatelly.
2019-11-11 22:44:25 +01:00
Zdenek Kabelac
1cc1333599 daemons: check for non-zero thread_id
Do not call pthread_join if thread_id would be 0.
2019-11-11 22:44:25 +01:00
Zdenek Kabelac
cc865749ae daemon: better error path handling for shutdown
Report errors for open in better order.
Ensure descriptors are not leaked.
2019-11-11 22:44:25 +01:00
Zdenek Kabelac
43db8f8d5d cov: ensure read_ahead is available
Make sure read_ahead pointer is not NULL when quering for RA.
2019-11-11 22:44:25 +01:00
Zdenek Kabelac
30a23a1941 cov: missing checks of syscalls
Check for sigprocmask errors
2019-11-11 22:44:25 +01:00
Zdenek Kabelac
8679d45917 gcc: avoid declaration shadowing
dev_name is global in device.h
2019-11-11 22:44:18 +01:00
Heinz Mauelshagen
e184f77109 man: adjust 'disks' to 'devices' as used throughout 2019-11-07 17:45:37 +01:00
Marian Csontos
8263e62b00 test: Fix metadata-zero-space with long VG names 2019-11-06 16:20:27 +01:00
Zdenek Kabelac
c67a03727b 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:31:12 +01:00
Zdenek Kabelac
dbaa4cdcdf tests: skip test if scsi_debug is not available 2019-11-01 16:31:12 +01:00
Zdenek Kabelac
5f064e2221 tests: slowdown delay of raid
Slowdown 'delay' more.
2019-11-01 16:31:12 +01:00
Zdenek Kabelac
c935f8a327 tests: conversion only of exclusive lv
We can 'cache' only exclusively active LV in cluster.
2019-11-01 16:27:21 +01:00
Zdenek Kabelac
d1c5b3ae74 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 16:27:21 +01:00
Zdenek Kabelac
569e328cc0 WHATS_NEW: update 2019-10-31 15:43:02 +01:00
Zdenek Kabelac
cca5aec0ef activation: drop removed declaration
Seems this function has been removed long time ago with:
3e781ea446
2019-10-31 15:33:09 +01:00
Zdenek Kabelac
50b50039d9 tests: reduce space requirements
Test well runs on smaller test machines.
2019-10-31 15:31:30 +01:00
Zdenek Kabelac
8689b4ed82 raid: drop internal error
Fix some internal error reports and debug trace returns
2019-10-31 15:31:30 +01:00
Zdenek Kabelac
3d9fc7d6f3 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 15:31:30 +01:00
Zdenek Kabelac
c21440536d mirror: remove unused code 2019-10-31 15:31:30 +01:00
Zdenek Kabelac
ab315e7a81 mirror: directly activate updated mirror 2019-10-31 15:31:30 +01:00
Zdenek Kabelac
80b2de9e6a 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 15:31:30 +01:00
Tony Asleson
8b3cf53e24 Experimental VDO lvmdbusd support 2019-10-30 10:55:06 -05:00
Tony Asleson
508d1808b0 lvmdbustest.py: Use local data instead of fetching
Avoid making more dbus calls to get information we already have.  This
also avoids us getting an error where a dbus object representation is
being deleted by another process while we are trying to gather information
about it across the wire.
2019-10-30 10:38:40 -05:00
Tony Asleson
f91df163e2 lvmdbustest.py: Improve concurrent test handling
Filter out LVs too, so that we can run more than 1 instance of the
unit test at the same time.
2019-10-30 10:38:40 -05:00
Tony Asleson
f961311436 lvmdbustest.py: Add tests for LV interface
Add tests for all the different LV types with the standard LV dbus
interface.  These tests shook out a couple of new bugs.
2019-10-30 10:38:40 -05:00
Tony Asleson
1bbf977577 lvmdbusd: Debug msg. improvements. 2019-10-30 10:38:40 -05:00
Tony Asleson
4dcb36aba4 lvmdbusd: Fix model inconsistency when LV loses interface
When a LV loses an interface it ends up getting removed and recreated.
This happens after the VGs have been processed and updated.  Thus when
this happens we need to re-check the VGs.
2019-10-30 10:38:40 -05:00
Tony Asleson
f56b21ae2c lvmdbusd: Bug fix for activate/deactivate
Prevent the daemon from stalling when it gets stuck on a y/n prompt.
2019-10-30 10:38:40 -05:00
Tony Asleson
9e15c83673 testlib.py: Add interface instance vars. 2019-10-30 10:38:40 -05:00
Tony Asleson
b7aab9ba59 testlib.py: WS corrections 2019-10-30 10:38:40 -05:00
Tony Asleson
89373761c8 lvmdbustest.py: Add basic vdo test 2019-10-30 10:38:40 -05:00
Tony Asleson
ed7e365ae5 testlib.py: Correct dbus signature verification
This allows us to fully verify introspection data matches what we are
getting.
2019-10-30 10:38:40 -05:00
Tony Asleson
5971da2c72 lvmdbusd: VDO Pool LV representation
VDO pool LVs are represented by a new dbus interface VgVdo.  Currently
the interface only has additional VDO properties, but when the
ability to support additional LV creation is added we can add a method
to the interface.
2019-10-30 10:38:40 -05:00
Tony Asleson
455498f206 lvmdbustest.py: Create common func. _create_cache_lv 2019-10-30 10:38:40 -05:00
Tony Asleson
c786636afb lvmdbustest.py: Add nested helper function major_minor 2019-10-30 10:38:40 -05:00
Tony Asleson
e1d3a6c552 lvmdbustest.py: WS corrections 2019-10-30 10:38:40 -05:00
Tony Asleson
df2292020b lvmdbusd: Prevent running --nojson with VDO support 2019-10-30 10:38:40 -05:00
Tony Asleson
5b224d58f7 lvmdbustest.py: Add cache LV rename test 2019-10-30 10:38:40 -05:00
Tony Asleson
6204955347 lvmdbusd: Add VgVdo class & assoc. interface
When VDO support is available we will create VG object instances
which will allow the API user to create VDO pool LVs.
2019-10-30 10:38:40 -05:00
Tony Asleson
9d2ef05c5d lvmdbusd: Add cfg.vdo_support
Will be used to add vdo interfaces on demand.
2019-10-30 10:38:40 -05:00
Tony Asleson
ceb808d26f lvmdbustest.py: Remove 2 TODOs
This issue has been resolved, sizes > 2**32-1 not supported.
2019-10-30 10:38:40 -05:00
Tony Asleson
c5f4f2efb6 lvmdbustest.py: Add func. _pv_scan 2019-10-30 10:38:40 -05:00
Tony Asleson
69d4847975 lvmdbustest.py: Use existing _create_lv 2019-10-30 10:38:40 -05:00
Tony Asleson
293f6d2795 lvmdbustest.py: Add func. _create_thin_lv 2019-10-30 10:38:40 -05:00
Tony Asleson
a4666f63ad lvmdbustest.py: Add func. _all_pv_object_paths
This is needed in a number of places.
2019-10-30 10:38:40 -05:00
Tony Asleson
b8d4969117 lvmdbustest.py: Add function for lv path check 2019-10-30 10:38:40 -05:00
Tony Asleson
22a22a735f lvmdbusdtest.py: Use common function for tag add 2019-10-30 10:38:40 -05:00