1LVM.CONF(5)                   File Formats Manual                  LVM.CONF(5)
2
3
4

NAME

6       lvm.conf — Configuration file for LVM2
7

SYNOPSIS

9       /etc/lvm/lvm.conf
10

DESCRIPTION

12       lvm.conf  is  loaded  during  the initialisation phase of lvm(8).  This
13       file can in turn lead to other files being loaded -  settings  read  in
14       later  override  earlier settings.  File timestamps are checked between
15       commands and if any have changed, all the files are reloaded.
16
17       For a description of each lvm.conf setting, run:
18
19       lvmconfig --typeconfig default --withcomments --withspaces
20
21       The settings defined in lvm.conf can be  overridden  by  any  of  these
22       extended configuration methods:
23
24       direct config override on command line
25              The  --config  ConfigurationString command line option takes the
26              ConfigurationString as direct string representation of the  con‐
27              figuration  to override the existing configuration. The Configu‐
28              rationString is of exactly the same format as used  in  any  LVM
29              configuration file.
30
31
32       profile config
33              A  profile  is a set of selected customizable configuration set‐
34              tings that are aimed to achieve  a  certain  characteristics  in
35              various  environments  or  uses.  It's used to override existing
36              configuration.  Normally, the name of the profile should reflect
37              that environment or use.
38
39              There  are  two  groups of profiles recognised: command profiles
40              and metadata profiles.
41
42              The command profile is used to override  selected  configuration
43              settings at global LVM command level - it is applied at the very
44              beginning of LVM command execution and it is used throughout the
45              whole  time  of  LVM  command  execution. The command profile is
46              applied by using the --commandprofile ProfileName  command  line
47              option that is recognised by all LVM2 commands.
48
49              The  metadata profile is used to override selected configuration
50              settings at Volume Group/Logical Volume level -  it  is  applied
51              independently for each Volume Group/Logical Volume that is being
52              processed. As such, each Volume Group/Logical Volume  can  store
53              the  profile  name  used in its metadata so next time the Volume
54              Group/Logical Volume is processed, the profile is applied  auto‐
55              matically.  If  Volume Group and any of its Logical Volumes have
56              different profiles defined, the profile defined for the  Logical
57              Volume    is    preferred.   The   metadata   profile   can   be
58              attached/detached by using the lvchange  and  vgchange  commands
59              and  their  --metadataprofile  ProfileName  and  --detachprofile
60              options or the --metadataprofile  option  during  creation  when
61              using  vgcreate  or lvcreate command.  The vgs and lvs reporting
62              commands provide -o vg_profile and -o lv_profile output  options
63              to  show  the  metadata  profile  currently attached to a Volume
64              Group or a Logical Volume.
65
66              The set of options allowed  for  command  profiles  is  mutually
67              exclusive  when compared to the set of options allowed for meta‐
68              data profiles. The settings that belong to either of  these  two
69              sets can't be mixed together and LVM tools will reject such pro‐
70              files.
71
72              LVM itself provides a  few  predefined  configuration  profiles.
73              Users  are allowed to add more profiles with different values if
74              needed.  For  this  purpose,  there's  the  command_profile_tem‐
75              plate.profile  (for  command profiles) and metadata_profile_tem‐
76              plate.profile (for metadata profiles) which contain all settings
77              that  are  customizable  by  profiles of certain type. Users are
78              encouraged to copy these template  profiles  and  edit  them  as
79              needed.  Alternatively,  the  lvmconfig --file <ProfileName.pro‐
80              file> --type profilable-command <section>  or  lvmconfig  --file
81              <ProfileName.profile>  --type  profilable-metadata <section> can
82              be used to generate a configuration with profilable settings  in
83              either of the type for given section and save it to new Profile‐
84              Name.profile (if the section is not  specified,  all  profilable
85              settings are reported).
86
87              The   profiles  are  stored  in  /etc/lvm/profile  directory  by
88              default.  This location can be changed by using the  config/pro‐
89              file_dir  setting.  Each profile configuration is stored in Pro‐
90              fileName.profile file in the profile directory. When referencing
91              the profile, the .profile suffix is left out.
92
93
94       tag config
95              See tags configuration setting description below.
96
97
98       When  several  configuration methods are used at the same time and when
99       LVM looks for the value of a particular setting, it traverses this con‐
100       fig cascade from left to right:
101
102       direct config override on command line-> command profile config-> meta‐
103       data profile config-> tag config-> lvmlocal.conf-> lvm.conf
104
105       No part of this cascade is compulsory.  If  there's  no  setting  value
106       found  at the end of the cascade, a default value is used for that set‐
107       ting.  Use lvmconfig to check what settings are in  use  and  what  the
108       default values are.
109

SYNTAX

111       This section describes the configuration file syntax.
112
113       Whitespace  is  not  significant unless it is within quotes.  This pro‐
114       vides a wide choice of acceptable indentation styles.   Comments  begin
115       with # and continue to the end of the line.  They are treated as white‐
116       space.
117
118       Here is an informal grammar:
119
120       file = value*
121              A configuration file consists of a set of values.
122
123       value = section | assignment
124              A value can either be a new section, or an assignment.
125
126       section = identifier '{' value* '}'
127              A section groups associated values together. If the same section
128              is encountered multiple times, the contents of all instances are
129              concatenated together in the order of appearance.
130              It is denoted by a name and delimited by curly brackets.
131              e.g. backup {
132                        ...
133                   }
134
135       assignment = identifier '=' ( array | type )
136              An assignment associates a type with an identifier. If the iden‐
137              tifier  contains  forward slashes, those are interpreted as path
138              delimiters. The statement section/key = value is  equivalent  to
139              section  {  key = value }. If multiple instances of the same key
140              are encountered, only the last value is used (and a  warning  is
141              issued).
142              e.g. level = 7
143
144       array =  '[' ( type ',')* type ']' | '[' ']'
145              Inhomogeneous arrays are supported.
146              Elements must be separated by commas.
147              An empty array is acceptable.
148
149       type = integer | float | string
150              integer = [0-9]*
151              float = [0-9]*'.'[0-9]*
152              string = '"'.*'"'
153
154              Strings  with  spaces  must be enclosed in double quotes, single
155              words that start with a letter can be left unquoted.
156
157

SETTINGS

159       The lvmconfig command prints the LVM configuration settings in  various
160       ways.  See the man page lvmconfig(8).
161
162       Command  to  print  a  list of all possible config settings, with their
163       default values:
164       lvmconfig --type default
165
166       Command to print a list of all possible  config  settings,  with  their
167       default values, and a full description of each as a comment:
168       lvmconfig --type default --withcomments
169
170       Command  to  print  a  list of all possible config settings, with their
171       current values (configured, non-default values are shown):
172       lvmconfig --type current
173
174       Command to print all config settings that have been configured  with  a
175       different  value  than  the default (configured, non-default values are
176       shown):
177       lvmconfig --type diff
178
179       Command to print a single config setting, with its default value, and a
180       full  description,  where  "Section" refers to the config section, e.g.
181       global, and "Setting" refers to the name of the specific setting,  e.g.
182       umask:
183       lvmconfig --type default --withcomments Section/Setting
184
185
186

FILES

188       /etc/lvm/lvm.conf
189       /etc/lvm/lvmlocal.conf
190       /etc/lvm/archive
191       /etc/lvm/backup
192       /etc/lvm/cache/.cache
193       /run/lock/lvm
194       /etc/lvm/profile
195
196

SEE ALSO

198       lvm(8) lvmconfig(8)
199
200
201
202
203Red Hat, Inc.          LVM TOOLS 2.03.06(2) (2019-10-23)           LVM.CONF(5)
Impressum