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

8073 Commits

Author SHA1 Message Date
Peter Rajnoha
8cf0810d57 thin: rename thin_pool_chunk_size_calculation -> ..size_policy and rename "default" policy to "generic"
Just to be consistent with existing naming we use.
2013-10-04 12:30:33 +02:00
Alasdair G Kergon
baf95bbff7 cmdline: Add --ignoreskippedcluster.
Accept --ignoreskippedcluster with pvs, vgs, lvs, pvdisplay, vgdisplay,
lvdisplay, vgchange and lvchange to avoid the 'Skipping clustered
VG' errors when requesting information about a clustered VG
without using clustered locking and still exit with success.

The messages can still be seen with -v.
2013-10-01 21:20:10 +01:00
Peter Rajnoha
23ce3352d7 libdm: export DM_UDEV_SUBSYSTEM_FLAG names for subystem udev flags
Just like we have symbolic names assigned to general DM udev flags
(DM_UDEV_* flags), we have the same for any subsystem flags now
(DM_SUBSYSTEM_UDEV_FLAG*), making it easier to use.
2013-09-30 11:19:09 +02:00
Peter Rajnoha
ec9b3dcecc udev: make subsystem rules responsible for importing subsystem flags
Each subsystem rule that needs to import any of DM_SUBSYSTEM_UDEV_FLAG*
flags is responsible for doing so. This simply moves control of these
flags from general 10-dm.rules to any subsystem rule using these flags
as each subsystem knows better how to handle these flags on its own.
2013-09-30 11:11:18 +02:00
Peter Rajnoha
24ffd5244f thin: better dbg msgs and avoid uninit. value on chunk size recalc 2013-09-30 08:58:57 +02:00
Peter Rajnoha
e02ff32260 fix: also make commit b4637 work without dmeventd 2013-09-30 08:17:56 +02:00
Peter Rajnoha
e4c7236c07 udev: fix 3min udev timeout so that it is applied for all LVM volumes
The timeout should be set before any volume skipping.
2013-09-27 15:37:16 +02:00
Peter Rajnoha
b4637bd298 fix: make it possible to compile with --disable-devmapper again
Some code has been added recently which makes it impossible to compile
when "configure --disable-devmapper" is used. This patch just shuffles
the code around so it's under proper #ifdef DEVMAPPER_SUPPORT.
2013-09-27 13:58:55 +02:00
Jonathan Brassow
acdc731e83 RAID: Fix _sufficient_pes_free calculation for RAID
lib/metadata/lv_manip.c:_sufficient_pes_free() was calculating the
required space for RAID allocations incorrectly due to double
accounting.  This resulted in failure to allocate when available
space was tight.

When RAID data and metadata areas are allocated together, the total
amount is stored in ah->new_extents and ah->alloc_and_split_meta is
set.  '_sufficient_pes_free' was adding the necessary metadata extents
to ah->new_extents without ever checking ah->alloc_and_split_meta.
This often led to double accounting of the metadata extents.  This
patch checks 'ah->alloc_and_split_meta' to perform proper calculations
for RAID.

This error is only present in the function that checks for the needed
space, not in the functions that do the actual allocation.
2013-09-26 11:30:07 -05:00
Jonathan Brassow
d6516d2f79 WHATS_NEW: description for previous commit
commit 098896fb29 failed to include
description of what was fixed.

"Conversion from linear to mirror or RAID1 now honors
 mirror_segtype_default."
2013-09-25 22:35:52 -05:00
Jonathan Brassow
098896fb29 mirror/RAID: Honor mirror_segtype_default when converting from linear
1) When converting from an x-way mirror/raid1 to a y-way mirror/raid1,
the default behaviour should be to stay the same segment type.

2) When converting from linear to mirror or raid1, the default behaviour
should honor the mirror_segtype_default.

3) When converting and the '--type' argument is specified, the '--type'
argument should be honored.

catch such conditions, but errors in the tests caused the issue to go
unnoticed.  The code has been fixed to perform #2 properly, the tests
have been corrected to properly test for #2, and a few other tests
were changed to explicitly specify the '--type mirror' when necessary.
2013-09-25 22:25:43 -05:00
Peter Rajnoha
dd796d6a94 profile: add thin-performance.profile
Define a "performance" profile for thin pools which is exactly:
  - allocation/thin_pool_zero = 0
  - thin_pool_chunk_size_calculation = "performance"
2013-09-25 16:07:35 +02:00
Peter Rajnoha
78cba8eb3f thin: calculate thin pool chunk size based on device IO hints
If "default" thin pool chunk size calculation method is selected,
use minimum_io_size, otherwise optimal_io_size for "performance"
device hint exposed in sysfs. If there appear to be PVs with
different hints presented, use their least common multiple.

If the hint is less than the default value defined for the
calculation method, use the default value instead.
2013-09-25 16:06:38 +02:00
Peter Rajnoha
cc9e65c391 thin: use appropriate default value based on allocation/thin_pool_chunk_size_calculation setting
If thin_pool_chunk_size_calculation is set to "default", use 64KiB,
otheriwse 512KiB for "performance".
2013-09-25 16:06:38 +02:00
Peter Rajnoha
8bf425005c conf: add allocation/thin_pool_chunk_size_calculation
Add allocation/thin_pool_chunk_size_calculation lvm.conf
option to select a method for calculating thin pool chunk
sizes and define two possible values - "default" and "performance".
2013-09-25 16:06:38 +02:00
Jonathan Brassow
c37c59e155 Test/clean-up: Indent clean-up and additional RAID resize test
Better indenting and a test for bug 1005434 (parity RAID should
extend in a contiguous fashion).
2013-09-24 21:32:53 -05:00
Jonathan Brassow
5ded7314ae RAID: Fix broken allocation policies for parity RAID types
A previous commit (b6bfddcd0a) which
was designed to prevent segfaults during lvextend when trying to
extend striped logical volumes forgot to include calculations for
RAID4/5/6 parity devices.  This was causing the 'contiguous' and
'cling_by_tags' allocation policies to fail for RAID 4/5/6.

The solution is to remember that while we can compare
	ah->area_count == prev_lvseg->area_count
for non-RAID, we should compare
	(ah->area_count + ah->parity_count) == prev_lvseg->area_count
for a general solution.
2013-09-24 21:32:10 -05:00
Peter Rajnoha
6553f86818 lvmconf: use_lvmetad=0 on --enable-cluster, reset to default on --disable-cluster
lvmetad is not yet supported in clustered environment so
disable it automatically if using lvmconf --enable-cluster
and reset it to default value if using lvmconf --disable-cluster.

Also, add a few comments in lvm.conf about locking_type vs. use_lvmetad
if setting it for clustered environment.
2013-09-24 14:03:42 +02:00
Peter Rajnoha
f050278a35 tools: don't install separate command symlink for lvm devtypes 2013-09-24 09:35:20 +02:00
Alasdair G Kergon
11dc6a03c4 lvs: Add seg_size_pe field.
Requested
https://www.redhat.com/archives/linux-lvm/2013-July/msg00112.html
2013-09-23 21:50:14 +01:00
Alasdair G Kergon
8de47abcd2 Merge branch 'master' of /data/agk/git/lvm2-upstream 2013-09-23 19:59:47 +01:00
Alasdair G Kergon
194d2479f7 cmdline: Accept PE ranges as start+length. 2013-09-23 19:55:50 +01:00
Alasdair G Kergon
b2535d0c97 pvmove: clean exit on failed pvmove restart
At present, before the pvmove command can be used to restart pvmove
polling, the LVs concerned need to be activated e.g. with lvchange
-ay.
2013-09-23 19:53:18 +01:00
Alasdair G Kergon
7233e584ad pvmove: Accept PE ranges as start+length. 2013-09-23 19:50:34 +01:00
Alasdair G Kergon
bbcc120e5a pvmove: clean exit on failed pvmove restart
At present, before the pvmove command can be used to restart pvmove
polling, the LVs concerned need to be activated e.g. with lvchange -ay.
2013-09-23 19:46:28 +01:00
Alasdair G Kergon
229e0752f1 post-release 2013-09-23 15:55:11 +01:00
Alasdair G Kergon
c8057aec36 release 2.02.102
18 files changed, 137 insertions(+), 203 deletions(-)
2013-09-23 15:43:37 +01:00
Christine Caulfield
431eda63cc clvmd: Fix node up/down handing in corosync module
The corosync cluster interface for clvmd did not correctly
deal with node up/down events so that when a node was removed
from the cluster clvmd would prevent remote operations
from happening, as it thought the node was up but not
running clvmd.

This patch fixes that code by simplifying the case to node
being  up or down - which was the original intention
and is supported by pacemaker and CPG in the higher layers.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
2013-09-23 13:23:00 +01:00
Zdenek Kabelac
9658032cba tests: drop extra loop
Loop was added as a result of unworking singlenode locking, since
this should be now fixed - remove this workaround.
2013-09-23 12:14:21 +02:00
Zdenek Kabelac
151f4ba64e tests: drop pointeless test
Writing directly to thin-pool and reading it is not a good idea.
2013-09-23 12:14:21 +02:00
Zdenek Kabelac
ec66ff818c tests: fix typo VEROSE->VERBOSE in Makefile.in 2013-09-23 12:14:21 +02:00
Zdenek Kabelac
ced563e3a7 tests: hide expected error message 2013-09-23 12:14:20 +02:00
Zdenek Kabelac
ebf66ac316 Makefile: add missing deps
Add missing deps for device-mapper build of scripts dir.
Cleanup multiple SUBDIR lines together.
2013-09-23 12:13:51 +02:00
Zdenek Kabelac
1fdead8d97 activation: use improved lv_info
Call lv_info() with info == NULL to query for local active presence.
2013-09-23 12:13:08 +02:00
Zdenek Kabelac
3b604e5c8e lvinfo: allow to use lv_info with NULL info
When NULL info struct is passed in - function is usable
as a quick query for  lv_is_active_locally() - with a bonus
we may query for layered device.

So it could be seen as a more efficient lv_is_active_locally().
2013-09-23 12:13:06 +02:00
Zdenek Kabelac
b29adbbc4d raid: add lv_is_raid()
More readable then status bit flag masking...
2013-09-23 11:35:15 +02:00
Zdenek Kabelac
a94e28ae01 dmeventd: simplify fifos init
Simplier code.
2013-09-23 11:35:15 +02:00
Zdenek Kabelac
b33b618fc8 cleanup: drop unused report parameter
Do not pass unused dm_report pointer.
2013-09-23 11:35:15 +02:00
Zdenek Kabelac
9b4bfca219 cleanup: add log_error error path messages 2013-09-23 11:35:15 +02:00
Zdenek Kabelac
d2d61955a3 cleanup: shorter code
Put assignment on declaration line.
2013-09-23 11:35:15 +02:00
Zdenek Kabelac
85b9c12e92 cleanup: release all memory in error path
Just ensure no memory will stay in pool even in error path.
2013-09-23 11:35:15 +02:00
Zdenek Kabelac
30432bd604 cleanup: skip call of detect...
SInce we know the pool was locked and we want to reloc pool again,
just use '1' directly.
2013-09-23 11:35:15 +02:00
Zdenek Kabelac
861a3b2f19 cleanup: monitoring more readable
Put continue path into one code segment.
2013-09-23 11:35:15 +02:00
Jonathan Brassow
cafde60890 test: Blacklist fedora-19 kernel for RAID4/5/6 dev replace tests
A know issue with kmem_cach is causing failures while testing
RAID 4/5/6 device replacement.  Blacklist the offending kernel
so that these tests are not performed there.
2013-09-20 11:33:29 -05:00
Alasdair G Kergon
bd75844024 release 2.02.101
112 files changed, 4131 insertions(+), 1312 deletions(-)
2013-09-20 13:56:29 +01:00
Peter Rajnoha
f393a5c156 udev: remove unused line in 69-dm-lvm-metad.rules
The explicit check for *_raid_member is not actually needed as
this gets filtered out by the ENV{ID_FS_TYPE}!="LVM2_member|LVM1_member" rule.
2013-09-20 09:45:34 +02:00
Jonathan Brassow
2c41c8b886 RAID: Don't allow syncaction changes on non-RAID LVs
Don't allow syncaction or other RAID-type messages on non-RAID
logical volumes.
2013-09-19 22:33:01 -05:00
Petr Rockai
25bed99681 clvmd: Avoid a 3-way deadlock in dead-client cleanup. 2013-09-18 21:17:48 +02:00
Petr Rockai
3df50d822b vgconvert: Do not call lvmetad_vg_remove (path shared with vgcfgbackup). 2013-09-18 12:53:11 +02:00
Petr Rockai
054cf25b5f vgcfgrestore: Remove VG rom lvmetad later, to better deal with errors. 2013-09-18 11:24:58 +02:00