1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
lvm2/man/lvm.conf.5_main
Zdenek Kabelac 9164a393de man: typography fixes
Correcting some usage of Bold and Italics (files).
Adding some missing SEE ALSO.
Fixing missed replaceable paths that are configurable.
Be careful about .P in .TP sections - need to use .sp for space line.
Use .UR/.UE for URL references.
2021-04-19 14:54:37 +02:00

225 lines
7.8 KiB
Plaintext

.TH LVM.CONF 5 "LVM TOOLS #VERSION#" "Red Hat, Inc."
.
.SH NAME
.
lvm.conf \(em Configuration file for LVM2
.
.SH SYNOPSIS
.
.I #DEFAULT_SYS_DIR#/lvm.conf
.
.SH DESCRIPTION
.
\fBlvm.conf\fP is loaded during the initialisation phase of
\fBlvm\fP(8). This file can in turn lead to other files
being loaded - settings read in later override earlier
settings. File timestamps are checked between commands and if
any have changed, all the files are reloaded.
.P
For a description of each \fBlvm.conf\fP(5) setting, run:
.P
.B lvmconfig --typeconfig default --withcomments --withspaces
.P
The settings defined in lvm.conf can be overridden by any
of these extended configuration methods:
.
.TP
.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.
.
.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
environments or uses. It's used to override existing configuration.
Normally, the name of the profile should reflect that environment or use.
.P
There are two groups of profiles recognised: \fBcommand profiles\fP and
\fBmetadata profiles\fP.
.P
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
\fB--commandprofile ProfileName\fP command line option that is recognised by
all LVM2 commands.
.P
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
and their \fB--metadataprofile ProfileName\fP and
\fB--detachprofile\fP options or the \fB--metadataprofile\fP
option during creation when using \fBvgcreate\fP or \fBlvcreate\fP command.
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
currently attached to a Volume Group or a Logical Volume.
.P
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.
.P
LVM itself provides a few predefined configuration profiles.
Users are allowed to add more profiles with different values if needed.
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
profiles and edit them as needed. Alternatively, the
\fBlvmconfig --file <ProfileName.profile> --type profilable-command <section>\fP
or \fBlvmconfig --file <ProfileName.profile> --type profilable-metadata <section>\fP
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).
.P
The profiles are stored in \fI#DEFAULT_PROFILE_DIR#\fP directory by default.
This location can be changed by using the \fBconfig/profile_dir\fP setting.
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.
.
.TP
.B tag config
.br
See \fBtags\fP configuration setting description below.
.P
When several configuration methods are used at the same time
and when LVM looks for the value of a particular setting, it traverses
this \fBconfig cascade\fP from left to right:
.P
\fBdirect config override on command line\fP \[->]
\fBcommand profile config\fP \[->]
\fBmetadata profile config\fP \[->]
\fBtag config\fP \[->]
\fBlvmlocal.conf\fP \[->]
\fBlvm.conf\fP
.P
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.
Use \fBlvmconfig\fP to check what settings are in use and what
the default values are.
.
.SH SYNTAX
.
This section describes the configuration file syntax.
.LP
Whitespace is not significant unless it is within quotes.
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
.BR file " = " value *
A configuration file consists of a set of values.
.TP
.BR value " = " section " | " assignment
A value can either be a new section, or an assignment.
.TP
.BR section " = " identifier " '" { "' " value "* '" } '
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.
.br
It is denoted by a name and delimited by curly brackets.
.br
e.g. backup {
.br
...
.br
}
.TP
.BR assignment " = " identifier " '" = "' ( " array " | " type " )"
.br
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).
.br
e.g. \fBlevel = 7\fP
.br
.TP
.BR array " = '" [ "' ( " type " '" , "')* " type " '" ] "' | '" [ "' '" ] '
Inhomogeneous arrays are supported.
.br
Elements must be separated by commas.
.br
An empty array is acceptable.
.TP
.BR type " = " integer | float | string
.BR integer " = [" 0 - 9 "]*"
.br
.BR float " = [" 0 - 9 "]*'" . "'[" 0 - 9 ]*
.br
.BR string " = '" \(dq "' .* '" \(dq '
.IP
Strings with spaces must be enclosed in double quotes, single words that start
with a letter can be left unquoted.
.
.SH SETTINGS
.
The
.B lvmconfig
command prints the LVM configuration settings in various ways.
See the man page
.BR lvmconfig (8).
.P
Command to print a list of all possible config settings, with their
default values:
.br
.B lvmconfig --type default
.P
Command to print a list of all possible config settings, with their
default values, and a full description of each as a comment:
.br
.B lvmconfig --type default --withcomments
.P
Command to print a list of all possible config settings, with their
current values (configured, non-default values are shown):
.br
.B lvmconfig --type current
.P
Command to print all config settings that have been configured with a
different value than the default (configured, non-default values are
shown):
.br
.B lvmconfig --type diff
.P
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
.B lvmconfig --type default --withcomments Section/Setting
.
.SH FILES
.I #DEFAULT_SYS_DIR#/lvm.conf
.br
.I #DEFAULT_SYS_DIR#/lvmlocal.conf
.br
.I #DEFAULT_ARCHIVE_DIR#
.br
.I #DEFAULT_BACKUP_DIR#
.br
.I #DEFAULT_CACHE_DIR#/.cache
.br
.I #DEFAULT_PROFILE_DIR#
.br
.I #DEFAULT_LOCK_DIR#
.
.SH SEE ALSO
.
.BR lvm (8),
.BR lvmconfig (8)