2008-10-08 16:50:13 +04:00
.TH LVM.CONF 5 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
2001-12-31 20:20:22 +03:00
.SH NAME
2014-06-11 13:06:30 +04:00
lvm.conf \(em Configuration file for LVM2
2001-12-31 20:20:22 +03:00
.SH SYNOPSIS
2010-05-20 17:47:21 +04:00
.B #DEFAULT_SYS_DIR#/lvm.conf
2001-12-31 20:20:22 +03:00
.SH DESCRIPTION
2013-07-03 18:45:27 +04:00
\fB lvm.conf\fP is loaded during the initialisation phase of
2012-04-11 16:42:10 +04:00
\fB lvm\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.
2013-07-03 18:45:27 +04:00
The settings defined in lvm.conf can be overridden by any
of these extended configuration methods:
.TP
2014-05-21 15:25:09 +04:00
.B direct config override on command line
The \fB \- \- config ConfigurationString\fP command line option takes the
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.
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.
There are two groups of profiles recognised: \fB command profiles\fP and
\fB metadata profiles\fP .
The \fB command 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
\fB \- \- commandprofile ProfileName\fP command line option that is recognised by
all LVM2 commands.
The \fB metadata 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 \fB lvchange\fP and \fB vgchange\fP commands
and their \fB \- \- metadataprofile ProfileName\fP and
2014-05-21 16:53:56 +04:00
\fB \- \- detachprofile\fP options or the \fB \- \- metadataprofile\fP
2014-05-21 15:25:09 +04:00
option during creation when using \fB vgcreate\fP or \fB lvcreate\fP command.
The \fB vgs\fP and \fB lvs\fP reporting commands provide \fB -o vg_profile\fP
and \fB -o lv_profile\fP output options to show the metadata profile
currently attached to a Volume Group or a Logical Volume.
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.
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 \fB command_profile_template.profile\fP
(for command profiles) and \fB metadata_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
2015-04-29 18:13:13 +03:00
\fB lvmconfig \- \- file <ProfileName.profile> \- \- type profilable-command <section>\fP
or \fB lvmconfig \- \- 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).
2014-03-18 11:28:58 +04:00
2013-07-04 14:09:21 +04:00
The profiles are stored in #DEFAULT_PROFILE_DIR# directory by default.
2014-05-21 15:25:09 +04:00
This location can be changed by using the \fB config/profile_dir\fP setting.
2013-07-03 18:45:27 +04:00
Each profile configuration is stored in \fB ProfileName.profile\fP file
in the profile directory. When referencing the profile, the \fB .profile\fP
suffix is left out.
.TP
2014-05-21 15:25:09 +04:00
.B tag config
.br
See \fB tags\fP configuration setting description below.
2013-07-03 18:45:27 +04:00
2001-12-31 20:20:22 +03:00
.LP
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 \fB config cascade\fP from left to right:
2014-05-21 15:25:09 +04:00
2015-07-08 20:02:28 +03:00
\fB direct config override on command line\fP -> \fB command profile config\fP -> \fB metadata profile config\fP -> \fB tag config\fP -> \fB lvmlocal.conf\fB -> \fB lvm.conf\fP
2014-05-21 15:25:09 +04:00
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 \fB lvmconfig\fP to check what settings are in use and what
2013-07-03 18:45:27 +04:00
the default values are.
2002-01-02 20:54:57 +03:00
.SH SYNTAX
2002-01-03 15:39:04 +03:00
.LP
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-02 20:54:57 +03:00
.br
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
.br
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 "* '" } '
2002-01-02 20:54:57 +03:00
.br
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
\fB section/key = value\fP is equivalent to \fB section { 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. \fB level = 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 " '" ] "' | '" [ "' '" ] '
2002-01-02 20:54:57 +03:00
.br
2012-04-11 16:42:10 +04:00
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
2012-04-11 16:42:10 +04:00
.BR type " = " integer " | " float " | " string
.BR integer " = [0-9]*"
2002-01-02 20:54:57 +03:00
.br
2012-04-11 16:42:10 +04:00
.BR float " = [0-9]*'" . '[0-9]*
2002-01-02 20:54:57 +03:00
.br
2012-04-11 16:42:10 +04:00
.B string \fR = '\fB"\fR'.*'\fB"\fR'
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.
2002-01-02 20:54:57 +03:00
2015-04-16 00:15:30 +03:00
.SH SETTINGS
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).
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
2015-04-28 19:00:37 +03:00
.B lvmconfig \- \- type default
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
2015-04-29 11:53:25 +03:00
.B lvmconfig \- \- type default --withcomments
2015-04-16 00:15:30 +03:00
Command to print a list of all possible config settings, with their
current values (configured, non-default values are shown):
2012-11-19 19:19:58 +04:00
.br
2015-04-28 19:00:37 +03:00
.B lvmconfig \- \- type current
2015-04-16 00:15:30 +03:00
Command to print all config settings that have been configured with a
different value than the default (configured, non-default values are
shown):
.br
2015-04-28 19:00:37 +03:00
.B lvmconfig \- \- type diff
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
2015-04-29 11:53:25 +03:00
.B lvmconfig \- \- type default --withcomments Section/Setting
2015-04-16 00:15:30 +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
2010-05-20 17:47:21 +04:00
.I #DEFAULT_LOCK_DIR#
2015-04-16 00:15:30 +03:00
.br
.I #DEFAULT_PROFILE_DIR#
2001-12-31 20:20:22 +03:00
.SH SEE ALSO
2015-04-16 00:15:30 +03:00
.BR lvm (8)
2015-04-28 19:00:37 +03:00
.BR lvmconfig (8)
2015-04-16 00:15:30 +03:00