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(5) 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 profile config
32 A profile is a set of selected customizable configuration set‐
33 tings that are aimed to achieve a certain characteristics in
34 various environments or uses. It's used to override existing
35 configuration. Normally, the name of the profile should reflect
36 that environment or use.
37
38 There are two groups of profiles recognised: command profiles and meta‐
39 data profiles.
40
41 The command profile is used to override selected configuration settings
42 at global LVM command level - it is applied at the very beginning of
43 LVM command execution and it is used throughout the whole time of LVM
44 command execution. The command profile is applied by using the --com‐
45 mandprofile ProfileName command line option that is recognised by all
46 LVM2 commands.
47
48 The metadata profile is used to override selected configuration set‐
49 tings at Volume Group/Logical Volume level - it is applied indepen‐
50 dently for each Volume Group/Logical Volume that is being processed. As
51 such, each Volume Group/Logical Volume can store the profile name used
52 in its metadata so next time the Volume Group/Logical Volume is pro‐
53 cessed, the profile is applied automatically. If Volume Group and any
54 of its Logical Volumes have different profiles defined, the profile de‐
55 fined for the Logical Volume is preferred. The metadata profile can be
56 attached/detached by using the lvchange and vgchange commands and their
57 --metadataprofile ProfileName and --detachprofile options or the
58 --metadataprofile option during creation when using vgcreate or lvcre‐
59 ate command. The vgs and lvs reporting commands provide -o vg_profile
60 and -o lv_profile output options to show the metadata profile currently
61 attached to a Volume Group or a Logical Volume.
62
63 The set of options allowed for command profiles is mutually exclusive
64 when compared to the set of options allowed for metadata profiles. The
65 settings that belong to either of these two sets can't be mixed to‐
66 gether and LVM tools will reject such profiles.
67
68 LVM itself provides a few predefined configuration profiles. Users are
69 allowed to add more profiles with different values if needed. For this
70 purpose, there's the command_profile_template.profile (for command pro‐
71 files) and metadata_profile_template.profile (for metadata profiles)
72 which contain all settings that are customizable by profiles of certain
73 type. Users are encouraged to copy these template profiles and edit
74 them as needed. Alternatively, the lvmconfig --file <ProfileName.pro‐
75 file> --type profilable-command <section> or lvmconfig --file <Profile‐
76 Name.profile> --type profilable-metadata <section> can be used to gen‐
77 erate a configuration with profilable settings in either of the type
78 for given section and save it to new ProfileName.profile (if the sec‐
79 tion is not specified, all profilable settings are reported).
80
81 The profiles are stored in /etc/lvm/profile directory by default. This
82 location can be changed by using the config/profile_dir setting. Each
83 profile configuration is stored in ProfileName.profile file in the pro‐
84 file directory. When referencing the profile, the .profile suffix is
85 left out.
86
87 tag config
88 See tags configuration setting description below.
89
90 When several configuration methods are used at the same time and when
91 LVM looks for the value of a particular setting, it traverses this con‐
92 fig cascade from left to right:
93
94 direct config override on command line → command profile config → meta‐
95 data profile config → tag config → lvmlocal.conf → lvm.conf
96
97 No part of this cascade is compulsory. If there's no setting value
98 found at the end of the cascade, a default value is used for that set‐
99 ting. Use lvmconfig to check what settings are in use and what the de‐
100 fault values are.
101
103 This section describes the configuration file syntax.
104
105 Whitespace is not significant unless it is within quotes. This pro‐
106 vides a wide choice of acceptable indentation styles. Comments begin
107 with # and continue to the end of the line. They are treated as white‐
108 space.
109
110 Here is an informal grammar:
111
112 file = value*
113 A configuration file consists of a set of values.
114
115 value = section | assignment
116 A value can either be a new section, or an assignment.
117
118 section = identifier '{' value* '}'
119 A section groups associated values together. If the same section
120 is encountered multiple times, the contents of all instances are
121 concatenated together in the order of appearance.
122 It is denoted by a name and delimited by curly brackets.
123 e.g. backup {
124 ...
125 }
126
127 assignment = identifier '=' ( array | type )
128 An assignment associates a type with an identifier. If the iden‐
129 tifier contains forward slashes, those are interpreted as path
130 delimiters. The statement section/key = value is equivalent to
131 section { key = value }. If multiple instances of the same key
132 are encountered, only the last value is used (and a warning is
133 issued).
134 e.g. level = 7
135
136 array = '[' ( type ',')* type ']' | '[' ']'
137 Inhomogeneous arrays are supported.
138 Elements must be separated by commas.
139 An empty array is acceptable.
140
141 type = integer|float|string
142 integer = [0-9]*
143 float = [0-9]*'.'[0-9]*
144 string = '"' .* '"'
145
146 Strings with spaces must be enclosed in double quotes, single
147 words that start with a letter can be left unquoted.
148
150 The lvmconfig command prints the LVM configuration settings in various
151 ways. See the man page lvmconfig(8).
152
153 Command to print a list of all possible config settings, with their de‐
154 fault values:
155 lvmconfig --type default
156
157 Command to print a list of all possible config settings, with their de‐
158 fault values, and a full description of each as a comment:
159 lvmconfig --type default --withcomments
160
161 Command to print a list of all possible config settings, with their
162 current values (configured, non-default values are shown):
163 lvmconfig --type current
164
165 Command to print all config settings that have been configured with a
166 different value than the default (configured, non-default values are
167 shown):
168 lvmconfig --type diff
169
170 Command to print a single config setting, with its default value, and a
171 full description, where "Section" refers to the config section, e.g.
172 global, and "Setting" refers to the name of the specific setting, e.g.
173 umask:
174 lvmconfig --type default --withcomments Section/Setting
175
177 /etc/lvm/lvm.conf
178 /etc/lvm/lvmlocal.conf
179 /etc/lvm/archive
180 /etc/lvm/backup
181 /etc/lvm/cache/.cache
182 /etc/lvm/profile
183 /run/lock/lvm
184
186 lvm(8), lvmconfig(8)
187
188
189
190Red Hat, Inc. LVM TOOLS 2.03.22(2) (2023-08-02) LVM.CONF(5)