1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
Commit Graph

13177 Commits

Author SHA1 Message Date
Peter Rajnoha
16ed726610 lvmdump: use lsblk -s and lsblk -O in lvmdump only if these options are supported
The lsblk is just a nice helper here - it's not crucial for lvmdump so
do best effort here and use the most we can from current version of
lsblk that is installed on system. The lsblk -s option was added a bit
later after lsblk introduction and lsblk -O support even more later -
so if these are not available, use only pure lsblk output without any
extras.
2016-08-30 15:38:34 +02:00
Alasdair G Kergon
52d1ddd601 config: regenerate 2016-08-30 13:23:39 +01:00
Alasdair G Kergon
be85c22f65 raid10: Fix #stripes in lvcreate msg when too many. 2016-08-30 12:04:23 +01:00
Tony Asleson
7412690dd2 lvmdbusd: Prefix tag string with '@' 2016-08-29 18:00:21 -05:00
Tony Asleson
257ce5733e lvmdbustest.py: Add tag regression test
Add '-' back in as acceptable tag character
2016-08-29 17:59:42 -05:00
Tony Asleson
5392a612dc lvmdbusd: WS/pep8 corrections 2016-08-29 15:28:06 -05:00
Tony Asleson
1870b3293a lvmdbusd/lvmdb.py: Make stand alone execution work
This was broken when the args were moved to cfg
2016-08-29 15:26:56 -05:00
Tony Asleson
96a0604bd0 lvmdbusd: Correct imports 2016-08-29 15:26:56 -05:00
Tony Asleson
756f51eac8 test/lib/aux.sh: Remove incorrect comment
The dbus service needs to use the system bus.  The test environment does
not allow work with session bus environment.
2016-08-29 15:26:56 -05:00
Tony Asleson
7c386bf4d4 test/lib/aux.sh: Remove '--udev' for lvmdbusd start
The service will start up with udev monitoring and disable it if lvm
starts calling ExternalEvent.
2016-08-29 15:26:56 -05:00
Tony Asleson
70d4e2e8d5 lvmdbusd: Handle different daemon options
- Prevent --lvmshell with --nojson, not a valid combination
- If user is preventing json, then no lvmshell usage
- Return boolean on Manager.UseLvmShell
2016-08-29 15:26:56 -05:00
Tony Asleson
1d1fe00846 lvmdbusd: Include lvm shell testing as the default 2016-08-29 15:26:56 -05:00
Tony Asleson
313c40ed09 dbus/testlib.py: Improve type checking
Leverage the introspection data to ensure that the service is returning
what is says it will be returning for methods and properties.
2016-08-29 15:26:56 -05:00
Tony Asleson
9241dbdf57 lvmdbusd: Correct return type for empty PeSegments 2016-08-29 15:26:56 -05:00
Tony Asleson
20318e4c6c lvmdbusd: Be more specific on return types for Lv 2016-08-29 15:26:56 -05:00
Tony Asleson
9aed18a571 lvmdbustest.py: Remove '-' from tag ch set 2016-08-29 15:26:55 -05:00
Tony Asleson
0985b2d0d4 lvmdbusd: Make job.Percent a double 2016-08-29 15:26:55 -05:00
Tony Asleson
2bb09b4015 lvmdbusd: Be more explicit on return values
The python dbus library tries to make best on what the dbus type is based on
python data type.  Some times it gets this wrong, so we will be explicit.
2016-08-29 15:26:55 -05:00
Tony Asleson
4902034c89 lvmdbusd: Use udev until ExternalEvent occurs
The normal mode of operation will be to monitor for udev events until an
ExternalEvent occurs.  In that case the service will disable monitoring
for udev events and use ExternalEvent exclusively.

Note: User specifies --udev the service will always monitor udev regardless
if ExternalEvent is being called too.
2016-08-29 15:26:55 -05:00
Tony Asleson
2352ff24a5 lvmdbusd: Add support for using lvm shell
With the addition of JSON and the ability to get output which is known to
not contain any extraneous text we can now leverage lvm shell, so that we
don't fork and exec lvm command line repeatedly.
2016-08-29 15:26:55 -05:00
Tony Asleson
a0a2c84a26 lvmdbusd: Add date & ts if running in a terminal
When we are running in a terminal it's useful to have a date & ts on log
output like you get when output goes to the journal.  Check if we are
running on a tty and if we are, add it in.
2016-08-29 15:26:55 -05:00
Tony Asleson
7e37e7fde4 lvmdbusd: Always fork & exec background commands
Our background job support requires a separate instance of lvm.  Use the
full lvm command to do so.
2016-08-29 15:26:55 -05:00
Zdenek Kabelac
784b46ef2a debug: better verbose message 2016-08-29 20:51:16 +02:00
Zdenek Kabelac
92d5a84410 cleanup: clean gcc6 minor/major types warnings
Put sys/sysmacros.h in front of sys/types.h header file as requested
by gcc6.
2016-08-29 20:51:16 +02:00
Zdenek Kabelac
81970d22d8 cache: do not monitor cache-pool
Avoid monitoring of activated cache-pool - where the only purpose ATM
is to clear metadata volume which is actually activate in place
of cache-pool name (using public LV name).

Since VG lock is held across whole clear operation, dmeventd cannot
be used anyway - however in case of appliction crash we may
leave unmonitored device.

In future we may provide better mechanism as the current name
replacemnet is creating 'uncommon' table setups in case the metadata
LV is more complex type like raid  (needs some futher thinking about
error path results).

Another point to think about is the fact we should not clear device
while holding lock (i.e. dmeventd mirror repair cannot work in cases
like this).
2016-08-29 20:51:15 +02:00
Zdenek Kabelac
b493811968 cache: introduce cache_pool_max_chunks
Introduce 'hard limit' for max number of cache chunks.
When cache target operates with too many chunks (>10e6).

When user is aware of related possible troubles he
may increase the limit in lvm.conf.

Also verbosely inform user about possible solution.

Code works for both lvcreate and lvconvert.

Lvconvert fully supports change of chunk_size when caching LV
(and validates for compatible settings).
2016-08-29 20:47:31 +02:00
Alasdair G Kergon
2fde4399a0 lvconvert: Fix --splitmirrors segfault with incorrect PV.
Commit 9ee071705b misunderstood integer
promotion, but it's simpler to detect -1 more directly.
2016-08-26 01:21:01 +01:00
Peter Rajnoha
fc93f10892 tests: also fix typo in report/columns_as_rows in tests 2016-08-25 16:25:23 +02:00
Peter Rajnoha
e758d722c7 conf: fix typo in report/columns_as_rows config option name recognition
Commit e947c362dd introduced
config_settings.h file for central place to store all definitions for
config options. By mistake, it used report/colums_as_rows instead
of report/columns_as_rows (missing "n" in "columns").
2016-08-25 14:53:32 +02:00
Heinz Mauelshagen
b0e07d516e test: delay writes to all test PVs in lvchange-rebuild-raid.sh to avoid race 2016-08-25 01:37:34 +02:00
Alasdair G Kergon
7ba7768111 alloc: Avoid PV tags too when avoiding parallel PV allocation.
Also add debug messages for parallel PVs.
2016-08-24 19:41:11 +01:00
Heinz Mauelshagen
bff470f83f test: add missing lvchange-rebuild-raid.sh 2016-08-24 18:22:34 +02:00
Alasdair G Kergon
40a4f5f38f alloc: Record PV tags of parallel PVs in log. 2016-08-24 15:49:34 +01:00
Alasdair G Kergon
68adf2c199 alloc: Move _log_parallel_areas. 2016-08-24 15:47:38 +01:00
Alasdair G Kergon
7837fbc1c1 lvconvert: Disallow raid10 mirror conversions. 2016-08-23 23:40:16 +01:00
Alasdair G Kergon
2d65ce9711 dmeventd: Add fixed timeout when unmonitoring. 2016-08-23 16:09:18 +01:00
Peter Rajnoha
db0e34535c libdm: add some comments about DM_UDEV_DISABLE_LIBRARY_FALLBACK flag 2016-08-23 15:58:03 +02:00
Alasdair G Kergon
b975532433 dmeventd: Simplify replacement unmonitor code. 2016-08-23 12:16:39 +01:00
Alasdair G Kergon
97ee5a1cd3 dmeventd: Start merging back replacement unmonitor code. 2016-08-23 11:30:34 +01:00
Alasdair G Kergon
952e413328 dmeventd: Fix unmonitoring when segtype changes.
When the segment type is being changed, unmonitoring an LV requires
the existing dso to be specified as a parameter, not the new one.
2016-08-23 02:26:14 +01:00
Alasdair G Kergon
7646741ec6 raid: Don't monitor raid0 or raid0_meta LVs. 2016-08-20 02:14:33 +01:00
Alasdair G Kergon
896912b14d lvcreate: Never treat raid0 as linear.
raid0 and raid0_meta require, or default to, at least 2 stripes.
2016-08-19 23:57:30 +01:00
Alasdair G Kergon
88e6abc5a0 lvconvert: Don't allow --repair on raid0 LVs. 2016-08-19 23:42:01 +01:00
David Teigland
bf0eaafa6b libdaemon: add errno to error message 2016-08-19 10:59:46 -05:00
Alasdair G Kergon
e192fde687 lvcreate: Drop warning messages for number of raid stripes.
It's now just setting a default, not adjusting the user's parameter.
2016-08-19 14:53:33 +01:00
Alasdair G Kergon
ea0f604e70 lvcreate: No longer adjust --stripes for raid types.
If the number of stripes requested is incompatible with the requested
type of raid, give an error instead of adjusting it.

If no stripes argument is supplied, continue to use an appropriate
default.
2016-08-19 14:19:51 +01:00
Alasdair G Kergon
c1a0a2c712 toollib: Record whether or not stripes/stripe_size args supplied. 2016-08-19 13:51:43 +01:00
Alasdair G Kergon
c27963c566 lib: Move lcm and gcd to lib/misc for wider use. 2016-08-18 14:06:13 +01:00
David Teigland
8c71fc1cc2 man: lvconvert mention required option 2016-08-17 14:56:01 -05:00
David Teigland
0336b41828 man: lvconvert change location of sentence
The details about each option are explained in the
section for that option.
2016-08-17 14:13:17 -05:00