xref: /dflybsd-src/contrib/lvm2/dist/doc/example.conf (revision 86d7f5d305c6adaa56ff4582ece9859d73106103)
186d7f5d3SJohn Marino# This is an example configuration file for the LVM2 system.
286d7f5d3SJohn Marino# It contains the default settings that would be used if there was no
386d7f5d3SJohn Marino# /etc/lvm/lvm.conf file.
486d7f5d3SJohn Marino#
586d7f5d3SJohn Marino# Refer to 'man lvm.conf' for further information including the file layout.
686d7f5d3SJohn Marino#
786d7f5d3SJohn Marino# To put this file in a different directory and override /etc/lvm set
886d7f5d3SJohn Marino# the environment variable LVM_SYSTEM_DIR before running the tools.
986d7f5d3SJohn Marino
1086d7f5d3SJohn Marino
1186d7f5d3SJohn Marino# This section allows you to configure which block devices should
1286d7f5d3SJohn Marino# be used by the LVM system.
1386d7f5d3SJohn Marinodevices {
1486d7f5d3SJohn Marino
1586d7f5d3SJohn Marino    # Where do you want your volume groups to appear ?
1686d7f5d3SJohn Marino    dir = "/dev"
1786d7f5d3SJohn Marino
1886d7f5d3SJohn Marino    # An array of directories that contain the device nodes you wish
1986d7f5d3SJohn Marino    # to use with LVM2.
2086d7f5d3SJohn Marino    scan = [ "/dev" ]
2186d7f5d3SJohn Marino
2286d7f5d3SJohn Marino    # If several entries in the scanned directories correspond to the
2386d7f5d3SJohn Marino    # same block device and the tools need to display a name for device,
2486d7f5d3SJohn Marino    # all the pathnames are matched against each item in the following
2586d7f5d3SJohn Marino    # list of regular expressions in turn and the first match is used.
2686d7f5d3SJohn Marino    preferred_names = [ ]
2786d7f5d3SJohn Marino
2886d7f5d3SJohn Marino    # Try to avoid using undescriptive /dev/dm-N names, if present.
2986d7f5d3SJohn Marino    # preferred_names = [ "^/dev/mpath/", "^/dev/mapper/mpath", "^/dev/[hs]d" ]
3086d7f5d3SJohn Marino
3186d7f5d3SJohn Marino    # A filter that tells LVM2 to only use a restricted set of devices.
3286d7f5d3SJohn Marino    # The filter consists of an array of regular expressions.  These
3386d7f5d3SJohn Marino    # expressions can be delimited by a character of your choice, and
3486d7f5d3SJohn Marino    # prefixed with either an 'a' (for accept) or 'r' (for reject).
3586d7f5d3SJohn Marino    # The first expression found to match a device name determines if
3686d7f5d3SJohn Marino    # the device will be accepted or rejected (ignored).  Devices that
3786d7f5d3SJohn Marino    # don't match any patterns are accepted.
3886d7f5d3SJohn Marino
3986d7f5d3SJohn Marino    # Be careful if there there are symbolic links or multiple filesystem
4086d7f5d3SJohn Marino    # entries for the same device as each name is checked separately against
4186d7f5d3SJohn Marino    # the list of patterns.  The effect is that if any name matches any 'a'
4286d7f5d3SJohn Marino    # pattern, the device is accepted; otherwise if any name matches any 'r'
4386d7f5d3SJohn Marino    # pattern it is rejected; otherwise it is accepted.
4486d7f5d3SJohn Marino
4586d7f5d3SJohn Marino    # Don't have more than one filter line active at once: only one gets used.
4686d7f5d3SJohn Marino
4786d7f5d3SJohn Marino    # Run vgscan after you change this parameter to ensure that
4886d7f5d3SJohn Marino    # the cache file gets regenerated (see below).
4986d7f5d3SJohn Marino    # If it doesn't do what you expect, check the output of 'vgscan -vvvv'.
5086d7f5d3SJohn Marino
5186d7f5d3SJohn Marino
5286d7f5d3SJohn Marino    # By default we accept every block device:
5386d7f5d3SJohn Marino    filter = [ "a/.*/" ]
5486d7f5d3SJohn Marino
5586d7f5d3SJohn Marino    # Exclude the cdrom drive
5686d7f5d3SJohn Marino    # filter = [ "r|/dev/cdrom|" ]
5786d7f5d3SJohn Marino
5886d7f5d3SJohn Marino    # When testing I like to work with just loopback devices:
5986d7f5d3SJohn Marino    # filter = [ "a/loop/", "r/.*/" ]
6086d7f5d3SJohn Marino
6186d7f5d3SJohn Marino    # Or maybe all loops and ide drives except hdc:
6286d7f5d3SJohn Marino    # filter =[ "a|loop|", "r|/dev/hdc|", "a|/dev/ide|", "r|.*|" ]
6386d7f5d3SJohn Marino
6486d7f5d3SJohn Marino    # Use anchors if you want to be really specific
6586d7f5d3SJohn Marino    # filter = [ "a|^/dev/hda8$|", "r/.*/" ]
6686d7f5d3SJohn Marino
6786d7f5d3SJohn Marino    # The results of the filtering are cached on disk to avoid
6886d7f5d3SJohn Marino    # rescanning dud devices (which can take a very long time).
6986d7f5d3SJohn Marino    # By default this cache is stored in the /etc/lvm/cache directory
7086d7f5d3SJohn Marino    # in a file called '.cache'.
7186d7f5d3SJohn Marino    # It is safe to delete the contents: the tools regenerate it.
7286d7f5d3SJohn Marino    # (The old setting 'cache' is still respected if neither of
7386d7f5d3SJohn Marino    # these new ones is present.)
7486d7f5d3SJohn Marino    cache_dir = "/etc/lvm/cache"
7586d7f5d3SJohn Marino    cache_file_prefix = ""
7686d7f5d3SJohn Marino
7786d7f5d3SJohn Marino    # You can turn off writing this cache file by setting this to 0.
7886d7f5d3SJohn Marino    write_cache_state = 1
7986d7f5d3SJohn Marino
8086d7f5d3SJohn Marino    # Advanced settings.
8186d7f5d3SJohn Marino
8286d7f5d3SJohn Marino    # List of pairs of additional acceptable block device types found
8386d7f5d3SJohn Marino    # in /proc/devices with maximum (non-zero) number of partitions.
8486d7f5d3SJohn Marino    # types = [ "fd", 16 ]
8586d7f5d3SJohn Marino
8686d7f5d3SJohn Marino    # If sysfs is mounted (2.6 kernels) restrict device scanning to
8786d7f5d3SJohn Marino    # the block devices it believes are valid.
8886d7f5d3SJohn Marino    # 1 enables; 0 disables.
8986d7f5d3SJohn Marino    sysfs_scan = 1
9086d7f5d3SJohn Marino
9186d7f5d3SJohn Marino    # By default, LVM2 will ignore devices used as components of
9286d7f5d3SJohn Marino    # software RAID (md) devices by looking for md superblocks.
9386d7f5d3SJohn Marino    # 1 enables; 0 disables.
9486d7f5d3SJohn Marino    md_component_detection = 1
9586d7f5d3SJohn Marino
9686d7f5d3SJohn Marino    # By default, if a PV is placed directly upon an md device, LVM2
9786d7f5d3SJohn Marino    # will align its data blocks with the md device's stripe-width.
9886d7f5d3SJohn Marino    # 1 enables; 0 disables.
9986d7f5d3SJohn Marino    md_chunk_alignment = 1
10086d7f5d3SJohn Marino
10186d7f5d3SJohn Marino    # By default, the start of a PV's data area will be a multiple of
10286d7f5d3SJohn Marino    # the 'minimum_io_size' or 'optimal_io_size' exposed in sysfs.
10386d7f5d3SJohn Marino    # - minimum_io_size - the smallest request the device can perform
10486d7f5d3SJohn Marino    #   w/o incurring a read-modify-write penalty (e.g. MD's chunk size)
10586d7f5d3SJohn Marino    # - optimal_io_size - the device's preferred unit of receiving I/O
10686d7f5d3SJohn Marino    #   (e.g. MD's stripe width)
10786d7f5d3SJohn Marino    # minimum_io_size is used if optimal_io_size is undefined (0).
10886d7f5d3SJohn Marino    # If md_chunk_alignment is enabled, that detects the optimal_io_size.
10986d7f5d3SJohn Marino    # This setting takes precedence over md_chunk_alignment.
11086d7f5d3SJohn Marino    # 1 enables; 0 disables.
11186d7f5d3SJohn Marino    data_alignment_detection = 1
11286d7f5d3SJohn Marino
11386d7f5d3SJohn Marino    # Alignment (in KB) of start of data area when creating a new PV.
11486d7f5d3SJohn Marino    # If a PV is placed directly upon an md device and md_chunk_alignment or
11586d7f5d3SJohn Marino    # data_alignment_detection is enabled this parameter is ignored.
11686d7f5d3SJohn Marino    # Set to 0 for the default alignment of 64KB or page size, if larger.
11786d7f5d3SJohn Marino    data_alignment = 0
11886d7f5d3SJohn Marino
11986d7f5d3SJohn Marino    # By default, the start of the PV's aligned data area will be shifted by
12086d7f5d3SJohn Marino    # the 'alignment_offset' exposed in sysfs.  This offset is often 0 but
12186d7f5d3SJohn Marino    # may be non-zero; e.g.: certain 4KB sector drives that compensate for
12286d7f5d3SJohn Marino    # windows partitioning will have an alignment_offset of 3584 bytes
12386d7f5d3SJohn Marino    # (sector 7 is the lowest aligned logical block, the 4KB sectors start
12486d7f5d3SJohn Marino    # at LBA -1, and consequently sector 63 is aligned on a 4KB boundary).
12586d7f5d3SJohn Marino    # 1 enables; 0 disables.
12686d7f5d3SJohn Marino    data_alignment_offset_detection = 1
12786d7f5d3SJohn Marino
12886d7f5d3SJohn Marino    # If, while scanning the system for PVs, LVM2 encounters a device-mapper
12986d7f5d3SJohn Marino    # device that has its I/O suspended, it waits for it to become accessible.
13086d7f5d3SJohn Marino    # Set this to 1 to skip such devices.  This should only be needed
13186d7f5d3SJohn Marino    # in recovery situations.
13286d7f5d3SJohn Marino    ignore_suspended_devices = 0
13386d7f5d3SJohn Marino}
13486d7f5d3SJohn Marino
13586d7f5d3SJohn Marino# This section that allows you to configure the nature of the
13686d7f5d3SJohn Marino# information that LVM2 reports.
13786d7f5d3SJohn Marinolog {
13886d7f5d3SJohn Marino
13986d7f5d3SJohn Marino    # Controls the messages sent to stdout or stderr.
14086d7f5d3SJohn Marino    # There are three levels of verbosity, 3 being the most verbose.
14186d7f5d3SJohn Marino    verbose = 0
14286d7f5d3SJohn Marino
14386d7f5d3SJohn Marino    # Should we send log messages through syslog?
14486d7f5d3SJohn Marino    # 1 is yes; 0 is no.
14586d7f5d3SJohn Marino    syslog = 1
14686d7f5d3SJohn Marino
14786d7f5d3SJohn Marino    # Should we log error and debug messages to a file?
14886d7f5d3SJohn Marino    # By default there is no log file.
14986d7f5d3SJohn Marino    #file = "/var/log/lvm2.log"
15086d7f5d3SJohn Marino
15186d7f5d3SJohn Marino    # Should we overwrite the log file each time the program is run?
15286d7f5d3SJohn Marino    # By default we append.
15386d7f5d3SJohn Marino    overwrite = 0
15486d7f5d3SJohn Marino
15586d7f5d3SJohn Marino    # What level of log messages should we send to the log file and/or syslog?
15686d7f5d3SJohn Marino    # There are 6 syslog-like log levels currently in use - 2 to 7 inclusive.
15786d7f5d3SJohn Marino    # 7 is the most verbose (LOG_DEBUG).
15886d7f5d3SJohn Marino    level = 0
15986d7f5d3SJohn Marino
16086d7f5d3SJohn Marino    # Format of output messages
16186d7f5d3SJohn Marino    # Whether or not (1 or 0) to indent messages according to their severity
16286d7f5d3SJohn Marino    indent = 1
16386d7f5d3SJohn Marino
16486d7f5d3SJohn Marino    # Whether or not (1 or 0) to display the command name on each line output
16586d7f5d3SJohn Marino    command_names = 0
16686d7f5d3SJohn Marino
16786d7f5d3SJohn Marino    # A prefix to use before the message text (but after the command name,
16886d7f5d3SJohn Marino    # if selected).  Default is two spaces, so you can see/grep the severity
16986d7f5d3SJohn Marino    # of each message.
17086d7f5d3SJohn Marino    prefix = "  "
17186d7f5d3SJohn Marino
17286d7f5d3SJohn Marino    # To make the messages look similar to the original LVM tools use:
17386d7f5d3SJohn Marino    #   indent = 0
17486d7f5d3SJohn Marino    #   command_names = 1
17586d7f5d3SJohn Marino    #   prefix = " -- "
17686d7f5d3SJohn Marino
17786d7f5d3SJohn Marino    # Set this if you want log messages during activation.
17886d7f5d3SJohn Marino    # Don't use this in low memory situations (can deadlock).
17986d7f5d3SJohn Marino    # activation = 0
18086d7f5d3SJohn Marino}
18186d7f5d3SJohn Marino
18286d7f5d3SJohn Marino# Configuration of metadata backups and archiving.  In LVM2 when we
18386d7f5d3SJohn Marino# talk about a 'backup' we mean making a copy of the metadata for the
18486d7f5d3SJohn Marino# *current* system.  The 'archive' contains old metadata configurations.
18586d7f5d3SJohn Marino# Backups are stored in a human readeable text format.
18686d7f5d3SJohn Marinobackup {
18786d7f5d3SJohn Marino
18886d7f5d3SJohn Marino    # Should we maintain a backup of the current metadata configuration ?
18986d7f5d3SJohn Marino    # Use 1 for Yes; 0 for No.
19086d7f5d3SJohn Marino    # Think very hard before turning this off!
19186d7f5d3SJohn Marino    backup = 1
19286d7f5d3SJohn Marino
19386d7f5d3SJohn Marino    # Where shall we keep it ?
19486d7f5d3SJohn Marino    # Remember to back up this directory regularly!
19586d7f5d3SJohn Marino    backup_dir = "/etc/lvm/backup"
19686d7f5d3SJohn Marino
19786d7f5d3SJohn Marino    # Should we maintain an archive of old metadata configurations.
19886d7f5d3SJohn Marino    # Use 1 for Yes; 0 for No.
19986d7f5d3SJohn Marino    # On by default.  Think very hard before turning this off.
20086d7f5d3SJohn Marino    archive = 1
20186d7f5d3SJohn Marino
20286d7f5d3SJohn Marino    # Where should archived files go ?
20386d7f5d3SJohn Marino    # Remember to back up this directory regularly!
20486d7f5d3SJohn Marino    archive_dir = "/etc/lvm/archive"
20586d7f5d3SJohn Marino
20686d7f5d3SJohn Marino    # What is the minimum number of archive files you wish to keep ?
20786d7f5d3SJohn Marino    retain_min = 10
20886d7f5d3SJohn Marino
20986d7f5d3SJohn Marino    # What is the minimum time you wish to keep an archive file for ?
21086d7f5d3SJohn Marino    retain_days = 30
21186d7f5d3SJohn Marino}
21286d7f5d3SJohn Marino
21386d7f5d3SJohn Marino# Settings for the running LVM2 in shell (readline) mode.
21486d7f5d3SJohn Marinoshell {
21586d7f5d3SJohn Marino
21686d7f5d3SJohn Marino    # Number of lines of history to store in ~/.lvm_history
21786d7f5d3SJohn Marino    history_size = 100
21886d7f5d3SJohn Marino}
21986d7f5d3SJohn Marino
22086d7f5d3SJohn Marino
22186d7f5d3SJohn Marino# Miscellaneous global LVM2 settings
22286d7f5d3SJohn Marinoglobal {
22386d7f5d3SJohn Marino
22486d7f5d3SJohn Marino    # The file creation mask for any files and directories created.
22586d7f5d3SJohn Marino    # Interpreted as octal if the first digit is zero.
22686d7f5d3SJohn Marino    umask = 077
22786d7f5d3SJohn Marino
22886d7f5d3SJohn Marino    # Allow other users to read the files
22986d7f5d3SJohn Marino    #umask = 022
23086d7f5d3SJohn Marino
23186d7f5d3SJohn Marino    # Enabling test mode means that no changes to the on disk metadata
23286d7f5d3SJohn Marino    # will be made.  Equivalent to having the -t option on every
23386d7f5d3SJohn Marino    # command.  Defaults to off.
23486d7f5d3SJohn Marino    test = 0
23586d7f5d3SJohn Marino
23686d7f5d3SJohn Marino    # Default value for --units argument
23786d7f5d3SJohn Marino    units = "h"
23886d7f5d3SJohn Marino
23986d7f5d3SJohn Marino    # Since version 2.02.54, the tools distinguish between powers of
24086d7f5d3SJohn Marino    # 1024 bytes (e.g. KiB, MiB, GiB) and powers of 1000 bytes (e.g.
24186d7f5d3SJohn Marino    # KB, MB, GB).
24286d7f5d3SJohn Marino    # If you have scripts that depend on the old behaviour, set this to 0
24386d7f5d3SJohn Marino    # temporarily until you update them.
24486d7f5d3SJohn Marino    si_unit_consistency = 1
24586d7f5d3SJohn Marino
24686d7f5d3SJohn Marino    # Whether or not to communicate with the kernel device-mapper.
24786d7f5d3SJohn Marino    # Set to 0 if you want to use the tools to manipulate LVM metadata
24886d7f5d3SJohn Marino    # without activating any logical volumes.
24986d7f5d3SJohn Marino    # If the device-mapper kernel driver is not present in your kernel
25086d7f5d3SJohn Marino    # setting this to 0 should suppress the error messages.
25186d7f5d3SJohn Marino    activation = 1
25286d7f5d3SJohn Marino
25386d7f5d3SJohn Marino    # If we can't communicate with device-mapper, should we try running
25486d7f5d3SJohn Marino    # the LVM1 tools?
25586d7f5d3SJohn Marino    # This option only applies to 2.4 kernels and is provided to help you
25686d7f5d3SJohn Marino    # switch between device-mapper kernels and LVM1 kernels.
25786d7f5d3SJohn Marino    # The LVM1 tools need to be installed with .lvm1 suffices
25886d7f5d3SJohn Marino    # e.g. vgscan.lvm1 and they will stop working after you start using
25986d7f5d3SJohn Marino    # the new lvm2 on-disk metadata format.
26086d7f5d3SJohn Marino    # The default value is set when the tools are built.
26186d7f5d3SJohn Marino    # fallback_to_lvm1 = 0
26286d7f5d3SJohn Marino
26386d7f5d3SJohn Marino    # The default metadata format that commands should use - "lvm1" or "lvm2".
26486d7f5d3SJohn Marino    # The command line override is -M1 or -M2.
26586d7f5d3SJohn Marino    # Defaults to "lvm2".
26686d7f5d3SJohn Marino    # format = "lvm2"
26786d7f5d3SJohn Marino
26886d7f5d3SJohn Marino    # Location of proc filesystem
26986d7f5d3SJohn Marino    proc = "/proc"
27086d7f5d3SJohn Marino
27186d7f5d3SJohn Marino    # Type of locking to use. Defaults to local file-based locking (1).
27286d7f5d3SJohn Marino    # Turn locking off by setting to 0 (dangerous: risks metadata corruption
27386d7f5d3SJohn Marino    # if LVM2 commands get run concurrently).
27486d7f5d3SJohn Marino    # Type 2 uses the external shared library locking_library.
27586d7f5d3SJohn Marino    # Type 3 uses built-in clustered locking.
27686d7f5d3SJohn Marino    # Type 4 uses read-only locking which forbids any operations that might
27786d7f5d3SJohn Marino    # change metadata.
27886d7f5d3SJohn Marino    locking_type = 1
27986d7f5d3SJohn Marino
28086d7f5d3SJohn Marino    # Set to 0 to fail when a lock request cannot be satisfied immediately.
28186d7f5d3SJohn Marino    wait_for_locks = 1
28286d7f5d3SJohn Marino
28386d7f5d3SJohn Marino    # If using external locking (type 2) and initialisation fails,
28486d7f5d3SJohn Marino    # with this set to 1 an attempt will be made to use the built-in
28586d7f5d3SJohn Marino    # clustered locking.
28686d7f5d3SJohn Marino    # If you are using a customised locking_library you should set this to 0.
28786d7f5d3SJohn Marino    fallback_to_clustered_locking = 1
28886d7f5d3SJohn Marino
28986d7f5d3SJohn Marino    # If an attempt to initialise type 2 or type 3 locking failed, perhaps
29086d7f5d3SJohn Marino    # because cluster components such as clvmd are not running, with this set
29186d7f5d3SJohn Marino    # to 1 an attempt will be made to use local file-based locking (type 1).
29286d7f5d3SJohn Marino    # If this succeeds, only commands against local volume groups will proceed.
29386d7f5d3SJohn Marino    # Volume Groups marked as clustered will be ignored.
29486d7f5d3SJohn Marino    fallback_to_local_locking = 1
29586d7f5d3SJohn Marino
29686d7f5d3SJohn Marino    # Local non-LV directory that holds file-based locks while commands are
29786d7f5d3SJohn Marino    # in progress.  A directory like /tmp that may get wiped on reboot is OK.
29886d7f5d3SJohn Marino    locking_dir = "/var/lock/lvm"
29986d7f5d3SJohn Marino
30086d7f5d3SJohn Marino    # Whenever there are competing read-only and read-write access requests for
30186d7f5d3SJohn Marino    # a volume group's metadata, instead of always granting the read-only
30286d7f5d3SJohn Marino    # requests immediately, delay them to allow the read-write requests to be
30386d7f5d3SJohn Marino    # serviced.  Without this setting, write access may be stalled by a high
30486d7f5d3SJohn Marino    # volume of read-only requests.
30586d7f5d3SJohn Marino    # NB. This option only affects locking_type = 1 viz. local file-based
30686d7f5d3SJohn Marino    # locking.
30786d7f5d3SJohn Marino    prioritise_write_locks = 1
30886d7f5d3SJohn Marino
30986d7f5d3SJohn Marino    # Other entries can go here to allow you to load shared libraries
31086d7f5d3SJohn Marino    # e.g. if support for LVM1 metadata was compiled as a shared library use
31186d7f5d3SJohn Marino    #   format_libraries = "liblvm2format1.so"
31286d7f5d3SJohn Marino    # Full pathnames can be given.
31386d7f5d3SJohn Marino
31486d7f5d3SJohn Marino    # Search this directory first for shared libraries.
31586d7f5d3SJohn Marino    #   library_dir = "/lib"
31686d7f5d3SJohn Marino
31786d7f5d3SJohn Marino    # The external locking library to load if locking_type is set to 2.
31886d7f5d3SJohn Marino    #   locking_library = "liblvm2clusterlock.so"
31986d7f5d3SJohn Marino}
32086d7f5d3SJohn Marino
32186d7f5d3SJohn Marinoactivation {
32286d7f5d3SJohn Marino    # Set to 0 to disable udev syncronisation (if compiled into the binaries).
32386d7f5d3SJohn Marino    # Processes will not wait for notification from udev.
32486d7f5d3SJohn Marino    # They will continue irrespective of any possible udev processing
32586d7f5d3SJohn Marino    # in the background.  You should only use this if udev is not running
32686d7f5d3SJohn Marino    # or has rules that ignore the devices LVM2 creates.
32786d7f5d3SJohn Marino    # The command line argument --nodevsync takes precedence over this setting.
32886d7f5d3SJohn Marino    # If set to 1 when udev is not running, and there are LVM2 processes
32986d7f5d3SJohn Marino    # waiting for udev, run 'dmsetup udevcomplete_all' manually to wake them up.
33086d7f5d3SJohn Marino    udev_sync = 1
33186d7f5d3SJohn Marino
33286d7f5d3SJohn Marino    # How to fill in missing stripes if activating an incomplete volume.
33386d7f5d3SJohn Marino    # Using "error" will make inaccessible parts of the device return
33486d7f5d3SJohn Marino    # I/O errors on access.  You can instead use a device path, in which
33586d7f5d3SJohn Marino    # case, that device will be used to in place of missing stripes.
33686d7f5d3SJohn Marino    # But note that using anything other than "error" with mirrored
33786d7f5d3SJohn Marino    # or snapshotted volumes is likely to result in data corruption.
33886d7f5d3SJohn Marino    missing_stripe_filler = "error"
33986d7f5d3SJohn Marino
34086d7f5d3SJohn Marino    # How much stack (in KB) to reserve for use while devices suspended
34186d7f5d3SJohn Marino    reserved_stack = 256
34286d7f5d3SJohn Marino
34386d7f5d3SJohn Marino    # How much memory (in KB) to reserve for use while devices suspended
34486d7f5d3SJohn Marino    reserved_memory = 8192
34586d7f5d3SJohn Marino
34686d7f5d3SJohn Marino    # Nice value used while devices suspended
34786d7f5d3SJohn Marino    process_priority = -18
34886d7f5d3SJohn Marino
34986d7f5d3SJohn Marino    # If volume_list is defined, each LV is only activated if there is a
35086d7f5d3SJohn Marino    # match against the list.
35186d7f5d3SJohn Marino    #   "vgname" and "vgname/lvname" are matched exactly.
35286d7f5d3SJohn Marino    #   "@tag" matches any tag set in the LV or VG.
35386d7f5d3SJohn Marino    #   "@*" matches if any tag defined on the host is also set in the LV or VG
35486d7f5d3SJohn Marino    #
35586d7f5d3SJohn Marino    # volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
35686d7f5d3SJohn Marino
35786d7f5d3SJohn Marino    # Size (in KB) of each copy operation when mirroring
35886d7f5d3SJohn Marino    mirror_region_size = 512
35986d7f5d3SJohn Marino
36086d7f5d3SJohn Marino    # Setting to use when there is no readahead value stored in the metadata.
36186d7f5d3SJohn Marino    #
36286d7f5d3SJohn Marino    # "none" - Disable readahead.
36386d7f5d3SJohn Marino    # "auto" - Use default value chosen by kernel.
36486d7f5d3SJohn Marino    readahead = "auto"
36586d7f5d3SJohn Marino
36686d7f5d3SJohn Marino    # 'mirror_image_fault_policy' and 'mirror_log_fault_policy' define
36786d7f5d3SJohn Marino    # how a device failure affecting a mirror is handled.
36886d7f5d3SJohn Marino    # A mirror is composed of mirror images (copies) and a log.
36986d7f5d3SJohn Marino    # A disk log ensures that a mirror does not need to be re-synced
37086d7f5d3SJohn Marino    # (all copies made the same) every time a machine reboots or crashes.
37186d7f5d3SJohn Marino    #
37286d7f5d3SJohn Marino    # In the event of a failure, the specified policy will be used to determine
37386d7f5d3SJohn Marino    # what happens. This applies to automatic repairs (when the mirror is being
37486d7f5d3SJohn Marino    # monitored by dmeventd) and to manual lvconvert --repair when
37586d7f5d3SJohn Marino    # --use-policies is given.
37686d7f5d3SJohn Marino    #
37786d7f5d3SJohn Marino    # "remove" - Simply remove the faulty device and run without it.  If
37886d7f5d3SJohn Marino    #            the log device fails, the mirror would convert to using
37986d7f5d3SJohn Marino    #            an in-memory log.  This means the mirror will not
38086d7f5d3SJohn Marino    #            remember its sync status across crashes/reboots and
38186d7f5d3SJohn Marino    #            the entire mirror will be re-synced.  If a
38286d7f5d3SJohn Marino    #            mirror image fails, the mirror will convert to a
38386d7f5d3SJohn Marino    #            non-mirrored device if there is only one remaining good
38486d7f5d3SJohn Marino    #            copy.
38586d7f5d3SJohn Marino    #
38686d7f5d3SJohn Marino    # "allocate" - Remove the faulty device and try to allocate space on
38786d7f5d3SJohn Marino    #            a new device to be a replacement for the failed device.
38886d7f5d3SJohn Marino    #            Using this policy for the log is fast and maintains the
38986d7f5d3SJohn Marino    #            ability to remember sync state through crashes/reboots.
39086d7f5d3SJohn Marino    #            Using this policy for a mirror device is slow, as it
39186d7f5d3SJohn Marino    #            requires the mirror to resynchronize the devices, but it
39286d7f5d3SJohn Marino    #            will preserve the mirror characteristic of the device.
39386d7f5d3SJohn Marino    #            This policy acts like "remove" if no suitable device and
39486d7f5d3SJohn Marino    #            space can be allocated for the replacement.
39586d7f5d3SJohn Marino    #
39686d7f5d3SJohn Marino    # "allocate_anywhere" - Not yet implemented. Useful to place the log device
39786d7f5d3SJohn Marino    #            temporarily on same physical volume as one of the mirror
39886d7f5d3SJohn Marino    #            images. This policy is not recommended for mirror devices
39986d7f5d3SJohn Marino    #            since it would break the redundant nature of the mirror. This
40086d7f5d3SJohn Marino    #            policy acts like "remove" if no suitable device and space can
40186d7f5d3SJohn Marino    #            be allocated for the replacement.
40286d7f5d3SJohn Marino
40386d7f5d3SJohn Marino    mirror_log_fault_policy = "allocate"
40486d7f5d3SJohn Marino    mirror_device_fault_policy = "remove"
40586d7f5d3SJohn Marino}
40686d7f5d3SJohn Marino
40786d7f5d3SJohn Marino
40886d7f5d3SJohn Marino####################
40986d7f5d3SJohn Marino# Advanced section #
41086d7f5d3SJohn Marino####################
41186d7f5d3SJohn Marino
41286d7f5d3SJohn Marino# Metadata settings
41386d7f5d3SJohn Marino#
41486d7f5d3SJohn Marino# metadata {
41586d7f5d3SJohn Marino    # Default number of copies of metadata to hold on each PV.  0, 1 or 2.
41686d7f5d3SJohn Marino    # You might want to override it from the command line with 0
41786d7f5d3SJohn Marino    # when running pvcreate on new PVs which are to be added to large VGs.
41886d7f5d3SJohn Marino
41986d7f5d3SJohn Marino    # pvmetadatacopies = 1
42086d7f5d3SJohn Marino
42186d7f5d3SJohn Marino    # Approximate default size of on-disk metadata areas in sectors.
42286d7f5d3SJohn Marino    # You should increase this if you have large volume groups or
42386d7f5d3SJohn Marino    # you want to retain a large on-disk history of your metadata changes.
42486d7f5d3SJohn Marino
42586d7f5d3SJohn Marino    # pvmetadatasize = 255
42686d7f5d3SJohn Marino
42786d7f5d3SJohn Marino    # List of directories holding live copies of text format metadata.
42886d7f5d3SJohn Marino    # These directories must not be on logical volumes!
42986d7f5d3SJohn Marino    # It's possible to use LVM2 with a couple of directories here,
43086d7f5d3SJohn Marino    # preferably on different (non-LV) filesystems, and with no other
43186d7f5d3SJohn Marino    # on-disk metadata (pvmetadatacopies = 0). Or this can be in
43286d7f5d3SJohn Marino    # addition to on-disk metadata areas.
43386d7f5d3SJohn Marino    # The feature was originally added to simplify testing and is not
43486d7f5d3SJohn Marino    # supported under low memory situations - the machine could lock up.
43586d7f5d3SJohn Marino    #
43686d7f5d3SJohn Marino    # Never edit any files in these directories by hand unless you
43786d7f5d3SJohn Marino    # you are absolutely sure you know what you are doing! Use
43886d7f5d3SJohn Marino    # the supplied toolset to make changes (e.g. vgcfgrestore).
43986d7f5d3SJohn Marino
44086d7f5d3SJohn Marino    # dirs = [ "/etc/lvm/metadata", "/mnt/disk2/lvm/metadata2" ]
44186d7f5d3SJohn Marino#}
44286d7f5d3SJohn Marino
44386d7f5d3SJohn Marino# Event daemon
44486d7f5d3SJohn Marino#
44586d7f5d3SJohn Marinodmeventd {
44686d7f5d3SJohn Marino    # mirror_library is the library used when monitoring a mirror device.
44786d7f5d3SJohn Marino    #
44886d7f5d3SJohn Marino    # "libdevmapper-event-lvm2mirror.so" attempts to recover from
44986d7f5d3SJohn Marino    # failures.  It removes failed devices from a volume group and
45086d7f5d3SJohn Marino    # reconfigures a mirror as necessary. If no mirror library is
45186d7f5d3SJohn Marino    # provided, mirrors are not monitored through dmeventd.
45286d7f5d3SJohn Marino
45386d7f5d3SJohn Marino    mirror_library = "libdevmapper-event-lvm2mirror.so"
45486d7f5d3SJohn Marino
45586d7f5d3SJohn Marino    # snapshot_library is the library used when monitoring a snapshot device.
45686d7f5d3SJohn Marino    #
45786d7f5d3SJohn Marino    # "libdevmapper-event-lvm2snapshot.so" monitors the filling of
45886d7f5d3SJohn Marino    # snapshots and emits a warning through syslog, when the use of
45986d7f5d3SJohn Marino    # snapshot exceedes 80%. The warning is repeated when 85%, 90% and
46086d7f5d3SJohn Marino    # 95% of the snapshot are filled.
46186d7f5d3SJohn Marino
46286d7f5d3SJohn Marino    snapshot_library = "libdevmapper-event-lvm2snapshot.so"
46386d7f5d3SJohn Marino}
464