1LVM.CONF(5) File Formats Manual LVM.CONF(5)
2
3
4
6 lvm.conf — Configuration file for LVM2
7
9 /etc/lvm/lvm.conf
10
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 ex‐
22 tended 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 ap‐
46 plied by using the --commandprofile ProfileName command line op‐
47 tion 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 attached/de‐
58 tached by using the lvchange and vgchange commands and their
59 --metadataprofile ProfileName and --detachprofile options or the
60 --metadataprofile option during creation when using vgcreate or
61 lvcreate command. The vgs and lvs reporting commands provide -o
62 vg_profile and -o lv_profile output options to show the metadata
63 profile currently attached to a Volume Group or a Logical Vol‐
64 ume.
65
66 The set of options allowed for command profiles is mutually ex‐
67 clusive when compared to the set of options allowed for metadata
68 profiles. The settings that belong to either of these two sets
69 can't be mixed together and LVM tools will reject such profiles.
70
71 LVM itself provides a few predefined configuration profiles.
72 Users are allowed to add more profiles with different values if
73 needed. For this purpose, there's the command_profile_tem‐
74 plate.profile (for command profiles) and metadata_profile_tem‐
75 plate.profile (for metadata profiles) which contain all settings
76 that are customizable by profiles of certain type. Users are en‐
77 couraged to copy these template profiles and edit them as
78 needed. Alternatively, the lvmconfig --file <ProfileName.pro‐
79 file> --type profilable-command <section> or lvmconfig --file
80 <ProfileName.profile> --type profilable-metadata <section> can
81 be used to generate a configuration with profilable settings in
82 either of the type for given section and save it to new Profile‐
83 Name.profile (if the section is not specified, all profilable
84 settings are reported).
85
86 The profiles are stored in /etc/lvm/profile directory by de‐
87 fault. This location can be changed by using the config/pro‐
88 file_dir setting. Each profile configuration is stored in Pro‐
89 fileName.profile file in the profile directory. When referencing
90 the profile, the .profile suffix is left out.
91
92
93 tag config
94 See tags configuration setting description below.
95
96
97 When several configuration methods are used at the same time and when
98 LVM looks for the value of a particular setting, it traverses this con‐
99 fig cascade from left to right:
100
101 direct config override on command line-> command profile config-> meta‐
102 data profile config-> tag config-> lvmlocal.conf-> lvm.conf
103
104 No part of this cascade is compulsory. If there's no setting value
105 found at the end of the cascade, a default value is used for that set‐
106 ting. Use lvmconfig to check what settings are in use and what the de‐
107 fault values are.
108
110 This section describes the configuration file syntax.
111
112 Whitespace is not significant unless it is within quotes. This pro‐
113 vides a wide choice of acceptable indentation styles. Comments begin
114 with # and continue to the end of the line. They are treated as white‐
115 space.
116
117 Here is an informal grammar:
118
119 file = value*
120 A configuration file consists of a set of values.
121
122 value = section | assignment
123 A value can either be a new section, or an assignment.
124
125 section = identifier '{' value* '}'
126 A section groups associated values together. If the same section
127 is encountered multiple times, the contents of all instances are
128 concatenated together in the order of appearance.
129 It is denoted by a name and delimited by curly brackets.
130 e.g. backup {
131 ...
132 }
133
134 assignment = identifier '=' ( array | type )
135 An assignment associates a type with an identifier. If the iden‐
136 tifier contains forward slashes, those are interpreted as path
137 delimiters. The statement section/key = value is equivalent to
138 section { key = value }. If multiple instances of the same key
139 are encountered, only the last value is used (and a warning is
140 issued).
141 e.g. level = 7
142
143 array = '[' ( type ',')* type ']' | '[' ']'
144 Inhomogeneous arrays are supported.
145 Elements must be separated by commas.
146 An empty array is acceptable.
147
148 type = integer | float | string
149 integer = [0-9]*
150 float = [0-9]*'.'[0-9]*
151 string = '"'.*'"'
152
153 Strings with spaces must be enclosed in double quotes, single
154 words that start with a letter can be left unquoted.
155
156
158 The lvmconfig command prints the LVM configuration settings in various
159 ways. See the man page lvmconfig(8).
160
161 Command to print a list of all possible config settings, with their de‐
162 fault values:
163 lvmconfig --type default
164
165 Command to print a list of all possible config settings, with their de‐
166 fault values, and a full description of each as a comment:
167 lvmconfig --type default --withcomments
168
169 Command to print a list of all possible config settings, with their
170 current values (configured, non-default values are shown):
171 lvmconfig --type current
172
173 Command to print all config settings that have been configured with a
174 different value than the default (configured, non-default values are
175 shown):
176 lvmconfig --type diff
177
178 Command to print a single config setting, with its default value, and a
179 full description, where "Section" refers to the config section, e.g.
180 global, and "Setting" refers to the name of the specific setting, e.g.
181 umask:
182 lvmconfig --type default --withcomments Section/Setting
183
184
185
187 /etc/lvm/lvm.conf
188 /etc/lvm/lvmlocal.conf
189 /etc/lvm/archive
190 /etc/lvm/backup
191 /etc/lvm/cache/.cache
192 /run/lock/lvm
193 /etc/lvm/profile
194
195
197 lvm(8) lvmconfig(8)
198
199
200
201
202Red Hat, Inc. LVM TOOLS 2.03.11(2) (2021-01-08) LVM.CONF(5)