1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-28 20:25:52 +03:00
Commit Graph

39 Commits

Author SHA1 Message Date
Peter Rajnoha
8e0687ca69 profile: add thin-generic.profile
The thin-generic.profile contains settings for thin/thin pool volumes
suitable for generic environment/use containing default settings.
This allows users to change the global lvm.conf settings at will
and still keep the original settings for volumes that have this
thin profile assigned already.
2014-06-13 09:56:29 +02:00
Peter Rajnoha
23f9c45a1b profiles: remove default.profile and add {command,metadata}_profile_template.profile
The "default.profile" name was misleading. It's actually a helper
*template* that can be used for copying and further editing to create
a new profile.

Also, we have separate command and metadata profiles now so the templates
are separated as well - we can't mix profile settings from one group with
another - such profile is rejected by lvm tools.
2014-05-21 12:36:52 +02:00
Alasdair G Kergon
5684cfcb1c report: Add metadata_percent to lvs_cols. 2014-05-15 08:32:27 +01:00
Zdenek Kabelac
90c44f5371 conf: document new thin_check option 2014-05-12 16:24:40 +02:00
Alasdair G Kergon
b5f8f452ac tools: Add --readonly support.
Offer lock-free access to display virtual machine or clustered VG metadata
while it might be in use.
2014-04-18 02:46:34 +01:00
Peter Rajnoha
704609b17e profiles: comment out thin_pool_chunk_size in default.profile
By default, the thin_pool_chunk_size is automatically calculated.
When defined, it disables the automatic calculation. So to be more
precise here, we should comment it out for the default.profile.

Also, "lvm dumpconfig --type profilable" was used here to generate
the default.profile content. This will be done automatically in the
future once we have the infrastructure for this in (see also
https://bugzilla.redhat.com/show_bug.cgi?id=1073415).
2014-04-15 10:15:38 +02:00
Peter Rajnoha
21b3c983fd config: make global/lvdisplay_shows_full_device_path profilable 2014-03-18 09:49:53 +01:00
Peter Rajnoha
927784cd06 config: make global/suffix profilable and add it to lvm.conf
The global/suffix was missing from example lvm.conf but it can
be very useful when using lvm in scripts and now in profiles as well
Let's expose it more.
2014-03-18 09:24:17 +01:00
Peter Rajnoha
64086c3bd8 doc: cleanup/extend some man pages/conf comments
man/lvm2-activation-generator.8:
  Generator Specification -> Generators Specification
  (this is the exact word in the systemd man page)

conf/example.conf.in:
  cleanup recent edits related to report section

man/lvm.conf.5:
  add a line about a possibility to generate a new
  profile with lvm dumpconfig command as an alternative
  to copying the default profile
2014-03-18 08:28:58 +01:00
Peter Rajnoha
c1ce2cc86c config: make global/units and global/si_unit_consistency profilable 2014-03-17 16:07:29 +01:00
Peter Rajnoha
455f23586f config: make report settings profilable
Users can create several profiles for how the tools report
the output very easily and then just use

  <lvm reporting command> --profile <report_profile_name>
2014-03-17 14:27:49 +01:00
Peter Rajnoha
f9070c196b conf: add existing report settings to lvm.conf
These settings exist for ages but they were not exposed in lvm.conf
and so majority of users didn't event know about them.
2014-03-17 14:24:21 +01:00
Zdenek Kabelac
108ae0edc6 cleanup: fix some lvm.conf typos 2014-02-11 19:00:06 +01:00
Jonathan Brassow
3247819531 pool: Make another thin pool fn generic for cache usage also
Make '_recalculate_thin_pool_chunk_size_with_dev_hints' so it can
be used for cache and thin pools.
2014-02-04 07:03:52 -06:00
Jonathan Brassow
70fd2139e1 cache: Allocation code changes necessary to support cache_pool
Cache pools require a data and metadata area (like thin pools).  Unlike
thin pool, if 'cache_pool_metadata_require_separate_pvs' is not set to
'1', the metadata and data area will be allocated from the same device.
It is also done in a manner similar to RAID, where a single chunk of
space is allocated and then split to form the metadata and data device -
ensuring that they are together.
2014-01-28 12:25:02 -06:00
Zdenek Kabelac
902b343e0e thin: validate resize of thin LV with ext. origin
When thin volume is using external origin, current thin target
is not able to supply 'extended' size with empty pages.

lvm2 detects version and disables extension of LV past the external
origin size in this case.

Thin LV could be however still reduced and extended freely bellow
this size.
2014-01-23 14:20:34 +01:00
Peter Rajnoha
0fcdc8a020 conf: clarify wipe_signatures_when_zeroing_new_lvs 2013-12-10 10:16:37 +01:00
Alasdair G Kergon
16eab3ec08 config: shorten new sig wiping option string
Rename wipe_signatures_on_new_logical_volumes_when_zeroing  to
wipe_signatures_when_zeroing_new_lvs.
2013-12-09 09:35:47 +00:00
Peter Rajnoha
5a4137c804 profile: wipe_signatures_on_new_logical_volumes_when_zeroing not yet profilable
But it might be - needs more testing...
2013-11-27 16:49:12 +01:00
Peter Rajnoha
ab2f858af7 conf: add allocation/use_blkid_wiping
Add allocation/use_blkid_wiping setting to lvm.conf to select between
LVM2 native code to detect signatures to wipe or blkid library code.
2013-11-27 15:49:14 +01:00
Peter Rajnoha
5b7e543cae conf: add allocation/wipe_signatures_on_new_logical_volumes_when_zeroing
This setting controls whether signature wiping on newly created logical
volumes will follow the state of zeroing (-Z/--zero option).
2013-11-27 15:48:06 +01:00
Zdenek Kabelac
c697f501c7 Makefile: fix build in non src dir
Fix 'make install' from builddir != srcdir.
2013-11-19 10:55:11 +01:00
Peter Rajnoha
fc144a3fc5 profile: add thin_pool_chunk_size_policy to default.profile
By default, thin_pool_chunk_size_policy is set to "generic".
2013-11-06 13:29:25 +01:00
Jonathan Brassow
d5896f0afd Mirror: Fix hangs and lock-ups caused by attempting label reads of mirrors
There is a problem with the way mirrors have been designed to handle
failures that is resulting in stuck LVM processes and hung I/O.  When
mirrors encounter a write failure, they block I/O and notify userspace
to reconfigure the mirror to remove failed devices.  This process is
open to a couple races:
1) Any LVM process other than the one that is meant to deal with the
mirror failure can attempt to read the mirror, fail, and block other
LVM commands (including the repair command) from proceeding due to
holding a lock on the volume group.
2) If there are multiple mirrors that suffer a failure in the same
volume group, a repair can block while attempting to read the LVM
label from one mirror while trying to repair the other.

Mitigation of these races has been attempted by disallowing label reading
of mirrors that are either suspended or are indicated as blocking by
the kernel.  While this has closed the window of opportunity for hitting
the above problems considerably, it hasn't closed it completely.  This is
because it is still possible to start an LVM command, read the status of
the mirror as healthy, and then perform the read for the label at the
moment after a the failure is discovered by the kernel.

I can see two solutions to this problem:
1) Allow users to configure whether mirrors can be candidates for LVM
labels (i.e. whether PVs can be created on mirror LVs).  If the user
chooses to allow label scanning of mirror LVs, it will be at the expense
of a possible hang in I/O or LVM processes.
2) Instrument a way to allow asynchronous label reading - allowing
blocked label reads to be ignored while continuing to process the LVM
command.  This would action would allow LVM commands to continue even
though they would have otherwise blocked trying to read a mirror.  They
can then release their lock and allow a repair command to commence.  In
the event of #2 above, the repair command already in progress can continue
and repair the failed mirror.

This patch brings solution #1.  If solution #2 is developed later on, the
configuration option created in #1 can be negated - allowing mirrors to
be scanned for labels by default once again.
2013-10-22 19:14:33 -05:00
Alasdair G Kergon
04d9a52684 release 2.02.103
52 files changed, 598 insertions(+), 264 deletions(-)
2013-10-04 14:32:23 +01:00
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
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
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
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
10bc19ec10 doc: add a note about device filtering while lvmetad is used 2013-09-16 16:29:33 +02:00
Peter Rajnoha
be9f4c77c9 conf: more comments about use_lvmetad + autoactivation relation 2013-08-22 08:29:20 +02:00
Jonathan Brassow
c13d1b11b2 RAID: Make "raid10" the default striped + mirror segment type
When both the '-i' and '-m' arguments are specified on the command
line, use the "raid10" segment type.  This way, the native RAID10
personality is used through dm-raid rather than layering a mirror
on striped LVs.  If the old behavior is desired, the '--type'
argument to use would be "mirror" rather than "raid10".
2013-08-06 14:15:08 -05:00
Jonathan Brassow
7e1083c985 RAID: Make "raid1" the default mirror segment type 2013-08-06 14:13:55 -05:00
Zdenek Kabelac
22fc80982a thin: add thin_repair and thin_dump options
Add new configure lvm.conf options for binaries thin_repair
and thin_dump.

Those are part of device-mapper-persistent-data package
and will be used for recovery of thin_pool.
2013-07-31 15:30:47 +02:00
Peter Rajnoha
8d1e511363 conf: add activation/auto_set_activation_skip
The activation/auto_set_activation_skip enables/disables automatic
adding of the ACTIVATION_SKIP LV flag. By default thin snapshots
are flagged to be skipped during activation.

And by default, the auto_set_activation_skip is enabled.
2013-07-12 20:54:17 +02:00
Zdenek Kabelac
21cd275b37 configure: more tweaks
We have to use  lvm_exec_prefix for proper values.
DEFAULT vars needs to be already evaluated.
2013-07-03 16:33:29 +02:00
Zdenek Kabelac
ffa11ed356 configure: fix install location of profile dir
Seems like we have a bit overcomplicated set of options
for deducing individual install dirs.

This patch fixes installation issues with DESTDIR,
but the whole set of configure options should be simplified.
2013-07-03 14:44:51 +02:00
Peter Rajnoha
21554ab5fe profile: add default.profile and install it
The default.profile contains all settings that are customizable
by a profile. This default profile can be copied across to create
new profiles.
2013-07-02 15:22:11 +02:00
Peter Rajnoha
6d1ed2254c conf: add separate 'conf' dir for config files 2013-07-02 15:22:11 +02:00