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

197 Commits

Author SHA1 Message Date
Zdenek Kabelac
c66a960149 build: install VDO small allocation profile
Profile shows all VDO configurables.

Usable with: lvcreate --metadataprofile vdo-small ...
2018-07-09 15:28:35 +02:00
Zdenek Kabelac
0d9a4c6989 lib: new vdo segment configurable options
Configurable for vdo segment with their default values.
Also specify their ranges with minimal and maximal values.
2018-07-09 15:28:35 +02:00
Zdenek Kabelac
a55d4b6051 build: libdm preload dir is no longer needed
Since we do not build lvm code with libdm, drop preload.
2018-07-09 00:23:32 +02:00
Zdenek Kabelac
086f1ef4a0 build: make generate 2018-06-22 15:36:34 +02:00
Zdenek Kabelac
5c2f7f083c build: make generate 2018-06-11 22:25:42 +02:00
Jonathan Brassow
2eba7c7755 clean-up: example.conf.in typo 2018-05-14 16:17:01 -05:00
Zdenek Kabelac
83e362cd32 build: make generate 2018-05-12 18:18:23 +02:00
Joe Thornber
00f1b208a1 [io paths] Unpick agk's aio stuff 2018-04-20 11:03:58 -05:00
Alasdair G Kergon
3e29c80122 device: Queue any aio beyond defined limits. 2018-02-08 20:15:37 +00:00
Alasdair G Kergon
8c7bbcfb0f device: Basic config and setup to support async I/O. 2018-02-08 20:15:14 +00:00
Alasdair G Kergon
fe63c09381 regenerate man and conf 2017-11-15 01:05:07 +00:00
Alasdair G Kergon
fe423ef583 lvmconfig: Add options to produce file preamble
Use --withgeneralpreamble and --withlocalpreamble instead of
concatenating files.
2017-08-05 16:23:34 +01:00
Alasdair G Kergon
b90014addc man: regenerate 2017-06-27 15:47:00 +01:00
Heinz Mauelshagen
5ae7a016b8 lvcreate: raise default raid regionsize to 2MiB
Related: rhbz1392947.
2017-04-13 16:10:49 +02:00
Alasdair G Kergon
4547218a7d conf: Add missing prefix to installation directory.
Our Makefiles also support systems that set the installation prefix
at configuration time - the use of DESTDIR is not required.
2017-04-13 02:17:27 +01:00
Alasdair G Kergon
5ac230095c make generate 2017-04-13 00:30:05 +01:00
Zdenek Kabelac
4a394f410d cache: introduce allocation/cache_metadata_format
Add new profilable configation setting to let user select
which metadata format of a created cache pool he wish to use.

By default the 'best' available format is autodetected at runtime,
but user may enforce format 1 or 2 ATM.

Code also detects availability for metadata2 supporting cache target.

In case of troubles user may easily Disable usage of this feature
by placing 'metadata2' into global/cache_disabled_features list.
2017-03-10 19:33:01 +01:00
Zdenek Kabelac
a9b78d26b1 cleanup: minor cosmetics
Update some return value to match return type.
Drop unused function and declaration.
2017-03-10 19:33:01 +01:00
Zdenek Kabelac
b185a3e333 config: update doc 2017-02-13 10:06:07 +01:00
Zdenek Kabelac
04a9cad499 config: new option dmeventd/thin_command
This setting will allowing configuring which command gets executed
when thin-pool fullness goes from 50%..100%
2017-01-20 23:53:26 +01:00
Zdenek Kabelac
ee754500db cleanup: update config doc 2017-01-20 23:52:40 +01:00
Zdenek Kabelac
f8234d6e5f libdm: add human R|readable units
When showing sizes with 'H|human' units we do use standard rounding.
This however is confusing users from time to time,
when the printed number uses some biger units i.e. GiB and there is just
tiny fraction of space missing.

So here is some real-life example with new 'r' unit.

$lvs

  LV    VG Attr       LSize  Pool Origin
  lvol0 vg -wi-a-----  1.99g
  lvol1 vg -wi-a----- <2.00g
  lvol2 vg -wi-a----- <2.01g

Meaning is - lvol1 has 'slightly' less then 2.00g - from sign '<' user
can be aware the LV doesn't have full 2.00GiB in size so he
will be less surpriced allocation of 2G volume will not succeed.

$ vgs
  VG #PV #LV #SN Attr   VSize  VFree
  vg   2   2   0 wz--n- <6,00g <2,01g

For uses needing  'old'  undecorated human unit simply will continue
to use 'H|h' units.

The new R|r  may further change when we would recongnize some
other way how to improve readability.
2017-01-20 23:52:17 +01:00
Alasdair G Kergon
52d1ddd601 config: regenerate 2016-08-30 13:23:39 +01: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
Peter Rajnoha
785e2c31f5 conf: add lvmdbusd.profile 2016-08-09 18:49:11 +02:00
Alasdair G Kergon
6f47e79a88 pre-release 2016-07-28 18:36:45 +01:00
Zdenek Kabelac
edb5d12463 config: keep new setting commented out 2016-07-28 15:08:11 +02:00
Peter Rajnoha
e4e29add68 conf: regenerate example.conf.in 2016-07-25 13:54:59 +02:00
Heinz Mauelshagen
7eb7909193 lvcreate: raid0 needs default number of stripes
Commit 3928c96a37 introduced
new defaults for raid number of stripes, which may cause
backwards compatibility issues with customer scripts.

Adding configurable option 'raid_stripe_all_devices' defaulting
to '0' (i.e. off = new behaviour) to select the old behaviour
of using all PVs in the VG or those provided on the command line.

In case any scripts rely on the old behaviour, just set
'raid_strip_all_devices = 1'.

- resolves rhbz1354650
2016-07-20 17:20:15 +02:00
Peter Rajnoha
d1d3820219 conf: add more comments for new settings related to output format and log report 2016-06-20 16:21:38 +02:00
Peter Rajnoha
083e538030 conf: regenerate profile templates 2016-06-20 11:33:43 +02:00
Peter Rajnoha
1127b090bd conf: add log/command_log_selection config setting 2016-06-20 11:33:43 +02:00
Peter Rajnoha
9c37b7ed7c conf: add report/{vgs,pvs,lvs,pvsegs,segs}_{cols,sort}_full config settings 2016-06-20 11:33:42 +02:00
Peter Rajnoha
bd0a0ae36b conf: add log/report_command_log config setting 2016-06-20 11:33:41 +02:00
Peter Rajnoha
a08e02afbf conf: add report/output_format config setting
New report/output_format configuration sets the output format used
for all LVM commands globally. Currently, there are 2 formats
recognized:
   - basic (the classical basic output with columns and rows, used by default)
   - json (output is in json format)
2016-06-20 11:33:41 +02:00
Peter Rajnoha
c36d4632a6 conf: add log/command_log_{sort,cols} config settings 2016-06-20 11:33:40 +02:00
Alasdair G Kergon
e4caf0beeb pre-release 2016-05-07 00:36:59 +01:00
Alasdair G Kergon
546b2006dd pre-release 2016-04-23 00:41:55 +01:00
Peter Rajnoha
06ef7ba876 doc: describe lvmlockd/lvmpolld features as available if LVM compiled with lockd/polld support 2016-03-30 14:10:56 +02:00
Alasdair G Kergon
2159a1429d pre-release 2016-03-11 00:19:16 +00:00
Peter Rajnoha
0ab1110164 conf: regenerate example.conf.in 2016-03-03 13:50:59 +01:00
Peter Rajnoha
136fd8f2f6 conf: add metadata/check_pv_device_sizes 2016-01-22 14:16:00 +01:00
Zdenek Kabelac
fcbef05aae doc: change fsf address
Hmm rpmlint suggest fsf is using a different address these days,
so lets keep it up-to-date
2016-01-21 12:11:37 +01:00
Peter Rajnoha
939d296525 conf: fix 'the volume list' vs 'volume list' and '@*' 2016-01-13 15:47:26 +01:00
Peter Rajnoha
9a81881965 cleanup: rename 'invisible devices' to 'hidden devices' 2016-01-13 15:37:15 +01:00
Peter Rajnoha
1417ed304b cleanup: rename 'invisible devices' to 'hidden devices' 2016-01-13 15:22:46 +01:00
Peter Rajnoha
293abbb8d2 conf: update command_profile_template.profile.in 2016-01-13 12:16:58 +01:00
Peter Rajnoha
53b355a24b conf: regenerate 2016-01-13 12:01:55 +01:00
Peter Rajnoha
a5c4c4efbd conf: clarify compact output settings 2015-10-20 11:01:09 +02:00
Peter Rajnoha
1ea7e2634d conf: regenerate 2015-10-19 10:01:14 +02:00
Peter Rajnoha
23d9b17a7b cleanup: typo in comment: compact_output_fields should be compact-output_cols 2015-10-19 09:59:05 +02:00
Peter Rajnoha
c3bfe07f2a config: add report/compact_output_cols to control which columns to compact in report output
The new report/compact_output_cols setting has exactly the same effect
as report/compact_output setting. The difference is that with the new
setting it's possible to define which cols should be compacted exactly
in contrast to all cols in case of report/compact_output.

In case both compact_output and compact_output_cols is enabled/set,
the compact_output prevails.

For example:

$ lvmconfig --type full report/compact_output report/compact_output_cols
compact_output=0
compact_output_cols=""

$ lvs vg
  LV    VG   Attr       LSize Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  lvol0 vg   -wi-a----- 4.00m

---

$ lvmconfig --type full report/compact_output report/compact_output_cols
compact_output=0
compact_output_cols="data_percent,metadata_percent,pool_lv,move_pv,origin"

$ lvs vg
  LV    VG   Attr       LSize Log Cpy%Sync Convert
  lvol0 vg   -wi-a----- 4.00m

---

$ lvmconfig --type full report/compact_output report/compact_output_cols
compact_output=1
compact_output_cols="data_percent,metadata_percent,pool_lv,move_pv,origin"

$ lvs vg
  LV    VG   Attr       LSize
  lvol0 vg   -wi-a----- 4.00m
2015-10-16 17:05:54 +02:00
Zdenek Kabelac
95b5d24f43 configure: relocate configure.h
Commit 9403edbb93 move location of
configure.h and lvm-version.h.

Let's try even better place then /conf dir which should be left
for user configurable files.

Put these files right into include dir.
2015-09-11 21:46:35 +02:00
Zdenek Kabelac
9403edbb93 configure: relocate generated headers
Relocate generated configure.h and lvm-version.h outside
of compilable .c source tree.

The reason is behind - when compiling in builddir != srcdir
the generated file in lib/misc/configure.h was used for all compiled
source file except ones located in lib/misc dir - those would have used
configure.h file located in this dir - if there have existed one (i.e.
from some other build)

This problem was only visible, when srcdir == buildir was used before
trying to use  srcdri != builddir  (as configure.h appeared then in
srcdir).
2015-09-07 17:40:58 +02:00
Alasdair G Kergon
a37fd93fbb pre-release 2015-08-26 23:11:13 +01:00
Alasdair G Kergon
15e20bb5c0 conf: Regenerate example.conf. 2015-08-17 16:51:43 +01:00
Zdenek Kabelac
694c88e031 cache: introduce mq and smq profiles
Add 2 demo profiles for mq and smq policies.
Show all support profilable params.

Use with: lvcreate --policy cache-mq ....
2015-08-12 14:11:16 +02:00
Alasdair G Kergon
3934ade5a2 gitignore: Update for in-place build. 2015-07-27 13:18:35 +01:00
Peter Rajnoha
ac3143c093 config: {thin,cache}_{check,repair}_options are never undefined
Require global/{thin,cache}_{check,repair}_options to be always defined.
If not defined directly by user in the configuration and if there's no
concrete default option to use, make "" (empty string) the default one -
it's then clearly visible in the "lvmconfig --type default" (and
generated lvm.conf) and also it makes its handling in the code more
straightforward so we don't need to handle undefined values.

This means, if there are no default values for these settings defined,
we end up with this generated now:
  {thin,cache}_{check,repair}_options = [ "" ]

So the value is never undefined and if it is, it's an error.

(The cache_repair_options is actually not used in the code at the moment,
but once the code using this setting is in, it will follow the same logic
as used for thin_repair_options.)
2015-07-14 10:13:41 +02:00
Peter Rajnoha
a405b89555 conf: regenerate 2015-07-07 14:27:00 +02:00
Peter Rajnoha
b174c27d4d conf: regenerate 2015-07-07 14:11:16 +02:00
Alasdair G Kergon
92138badd4 conf: Regenerate.
Fix missing --clear-needs-check-flag.
2015-06-30 17:09:56 +01:00
Peter Rajnoha
89d355ea04 configure: set DEFAULT_FALLBACK_TO_LVM1 in configure and use it in config_settings.h
Just like we have DEFAULT_USE_LVMETAD (or DEFUALT_USE_LVMPOLLD), use
fallback_to_lvm1=1 lvm.conf setting if we configured lvm2 with
--enable-lvm1-fallback and use fallback_to_lvm1=0 otherwise.

Also, generate proper lvm.conf.in with unconfigured value.
2015-06-30 14:09:05 +02:00
Peter Rajnoha
77f0e7a450 cleanup: time: error out on incorrect time_format and indentation in config_settings.h 2015-06-29 16:17:33 +02:00
Peter Rajnoha
125cd06698 conf: make time format configurable
Make it possible to define format for time that is displayed.
The way the format is defined is equal to the way that is used
for strftime function, although not all formatting options as
used in strftime are available for LVM2 - the set is restricted
(e.g. we do not allow newline to be printed). The lvm.conf
comments contain the whole list that LVM2 accepts for time format
together with brief description (copied from strftime man page).

For example:
(defaults used - the format is the same as used before this patch)
$ lvs -o+time vg/lvol0 vg/lvol1
  LV    VG   Attr       LSize Time
  lvol0 vg   -wi-a----- 4.00m 2015-06-25 16:18:34 +0200
  lvol1 vg   -wi-a----- 4.00m 2015-06-29 09:17:11 +0200

(using 'time_format = "@%s"' in lvm.conf - number of seconds
since the Epoch)
$ lvs -o+time vg/lvol0 vg/lvol1
  LV    VG   Attr       LSize Time
  lvol0 vg   -wi-a----- 4.00m @1435241914
  lvol1 vg   -wi-a----- 4.00m @1435562231
2015-06-29 14:30:35 +02:00
Peter Rajnoha
6f793d34ca config: regenerate lvm.conf.in and lvmlocal.conf.in 2015-06-29 13:43:28 +02:00
Peter Rajnoha
7559d871fb make: use lvmconfig ... --withspaces when generating lvm.conf and lvmlocal.conf 2015-06-24 13:20:38 +02:00
Peter Rajnoha
982cf44ff0 config: regenerate configure.in to accomodate all recent changes
Hopefully closer to the ideal.
2015-06-24 11:24:10 +02:00
David Teigland
0d15217a6c example.conf.in: apply previous improvements to example.conf 2015-05-15 20:32:58 +02:00
David Teigland
3f10dfd6c7 lvm.conf: add more information to the comment header 2015-05-14 10:52:24 -05:00
Zdenek Kabelac
b7d80806b6 conf: system_id_source is referencing CONFDIR
Since we allow to configure /etc in configure and compile-in
dir for /etc we need to properly advertise this location later.
2015-05-14 10:52:55 +02:00
Ondrej Kozina
c3d351ec9b new debug class for lvmpolld client code 2015-05-12 17:16:37 +02:00
Zdenek Kabelac
725136b57e configure: use_lvmetad/polld configurable
Configure provides proper settings for
use_lvmetad  and use_lvmpolld  conf setttings.

When the build of polld & lvmetad, these settings
are enabled by default unless explicitelly disabled
with --disable-use-lvmetad/--disable-use-lvmpolld.
2015-05-11 14:36:10 +02:00
Ondrej Kozina
e587b0677b lvmpolld: Add standalone polldaemon.
See doc/lvmpolld_overview.txt
2015-05-09 00:59:18 +01:00
Alasdair G Kergon
796dc9c91c config: Remove newly-exposed default settings.
Reinstate config settings matching the last release until every
case where the generator produces different output has been reviewed
and fresh decisions made about which defaults to expose as protection
against changes in newer releases. We should be trying to reduce, not
increase, this number.
2015-05-02 00:07:12 +01:00
Peter Rajnoha
0ba332e82a refactor: dumpconfig: keep --withcomments to display full comment and use --withsummary for one line summary 2015-04-29 11:14:18 +02:00
Alasdair G Kergon
d0c46c9ed5 conf: Avoid temp files when generating config. 2015-04-28 13:02:19 +01:00
David Teigland
0c1bda9b53 example.conf.in: regenerate
From recent config_settings.h changes.
2015-04-27 14:15:24 -05:00
David Teigland
33429ea083 make: autoconfisms for generate 2015-04-22 10:05:02 -05:00
David Teigland
808f88f9f0 make: let generate use the just built libdm 2015-04-22 09:37:56 -05:00
David Teigland
2e035162a1 config: thin_repair_options and cache_repair_options are undefined
By default these are empty strings, so the config settings
should be flagged as undefined, so they will be commented
out of the generated config.  Otherwise, the lines:

thin_repair_options=""
cache_repair_options=""

in the dump output cause a warning when processed since
lvm doesn't want an empty string.

Also regenerate lvm.conf.in.
2015-04-21 16:03:54 -05:00
David Teigland
3b15f79bf0 generate example.conf.in, lvmlocal.conf.in
These were created by 'make generate'.
2015-04-21 15:04:22 -05:00
David Teigland
47ed4cdc35 config: remove duplication of settings
The specific config settings have been removed
from the lvm.conf(5) man page, and replaced with
a description of how to use lvm dumpconfig to
view the settings.

The sample lvm.conf and lvmlocal.conf files are now generated:

example.conf.base  - initial ungenerated part of the file
example.conf.gen   - generated portion from dumpconfig
example.conf.in    - combination of .base and .gen files
example.conf       - result of configure processing .in file

lvmlocal.conf.base - initial ungenerated part of the file
lvmlocal.conf.gen  - generated portion from dumpconfig
lvmlocal.conf.in   - combination of .base and .gen files
lvmlocal.conf      - result of configure processing .in file

Do not edit the .in files, but edit config_settings.h
or the .base files, and then use 'make generate' to create
the new .in files.

- configure
  with options

- make
  creates tools/lvm

- make generate
  uses tools/lvm to create example.conf.in and lvmlocal.conf.in
  by combining .base files with dumpconfig output.

- configure
  with same options as above
  creates example.conf and lvmlocal.conf from .in files
2015-04-21 14:55:03 -05:00
Peter Rajnoha
974a029a8a lvm.conf: fix typo as -> is in read_only_volume_list comments 2015-03-31 15:38:29 +02:00
Peter Rajnoha
8bceb1e0bb conf: be more clear about wipe_signatures_when_zeroing_new_lvs option in comments 2015-02-27 09:17:10 +01:00
Alasdair G Kergon
1e59c0346a example.conf: Update systemid comments.
Avoid using 'cluster' (ambiguous).
Add holding ref for machine-id source.
2015-02-25 14:22:24 +00:00
Alasdair G Kergon
2fc2928978 config: Rename allow_system_id to extra_system_ids.
Add warnings to the config file templates and briefly document
each value.
Configure lvmlocal.conf and install in /etc/lvm.
2015-02-23 22:19:08 +00:00
Alasdair G Kergon
032c9178ca conf: Set default global/etc from --with-confdir. 2015-02-13 19:10:10 +00:00
David Teigland
8cdec4c434 system_id: use for VG ownership
See included lvmsystemid(7) for full description.
2015-02-13 10:10:27 -06:00
Peter Rajnoha
b88b75f55f conf: update profile templates for recent changes 2015-02-11 13:22:31 +01:00
Peter Rajnoha
e8aab3a7fd cleanup: conf: auxiliary_device_status_source -> external_device_info_source
auxiliary_device_status_source was name used during development
of this feature, renamed later.
2015-01-30 15:41:42 +01:00
Peter Rajnoha
1c7a509bed filters: add firmware RAID filter
Just like MD filtering that detects components of software RAID (md),
add detection for firmware RAID.

We're not adding any native code to detect this - there are lots of
firmware RAIDs out there which is just out of LVM scope. However,
with current changes with which we're able to get device info from
external sources (e.g. external_device_info_source="udev"), we can
do this easily if the external device status source has this kind
of information - which is the case of "udev" source where the results
of blkid scans are stored.

This detection should cover all firmware RAIDs that blkid can detect and
which are identified as:
  ID_FS_TYPE = {adaptec,ddf,hpt45x,hpt37x,isw,jmicron,lsi_mega,nvidia,promise_fasttrack,silicon_medley,via}_raid_member
2015-01-30 13:17:12 +01:00
Peter Rajnoha
bf8943b0f6 conf: add devices/external_device_info_source to lvm.conf 2015-01-30 13:01:12 +01:00
David Teigland
4f5ce1fa43 lvm.conf: update error_when_full description
Relate it to the --errorwhenfull option.
2015-01-22 13:01:02 -06:00
Zdenek Kabelac
2908ab3eed thin: errrorwhenfull support
Support error_if_no_space feature for thin pools.
Report more info about thinpool status:
(out_of_data (D), metadata_read_only (M), failed  (F) also as health
attribute.)
2015-01-14 14:52:05 +01:00
Peter Rajnoha
f867dc6b29 libdm: report: compact output applicable only if report is buffered 2014-12-05 14:18:51 +01:00
Peter Rajnoha
00d53d5fc1 config: add report/compact_output lvm.conf setting to enable or isable field compacting
$ lvm dumpconfig report/compact_output
compact_output=0

$ lvs vg
  LV    VG   Attr       LSize Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  lvol0 vg   owi-a-s--- 4.00m
  lvol1 vg   -wi-a----- 4.00m
  lvol2 vg   swi-a-s--- 4.00m      lvol0  0.00

$ lvm dumpconfig report/compact_output
compact_output=1

$ lvs vg
  LV    VG   Attr       LSize Origin Data%
  lvol0 vg   owi-a-s--- 4.00m
  lvol1 vg   -wi-a----- 4.00m
  lvol2 vg   swi-a-s--- 4.00m lvol0  0.00
2014-12-05 12:00:28 +01:00
Zdenek Kabelac
e0164f2188 sparse: configurable type for sparse volumes
Support compile type configurable defaults for creation
of sparse volumes.

By default now create 'thin-pools' for sparse volumes.
Use the global/sparse_segtype_default to switch back to old
snapshots if needed.

Apply the same compile logic for newly introduces mirror/raid1 options.
2014-10-30 23:58:48 +01:00
David Teigland
17ab39f743 cache: include cache mode in vg metadata and display
The cache mode of a new cache pool is always explicitly
included in the vg metadata.  If a cache mode is not
specified on the command line, the cache mode is taken
from lvm.conf allocation/cache_pool_cachemode, which
defaults to "writethrough".

The cache mode can be displayed with lvs -o+cachemode.
2014-10-02 11:17:41 -05:00
Petr Rockai
fbc28cc7ad conf: Update comments on lvmetad+filters in example.conf.in. 2014-09-30 11:39:07 +02:00