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