LVM.CONF(5)
๐ LVM.CONF(5) โ the configuration file for LVM2, bestie edition ๐
okay so this is the manual page for lvm.conf, aka the file-format page for LVM2 config. Manual name: lvm.conf, section 5. Let's get into it ๐ธ
โจ NAME โจ
lvm.conf โ Configuration file for LVM2 ๐
โจ SYNOPSIS โจ
/etc/lvm/lvm.conf
๐ฆ DESCRIPTION ๐ฆ
lvm.conf gets loaded during the initialisation phase of lvm(8). and no cap, this file can then lead to other files being loaded too โ settings you read in later override the earlier ones. file timestamps are checked between commands, and if any of them changed, literally all the files get reloaded. it's giving refresh ๐ซ
for a description of every single lvm.conf(5) setting, just run this:
lvmconfig --typeconfig default --withcomments --withspaces
now the tea โ โ the settings you define in lvm.conf can be overridden by any of these extended configuration methods:
- direct config override on command line โ the
--configConfigurationString command line option takes the ConfigurationString as a direct string representation of the configuration, and uses it to override the existing configuration. the ConfigurationString is in exactly the same format as used in any LVM configuration file. periodt ๐ - profile config โ a profile is a set of selected customizable configuration settings that are meant to achieve 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, iykyk.
there are two groups of profiles recognised: command profiles and metadata profiles.
- the command profile is used to override selected configuration settings at global LVM command level โ it gets applied at the very beginning of LVM command execution and it's used throughout the whole time of LVM command execution. the command profile is applied by using the
--commandprofileProfileName command line option, which is recognised by all LVM2 commands. ๐ - the metadata profile is used to override selected configuration settings at Volume Group/Logical Volume level โ it's 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 gets applied automatically. if a 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
lvchangeandvgchangecommands and their--metadataprofileProfileName and--detachprofileoptions, or the--metadataprofileoption during creation when usingvgcreateorlvcreatecommand. thevgsandlvsreporting commands provide-o vg_profileand-o lv_profileoutput options to show the metadata profile currently attached to a Volume Group or a Logical Volume. obsessed with the receipts ๐งพ
okay so 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 straight up reject such profiles. no mixing, no exceptions ๐ซ
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 command_profile_template.profile (for command profiles) and metadata_profile_template.profile (for metadata profiles), which contain all settings that are customizable by profiles of a certain type. users are encouraged to copy these template profiles and edit them as needed. alternatively, this:
lvmconfig --file <ProfileName.profile> --type profilable-command <section>
or this:
lvmconfig --file <ProfileName.profile> --type profilable-metadata <section>
can be used to generate a configuration with profilable settings for either type of the given section and save it to a new ProfileName.profile (and if the section is not specified, all profilable settings are reported). cute โจ
the profiles are stored in /etc/lvm/profile directory by default. this location can be changed by using the config/profile_dir setting. each profile configuration is stored in ProfileName.profile file in the profile directory. when referencing the profile, the .profile suffix is left out. ๐
- tag config โ see the
tagsconfiguration setting description below. ๐
when several configuration methods are used at the same time and LVM looks for the value of a particular setting, it traverses this config cascade from left to right:
direct config override on command line โ command profile config โ
metadata profile config โ tag config โ lvmlocal.conf โ lvm.conf
no part of this cascade is compulsory, bestie. if there's no setting value found at the end of the cascade, a default value is used for that setting. use lvmconfig to check what settings are in use and what the default values are. vibe check your config, fr fr โ
๐ SYNTAX ๐
this section describes the configuration file syntax.
whitespace is not significant unless it is within quotes. this provides a wide choice of acceptable indentation styles โ do whatever, it's your life ๐
. comments begin with # and continue to the end of the line. they are treated as whitespace.
here is an informal grammar:
file = value*โ a configuration file consists of a set of values.value = section | assignmentโ a value can either be a new section, or an assignment.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. it is denoted by a name and delimited by curly brackets. e.g.
backup {
...
}
assignment = identifier '=' ( array | type )โ an assignment associates a type with an identifier. if the identifier contains forward slashes, those are interpreted as path delimiters. the statementsection/key = valueis equivalent tosection { key = value }. if multiple instances of the same key are encountered, only the last value is used (and a warning is issued). e.g.
level = 7
array = '[' ( type ',')* type ']' | '[' ']'โ inhomogeneous arrays are supported. elements must be separated by commas. an empty array is acceptable. an array with one element will be correctly interpreted if the array brackets are missing.type = integer|float|stringinteger = [0-9]*float = [0-9]*'.'[0-9]*string = '"' .* '"'
strings with spaces must be enclosed in double quotes, single words that start with a letter can be left unquoted.
๐ SETTINGS ๐
the lvmconfig command prints the LVM configuration settings in various ways. see the man page lvmconfig(8).
command to print a list of all possible config settings, with their default values:
lvmconfig --type default
command to print a list of all possible config settings, with their default values, and a full description of each as a comment:
lvmconfig --type default --withcomments
command to print a list of all possible config settings, with their current values (configured, non-default values are shown):
lvmconfig --type current
command to print all config settings that have been configured with a different value than the default (configured, non-default values are shown):
lvmconfig --type diff
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:
lvmconfig --type default --withcomments Section/Setting
๐ FILES ๐
/etc/lvm/lvm.conf/etc/lvm/lvmlocal.conf/etc/lvm/archive/etc/lvm/backup/etc/lvm/cache/.cache/etc/lvm/profile/run/lock/lvm
๐ SEE ALSO ๐
and that's the whole page, bestie ๐ซถ this was brought to you by Red Hat, Inc., LVM TOOLS 2.03.44(2), dated 2026-10-27 โ go forth and configure responsibly, mwah ๐โจ
๐ฆ where this page comes from
- arch rolling: lvm2 2.03.44-1 ยท GPL-2.0-only AND LGPL-2.1-only
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms