LVM.CONF(5)

NAME
lvm.conf - Configuration file for LVM2

SYNOPSIS
/etc/lvm/lvm.conf

DESCRIPTION
lvm.conf is loaded once, during the initialisation phase of lvm.

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. 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 is groups associated values together.
    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.
    e.g.    max_archives = 42

array = '[' (type ',')* type ']' | '[' ']'
    Inhomogeneous arrays are supported.
    Elements must be separated by commas.
    An empty array is acceptable.

type = integer | float | string
    integer = [0-9]*
    float = [0-9]*.[0-9]*
    string = '"' .* '"'

    Strings must be enclosed in double quotes.

SECTIONS

The sections that may be present in the file are:

devices — Device settings

    dir — Directory in which to create volume group device nodes. Defaults to "/dev".

    scan — List of directories to scan recursively for LVM physical volumes. Devices in directories outside this hierarchy will be ignored. Defaults to "/dev".

    filter — List of patterns to apply to devices found by a scan. Patterns are regular expressions delimited by any character and preceded by a (for accept) or r (for reject). The list is traversed in order, and the first regex that matches determines if the device will be accepted or rejected (ignored). Devices that don't match any patterns are accepted. For example, to ignore /dev/cdrom you could use: devices { filter=["r|cdrom|"] }

    cache — Persistent filter cache file. Defaults to "/etc/lvm/.cache".

    write_cache_state — Set to 0 to disable the writing out of the persistent filter cache file when lvm exits. Defaults to 1.

    types — List of pairs of additional acceptable block device types found in /proc/devices together with maximum (non-zero) number of partitions (normally 16). By default, LVM2 supports ide, sd, md, loop, dasd, dac960, nbd, ida, cciss, ubd and ataraid. Block devices with major numbers of different types are ignored by LVM2. Example: types = ["fd", 16]

log — Default log settings

    file — Location of log file. If this entry is not present, no log file is written.

    overwrite — Set to 1 to overwrite the log file each time a tool is invoked. By default tools append messages to the log file.

    level — Log level (0-9) of messages to write to the file. 9 is the most verbose; 0 should produce no output.

    verbose — Default level (0-3) of messages sent to stdout or stderr. 3 is the most verbose; 0 should produce the least output.

    syslog — Set to 1 (the default) to send log messages through syslog. Turn off by setting to 0. If you set to an integer greater than one, this is used - unvalidated - as the facility. The default is LOG_USER. See /usr/include/sys/syslog.h for safe facility values to use. For example, LOG_LOCAL0 might be 128.

    indent — When set to 1 (the default) messages are indented according to their severity. Set to 0 to turn off indentation.

    command_names — When set to 1, the command name is used as a prefix for each message. Default is 0 (off).

    prefix — Prefix used for all messages (after the command name). Default is two spaces.

backup — Configuration for metadata backups.

    archive_dir — Directory used for automatic metadata archives. Backup copies of former metadata for each volume group are archived here. Defaults to "/etc/lvm/archive".

    backup_dir — Directory used for automatic metadata backups. A single backup copy of the current metadata for each volume group is stored here. Defaults to "/etc/lvm/backup".

    archive — Whether or not tools automatically archive existing metadata into archive_dir before making changes to it. Default is 1 (automatic archives enabled). Set to 0 to disable. Disabling this might make metadata recovery difficult or impossible if something goes wrong.

    backup — Whether or not tools make an automatic backup into backup_dir after changing metadata. Default is 1 (automatic backups enabled). Set to 0 to disable. Disabling this might make metadata recovery difficult or impossible if something goes wrong.

    retain_min — Minimum number of archives to keep. Defaults to 10.

    retain_days — Minimum number of days to keep archive files. Defaults to 30.

shell — LVM2 built-in readline shell settings

    history_size — Maximum number of lines of shell history to retain (default 100) in $HOME/.lvm_history

global — Global settings

    test — If set to 1, run tools in test mode i.e. no metadata gets updated.

    proc — Mount point of proc filesystem. Defaults to /proc.

    umask — File creation mask for any files and directories created. Interpreted as octal if the first digit is zero. Defaults to 077. Use 022 to allow other users to read the files by default.

FILES
/etc/lvm/lvm.conf
$HOME/.lvm_history

SEE ALSO
lvm(8) umask(2) syslog(3) syslog.conf(5)