2021-04-15 14:16:41 +03:00
.TH LVM.CONF 5 "LVM TOOLS #VERSION#" "Red Hat, Inc."
2021-04-13 16:26:54 +03:00
.
2001-12-31 20:20:22 +03:00
.SH NAME
2021-04-13 16:26:54 +03:00
.
2014-06-11 13:06:30 +04:00
lvm.conf \(em Configuration file for LVM2
2021-04-13 16:26:54 +03:00
.
2001-12-31 20:20:22 +03:00
.SH SYNOPSIS
2021-04-13 16:26:54 +03:00
.
2021-04-15 14:16:41 +03:00
.I #DEFAULT_SYS_DIR#/lvm.conf
2021-04-13 16:26:54 +03:00
.
2001-12-31 20:20:22 +03:00
.SH DESCRIPTION
2021-04-13 16:26:54 +03:00
.
2013-07-03 18:45:27 +04:00
\fBlvm.conf\fP is loaded during the initialisation phase of
2012-04-11 16:42:10 +04:00
\fBlvm\fP(8). This file can in turn lead to other files
2004-11-16 21:09:32 +03:00
being loaded - settings read in later override earlier
2012-04-11 16:42:10 +04:00
settings. File timestamps are checked between commands and if
any have changed, all the files are reloaded.
2021-04-13 16:26:54 +03:00
.P
2021-04-15 14:16:41 +03:00
For a description of each \fBlvm.conf\fP(5) setting, run:
2021-04-13 16:26:54 +03:00
.P
2017-05-04 00:01:19 +03:00
.B lvmconfig --typeconfig default --withcomments --withspaces
2021-04-13 16:26:54 +03:00
.P
2013-07-03 18:45:27 +04:00
The settings defined in lvm.conf can be overridden by any
of these extended configuration methods:
2021-04-13 16:26:54 +03:00
.
2013-07-03 18:45:27 +04:00
.TP
2014-05-21 15:25:09 +04:00
.B direct config override on command line
2017-03-27 17:45:48 +03:00
The \fB--config ConfigurationString\fP command line option takes the
2014-05-21 15:25:09 +04:00
ConfigurationString as direct string representation of the configuration
to override the existing configuration. The ConfigurationString is of
exactly the same format as used in any LVM configuration file.
2021-04-13 16:26:54 +03:00
.
2013-07-03 18:45:27 +04:00
.TP
.B profile config
.br
A profile is a set of selected customizable configuration settings
that are aimed to achieve a certain characteristics in various
2014-05-21 15:25:09 +04:00
environments or uses. It's used to override existing configuration.
Normally, the name of the profile should reflect that environment or use.
2021-04-13 16:26:54 +03:00
.P
2014-05-21 15:25:09 +04:00
There are two groups of profiles recognised: \fBcommand profiles\fP and
\fBmetadata profiles\fP.
2021-04-13 16:26:54 +03:00
.P
2014-05-21 15:25:09 +04:00
The \fBcommand profile\fP is used to override selected configuration
settings at global LVM command level - it is applied at the very beginning
of LVM command execution and it is used throughout the whole time of LVM
command execution. The command profile is applied by using the
2017-03-27 17:45:48 +03:00
\fB--commandprofile ProfileName\fP command line option that is recognised by
2014-05-21 15:25:09 +04:00
all LVM2 commands.
2021-04-13 16:26:54 +03:00
.P
2014-05-21 15:25:09 +04:00
The \fBmetadata profile\fP is used to override selected configuration
settings at Volume Group/Logical Volume level - it is applied independently
for each Volume Group/Logical Volume that is being processed. As such,
each Volume Group/Logical Volume can store the profile name used
in its metadata so next time the Volume Group/Logical Volume is
processed, the profile is applied automatically. If Volume Group and
any of its Logical Volumes have different profiles defined, the profile
defined for the Logical Volume is preferred. The metadata profile can be
attached/detached by using the \fBlvchange\fP and \fBvgchange\fP commands
2017-03-27 17:45:48 +03:00
and their \fB--metadataprofile ProfileName\fP and
\fB--detachprofile\fP options or the \fB--metadataprofile\fP
2014-05-21 15:25:09 +04:00
option during creation when using \fBvgcreate\fP or \fBlvcreate\fP command.
2017-03-27 17:45:48 +03:00
The \fBvgs\fP and \fBlvs\fP reporting commands provide \fB-o vg_profile\fP
and \fB-o lv_profile\fP output options to show the metadata profile
2014-05-21 15:25:09 +04:00
currently attached to a Volume Group or a Logical Volume.
2021-04-13 16:26:54 +03:00
.P
2014-05-21 15:25:09 +04:00
The set of options allowed for command profiles is mutually exclusive
when compared to the set of options allowed for metadata profiles. The
settings that belong to either of these two sets can't be mixed together
and LVM tools will reject such profiles.
2021-04-13 16:26:54 +03:00
.P
2014-03-18 11:28:58 +04:00
LVM itself provides a few predefined configuration profiles.
Users are allowed to add more profiles with different values if needed.
2014-05-21 15:25:09 +04:00
For this purpose, there's the \fBcommand_profile_template.profile\fP
(for command profiles) and \fBmetadata_profile_template.profile\fP
(for metadata profiles) which contain all settings that are customizable
by profiles of certain type. Users are encouraged to copy these template
2014-05-21 16:53:56 +04:00
profiles and edit them as needed. Alternatively, the
2017-03-27 17:45:48 +03:00
\fBlvmconfig --file <ProfileName.profile> --type profilable-command <section>\fP
or \fBlvmconfig --file <ProfileName.profile> --type profilable-metadata <section>\fP
2014-05-21 15:25:09 +04:00
can be used to generate a configuration with profilable settings in either
of the type for given section and save it to new ProfileName.profile
(if the section is not specified, all profilable settings are reported).
2021-04-13 16:26:54 +03:00
.P
The profiles are stored in \fI#DEFAULT_PROFILE_DIR#\fP directory by default.
2014-05-21 15:25:09 +04:00
This location can be changed by using the \fBconfig/profile_dir\fP setting.
2013-07-03 18:45:27 +04:00
Each profile configuration is stored in \fBProfileName.profile\fP file
in the profile directory. When referencing the profile, the \fB.profile\fP
suffix is left out.
2021-04-13 16:26:54 +03:00
.
2013-07-03 18:45:27 +04:00
.TP
2014-05-21 15:25:09 +04:00
.B tag config
.br
See \fBtags\fP configuration setting description below.
2021-04-13 16:26:54 +03:00
.P
2013-07-03 18:45:27 +04:00
When several configuration methods are used at the same time
and when LVM looks for the value of a particular setting, it traverses
2014-04-01 13:19:38 +04:00
this \fBconfig cascade\fP from left to right:
2021-04-13 16:26:54 +03:00
.P
2021-04-15 14:16:41 +03:00
\fBdirect config override on command line\fP \[->]
\fBcommand profile config\fP \[->]
\fBmetadata profile config\fP \[->]
\fBtag config\fP \[->]
\fBlvmlocal.conf\fP \[->]
2021-04-13 16:26:54 +03:00
\fBlvm.conf\fP
.P
2013-07-03 18:45:27 +04:00
No part of this cascade is compulsory. If there's no setting value found at
the end of the cascade, a default value is used for that setting.
2015-04-28 19:00:37 +03:00
Use \fBlvmconfig\fP to check what settings are in use and what
2013-07-03 18:45:27 +04:00
the default values are.
2021-04-13 16:26:54 +03:00
.
2002-01-02 20:54:57 +03:00
.SH SYNTAX
2021-04-13 16:26:54 +03:00
.
2002-01-03 15:39:04 +03:00
This section describes the configuration file syntax.
.LP
2012-04-11 16:42:10 +04:00
Whitespace is not significant unless it is within quotes.
2002-01-03 15:39:04 +03:00
This provides a wide choice of acceptable indentation styles.
Comments begin with # and continue to the end of the line.
They are treated as whitespace.
.LP
Here is an informal grammar:
.TP
2012-04-11 16:42:10 +04:00
.BR file " = " value *
2002-01-03 15:39:04 +03:00
A configuration file consists of a set of values.
.TP
2012-04-11 16:42:10 +04:00
.BR value " = " section " | " assignment
2002-01-02 20:54:57 +03:00
A value can either be a new section, or an assignment.
2002-01-03 15:39:04 +03:00
.TP
2012-04-11 16:42:10 +04:00
.BR section " = " identifier " '" { "' " value "* '" } '
2014-11-24 01:41:58 +03:00
A section groups associated values together. If the same section is
encountered multiple times, the contents of all instances are concatenated
together in the order of appearance.
2002-01-02 20:54:57 +03:00
.br
2002-01-03 15:39:04 +03:00
It is denoted by a name and delimited by curly brackets.
2002-01-02 20:54:57 +03:00
.br
2002-01-08 02:04:48 +03:00
e.g. backup {
2002-01-02 20:54:57 +03:00
.br
2002-01-03 15:39:04 +03:00
...
2002-01-02 20:54:57 +03:00
.br
2002-01-03 15:39:04 +03:00
}
.TP
2012-04-11 16:42:10 +04:00
.BR assignment " = " identifier " '" = "' ( " array " | " type " )"
2002-01-02 20:54:57 +03:00
.br
2014-11-24 01:41:58 +03:00
An assignment associates a type with an identifier. If the identifier contains
forward slashes, those are interpreted as path delimiters. The statement
\fBsection/key = value\fP is equivalent to \fBsection { key = value }\fP. If
multiple instances of the same key are encountered, only the last value is used
(and a warning is issued).
2002-01-02 20:54:57 +03:00
.br
2014-11-24 01:41:58 +03:00
e.g. \fBlevel = 7\fP
2002-01-02 20:54:57 +03:00
.br
2002-01-03 15:39:04 +03:00
.TP
2012-04-11 16:42:10 +04:00
.BR array " = '" [ "' ( " type " '" , "')* " type " '" ] "' | '" [ "' '" ] '
Inhomogeneous arrays are supported.
2002-01-02 20:54:57 +03:00
.br
2012-04-11 16:42:10 +04:00
Elements must be separated by commas.
2002-01-02 20:54:57 +03:00
.br
2002-01-03 15:39:04 +03:00
An empty array is acceptable.
.TP
2021-04-13 16:26:54 +03:00
.BR type " = " integer | float | string
.BR integer " = [" 0 - 9 "]*"
2002-01-02 20:54:57 +03:00
.br
2021-04-13 16:26:54 +03:00
.BR float " = [" 0 - 9 "]*'" . "'[" 0 - 9 ]*
2002-01-02 20:54:57 +03:00
.br
2021-04-13 16:26:54 +03:00
.BR string " = '" \(dq "' .* '" \(dq '
2002-01-03 15:39:04 +03:00
.IP
2014-11-24 01:41:58 +03:00
Strings with spaces must be enclosed in double quotes, single words that start
with a letter can be left unquoted.
2021-04-13 16:26:54 +03:00
.
2015-04-16 00:15:30 +03:00
.SH SETTINGS
2021-04-13 16:26:54 +03:00
.
2015-04-16 00:15:30 +03:00
The
2015-04-28 19:00:37 +03:00
.B lvmconfig
2015-04-16 00:15:30 +03:00
command prints the LVM configuration settings in various ways.
See the man page
2015-04-28 19:00:37 +03:00
.BR lvmconfig (8).
2021-04-13 16:26:54 +03:00
.P
2015-04-16 00:15:30 +03:00
Command to print a list of all possible config settings, with their
default values:
2008-02-04 23:26:14 +03:00
.br
2017-03-27 17:45:48 +03:00
.B lvmconfig --type default
2021-04-13 16:26:54 +03:00
.P
2015-04-16 00:15:30 +03:00
Command to print a list of all possible config settings, with their
default values, and a full description of each as a comment:
2008-02-04 23:26:14 +03:00
.br
2017-03-27 17:45:48 +03:00
.B lvmconfig --type default --withcomments
2021-04-13 16:26:54 +03:00
.P
2015-04-16 00:15:30 +03:00
Command to print a list of all possible config settings, with their
2017-03-27 17:45:48 +03:00
current values (configured, non-default values are shown):
2012-11-19 19:19:58 +04:00
.br
2017-03-27 17:45:48 +03:00
.B lvmconfig --type current
2021-04-13 16:26:54 +03:00
.P
2015-04-16 00:15:30 +03:00
Command to print all config settings that have been configured with a
2017-03-27 17:45:48 +03:00
different value than the default (configured, non-default values are
2015-04-16 00:15:30 +03:00
shown):
.br
2017-03-27 17:45:48 +03:00
.B lvmconfig --type diff
2021-04-13 16:26:54 +03:00
.P
2015-04-16 00:15:30 +03:00
Command to print a single config setting, with its default value,
and a full description, where "Section" refers to the config section,
e.g. global, and "Setting" refers to the name of the specific setting,
e.g. umask:
.br
2017-03-27 17:45:48 +03:00
.B lvmconfig --type default --withcomments Section/Setting
2021-04-13 16:26:54 +03:00
.
2001-12-31 20:20:22 +03:00
.SH FILES
2010-05-20 17:47:21 +04:00
.I #DEFAULT_SYS_DIR#/lvm.conf
2012-04-11 16:42:10 +04:00
.br
2015-04-16 00:15:30 +03:00
.I #DEFAULT_SYS_DIR#/lvmlocal.conf
.br
2010-05-20 17:47:21 +04:00
.I #DEFAULT_ARCHIVE_DIR#
2012-04-11 16:42:10 +04:00
.br
2010-05-20 17:47:21 +04:00
.I #DEFAULT_BACKUP_DIR#
2012-04-11 16:42:10 +04:00
.br
2010-05-20 17:47:21 +04:00
.I #DEFAULT_CACHE_DIR#/.cache
2012-04-11 16:42:10 +04:00
.br
2015-04-16 00:15:30 +03:00
.I #DEFAULT_PROFILE_DIR#
2021-04-15 14:16:41 +03:00
.br
.I #DEFAULT_LOCK_DIR#
2021-04-13 16:26:54 +03:00
.
2001-12-31 20:20:22 +03:00
.SH SEE ALSO
2021-04-13 16:26:54 +03:00
.
.BR lvm (8),
2015-04-28 19:00:37 +03:00
.BR lvmconfig (8)