1
# This is an example configuration file for the LVM2 system.
2
# It contains the default settings that would be used if there was no
3
# @DEFAULT_SYS_DIR@/lvm.conf file.
5
# Refer to 'man lvm.conf' for further information including the file layout.
7
# To put this file in a different directory and override @DEFAULT_SYS_DIR@ set
8
# the environment variable LVM_SYSTEM_DIR before running the tools.
10
# N.B. Take care that each setting only appears once if uncommenting
11
# example settings in this file.
14
# This section allows you to configure which block devices should
15
# be used by the LVM system.
18
# Where do you want your volume groups to appear ?
21
# An array of directories that contain the device nodes you wish
25
# If set, the cache of block device nodes with all associated symlinks
26
# will be constructed out of the existing udev database content.
27
# This avoids using and opening any inapplicable non-block devices or
28
# subdirectories found in the device directory. This setting is applied
29
# to udev-managed device directory only, other directories will be scanned
30
# fully. LVM2 needs to be compiled with udev support for this setting to
31
# take effect. N.B. Any device node or symlink not managed by udev in
32
# udev directory will be ignored with this setting on.
33
obtain_device_list_from_udev = 1
35
# If several entries in the scanned directories correspond to the
36
# same block device and the tools need to display a name for device,
37
# all the pathnames are matched against each item in the following
38
# list of regular expressions in turn and the first match is used.
41
# Try to avoid using undescriptive /dev/dm-N names, if present.
42
# preferred_names = [ "^/dev/mpath/", "^/dev/mapper/mpath", "^/dev/[hs]d" ]
44
# A filter that tells LVM2 to only use a restricted set of devices.
45
# The filter consists of an array of regular expressions. These
46
# expressions can be delimited by a character of your choice, and
47
# prefixed with either an 'a' (for accept) or 'r' (for reject).
48
# The first expression found to match a device name determines if
49
# the device will be accepted or rejected (ignored). Devices that
50
# don't match any patterns are accepted.
52
# Be careful if there there are symbolic links or multiple filesystem
53
# entries for the same device as each name is checked separately against
54
# the list of patterns. The effect is that if any name matches any 'a'
55
# pattern, the device is accepted; otherwise if any name matches any 'r'
56
# pattern it is rejected; otherwise it is accepted.
58
# Don't have more than one filter line active at once: only one gets used.
60
# Run vgscan after you change this parameter to ensure that
61
# the cache file gets regenerated (see below).
62
# If it doesn't do what you expect, check the output of 'vgscan -vvvv'.
65
# By default we accept every block device:
68
# Exclude the cdrom drive
69
# filter = [ "r|/dev/cdrom|" ]
71
# When testing I like to work with just loopback devices:
72
# filter = [ "a/loop/", "r/.*/" ]
74
# Or maybe all loops and ide drives except hdc:
75
# filter =[ "a|loop|", "r|/dev/hdc|", "a|/dev/ide|", "r|.*|" ]
77
# Use anchors if you want to be really specific
78
# filter = [ "a|^/dev/hda8$|", "r/.*/" ]
80
# The results of the filtering are cached on disk to avoid
81
# rescanning dud devices (which can take a very long time).
82
# By default this cache is stored in the @DEFAULT_SYS_DIR@/@DEFAULT_CACHE_SUBDIR@ directory
83
# in a file called '.cache'.
84
# It is safe to delete the contents: the tools regenerate it.
85
# (The old setting 'cache' is still respected if neither of
86
# these new ones is present.)
87
cache_dir = "@DEFAULT_SYS_DIR@/@DEFAULT_CACHE_SUBDIR@"
88
cache_file_prefix = ""
90
# You can turn off writing this cache file by setting this to 0.
95
# List of pairs of additional acceptable block device types found
96
# in /proc/devices with maximum (non-zero) number of partitions.
97
# types = [ "fd", 16 ]
99
# If sysfs is mounted (2.6 kernels) restrict device scanning to
100
# the block devices it believes are valid.
101
# 1 enables; 0 disables.
104
# By default, LVM2 will ignore devices used as components of
105
# software RAID (md) devices by looking for md superblocks.
106
# 1 enables; 0 disables.
107
md_component_detection = 1
109
# By default, if a PV is placed directly upon an md device, LVM2
110
# will align its data blocks with the md device's stripe-width.
111
# 1 enables; 0 disables.
112
md_chunk_alignment = 1
114
# Default alignment of the start of a data area in MB. If set to 0,
115
# a value of 64KB will be used. Set to 1 for 1MiB, 2 for 2MiB, etc.
116
# default_data_alignment = @DEFAULT_DATA_ALIGNMENT@
118
# By default, the start of a PV's data area will be a multiple of
119
# the 'minimum_io_size' or 'optimal_io_size' exposed in sysfs.
120
# - minimum_io_size - the smallest request the device can perform
121
# w/o incurring a read-modify-write penalty (e.g. MD's chunk size)
122
# - optimal_io_size - the device's preferred unit of receiving I/O
123
# (e.g. MD's stripe width)
124
# minimum_io_size is used if optimal_io_size is undefined (0).
125
# If md_chunk_alignment is enabled, that detects the optimal_io_size.
126
# This setting takes precedence over md_chunk_alignment.
127
# 1 enables; 0 disables.
128
data_alignment_detection = 1
130
# Alignment (in KB) of start of data area when creating a new PV.
131
# md_chunk_alignment and data_alignment_detection are disabled if set.
132
# Set to 0 for the default alignment (see: data_alignment_default)
133
# or page size, if larger.
136
# By default, the start of the PV's aligned data area will be shifted by
137
# the 'alignment_offset' exposed in sysfs. This offset is often 0 but
138
# may be non-zero; e.g.: certain 4KB sector drives that compensate for
139
# windows partitioning will have an alignment_offset of 3584 bytes
140
# (sector 7 is the lowest aligned logical block, the 4KB sectors start
141
# at LBA -1, and consequently sector 63 is aligned on a 4KB boundary).
142
# But note that pvcreate --dataalignmentoffset will skip this detection.
143
# 1 enables; 0 disables.
144
data_alignment_offset_detection = 1
146
# If, while scanning the system for PVs, LVM2 encounters a device-mapper
147
# device that has its I/O suspended, it waits for it to become accessible.
148
# Set this to 1 to skip such devices. This should only be needed
149
# in recovery situations.
150
ignore_suspended_devices = 0
152
# During each LVM operation errors received from each device are counted.
153
# If the counter of a particular device exceeds the limit set here, no
154
# further I/O is sent to that device for the remainder of the respective
155
# operation. Setting the parameter to 0 disables the counters altogether.
156
disable_after_error_count = 0
158
# Allow use of pvcreate --uuid without requiring --restorefile.
159
require_restorefile_with_uuid = 1
161
# Minimum size (in KB) of block devices which can be used as PVs.
162
# In a clustered environment all nodes must use the same value.
163
# Any value smaller than 512KB is ignored.
165
# Ignore devices smaller than 2MB such as floppy drives.
168
# The original built-in setting was 512 up to and including version 2.02.84.
171
# Issue discards to a logical volumes's underlying physical volume(s) when
172
# the logical volume is no longer using the physical volumes' space (e.g.
173
# lvremove, lvreduce, etc). Discards inform the storage that a region is
174
# no longer in use. Storage that supports discards advertise the protocol
175
# specific way discards should be issued by the kernel (TRIM, UNMAP, or
176
# WRITE SAME with UNMAP bit set). Not all storage will support or benefit
177
# from discards but SSDs and thinly provisioned LUNs generally do. If set
178
# to 1, discards will only be issued if both the storage and kernel provide
180
# 1 enables; 0 disables.
184
# This section allows you to configure the way in which LVM selects
185
# free space for its Logical Volumes.
187
# When searching for free space to extend an LV, the "cling"
188
# allocation policy will choose space on the same PVs as the last
189
# segment of the existing LV. If there is insufficient space and a
190
# list of tags is defined here, it will check whether any of them are
191
# attached to the PVs concerned and then seek to match those PV tags
192
# between existing extents and new extents.
193
# Use the special tag "@*" as a wildcard to match any PV tag.
195
# Example: LVs are mirrored between two sites within a single VG.
196
# PVs are tagged with either @site1 or @site2 to indicate where
199
# cling_tag_list = [ "@site1", "@site2" ]
200
# cling_tag_list = [ "@*" ]
202
# Changes made in version 2.02.85 extended the reach of the 'cling'
203
# policies to detect more situations where data can be grouped
204
# onto the same disks. Set this to 0 to revert to the previous
209
# Set to 1 to guarantee that mirror logs will always be placed on
210
# different PVs from the mirror images. This was the default
211
# until version 2.02.85.
213
# mirror_logs_require_separate_pvs = 0
216
# This section that allows you to configure the nature of the
217
# information that LVM2 reports.
220
# Controls the messages sent to stdout or stderr.
221
# There are three levels of verbosity, 3 being the most verbose.
224
# Should we send log messages through syslog?
228
# Should we log error and debug messages to a file?
229
# By default there is no log file.
230
#file = "/var/log/lvm2.log"
232
# Should we overwrite the log file each time the program is run?
233
# By default we append.
236
# What level of log messages should we send to the log file and/or syslog?
237
# There are 6 syslog-like log levels currently in use - 2 to 7 inclusive.
238
# 7 is the most verbose (LOG_DEBUG).
241
# Format of output messages
242
# Whether or not (1 or 0) to indent messages according to their severity
245
# Whether or not (1 or 0) to display the command name on each line output
248
# A prefix to use before the message text (but after the command name,
249
# if selected). Default is two spaces, so you can see/grep the severity
253
# To make the messages look similar to the original LVM tools use:
258
# Set this if you want log messages during activation.
259
# Don't use this in low memory situations (can deadlock).
263
# Configuration of metadata backups and archiving. In LVM2 when we
264
# talk about a 'backup' we mean making a copy of the metadata for the
265
# *current* system. The 'archive' contains old metadata configurations.
266
# Backups are stored in a human readeable text format.
269
# Should we maintain a backup of the current metadata configuration ?
270
# Use 1 for Yes; 0 for No.
271
# Think very hard before turning this off!
274
# Where shall we keep it ?
275
# Remember to back up this directory regularly!
276
backup_dir = "@DEFAULT_SYS_DIR@/@DEFAULT_BACKUP_SUBDIR@"
278
# Should we maintain an archive of old metadata configurations.
279
# Use 1 for Yes; 0 for No.
280
# On by default. Think very hard before turning this off.
283
# Where should archived files go ?
284
# Remember to back up this directory regularly!
285
archive_dir = "@DEFAULT_SYS_DIR@/@DEFAULT_ARCHIVE_SUBDIR@"
287
# What is the minimum number of archive files you wish to keep ?
290
# What is the minimum time you wish to keep an archive file for ?
294
# Settings for the running LVM2 in shell (readline) mode.
297
# Number of lines of history to store in ~/.lvm_history
302
# Miscellaneous global LVM2 settings
305
# The file creation mask for any files and directories created.
306
# Interpreted as octal if the first digit is zero.
309
# Allow other users to read the files
312
# Enabling test mode means that no changes to the on disk metadata
313
# will be made. Equivalent to having the -t option on every
314
# command. Defaults to off.
317
# Default value for --units argument
320
# Since version 2.02.54, the tools distinguish between powers of
321
# 1024 bytes (e.g. KiB, MiB, GiB) and powers of 1000 bytes (e.g.
323
# If you have scripts that depend on the old behaviour, set this to 0
324
# temporarily until you update them.
325
si_unit_consistency = 1
327
# Whether or not to communicate with the kernel device-mapper.
328
# Set to 0 if you want to use the tools to manipulate LVM metadata
329
# without activating any logical volumes.
330
# If the device-mapper kernel driver is not present in your kernel
331
# setting this to 0 should suppress the error messages.
334
# If we can't communicate with device-mapper, should we try running
336
# This option only applies to 2.4 kernels and is provided to help you
337
# switch between device-mapper kernels and LVM1 kernels.
338
# The LVM1 tools need to be installed with .lvm1 suffices
339
# e.g. vgscan.lvm1 and they will stop working after you start using
340
# the new lvm2 on-disk metadata format.
341
# The default value is set when the tools are built.
342
# fallback_to_lvm1 = 0
344
# The default metadata format that commands should use - "lvm1" or "lvm2".
345
# The command line override is -M1 or -M2.
346
# Defaults to "lvm2".
349
# Location of proc filesystem
352
# Type of locking to use. Defaults to local file-based locking (1).
353
# Turn locking off by setting to 0 (dangerous: risks metadata corruption
354
# if LVM2 commands get run concurrently).
355
# Type 2 uses the external shared library locking_library.
356
# Type 3 uses built-in clustered locking.
357
# Type 4 uses read-only locking which forbids any operations that might
361
# Set to 0 to fail when a lock request cannot be satisfied immediately.
364
# If using external locking (type 2) and initialisation fails,
365
# with this set to 1 an attempt will be made to use the built-in
367
# If you are using a customised locking_library you should set this to 0.
368
fallback_to_clustered_locking = 1
370
# If an attempt to initialise type 2 or type 3 locking failed, perhaps
371
# because cluster components such as clvmd are not running, with this set
372
# to 1 an attempt will be made to use local file-based locking (type 1).
373
# If this succeeds, only commands against local volume groups will proceed.
374
# Volume Groups marked as clustered will be ignored.
375
fallback_to_local_locking = 1
377
# Local non-LV directory that holds file-based locks while commands are
378
# in progress. A directory like /tmp that may get wiped on reboot is OK.
379
locking_dir = "@DEFAULT_LOCK_DIR@"
381
# Whenever there are competing read-only and read-write access requests for
382
# a volume group's metadata, instead of always granting the read-only
383
# requests immediately, delay them to allow the read-write requests to be
384
# serviced. Without this setting, write access may be stalled by a high
385
# volume of read-only requests.
386
# NB. This option only affects locking_type = 1 viz. local file-based
388
prioritise_write_locks = 1
390
# Other entries can go here to allow you to load shared libraries
391
# e.g. if support for LVM1 metadata was compiled as a shared library use
392
# format_libraries = "liblvm2format1.so"
393
# Full pathnames can be given.
395
# Search this directory first for shared libraries.
396
# library_dir = "/lib"
398
# The external locking library to load if locking_type is set to 2.
399
# locking_library = "liblvm2clusterlock.so"
401
# Treat any internal errors as fatal errors, aborting the process that
402
# encountered the internal error. Please only enable for debugging.
403
abort_on_internal_errors = 0
405
# Check whether CRC is matching when parsed VG is used multiple times.
406
# This is useful to catch unexpected internal cached volume group
407
# structure modification. Please only enable for debugging.
408
detect_internal_vg_cache_corruption = 0
410
# If set to 1, no operations that change on-disk metadata will be permitted.
411
# Additionally, read-only commands that encounter metadata in need of repair
412
# will still be allowed to proceed exactly as if the repair had been
413
# performed (except for the unchanged vg_seqno).
414
# Inappropriate use could mess up your system, so seek advice first!
415
metadata_read_only = 0
417
# 'mirror_segtype_default' defines which segtype will be used when the
418
# shorthand '-m' option is used for mirroring. The possible options are:
420
# "mirror" - The original RAID1 implementation provided by LVM2/DM. It is
421
# characterized by a flexible log solution (core, disk, mirrored)
422
# and by the necessity to block I/O while reconfiguring in the
423
# event of a failure. Snapshots of this type of RAID1 can be
426
# "raid1" - This implementation leverages MD's RAID1 personality through
427
# device-mapper. It is characterized by a lack of log options.
428
# (A log is always allocated for every device and they are placed
429
# on the same device as the image - no separate devices are
430
# required.) This mirror implementation does not require I/O
431
# to be blocked in the kernel in the event of a failure.
433
# Specify the '--type <mirror|raid1>' option to override this default
435
mirror_segtype_default = "mirror"
439
# Set to 1 to perform internal checks on the operations issued to
440
# libdevmapper. Useful for debugging problems with activation.
441
# Some of the checks may be expensive, so it's best to use this
442
# only when there seems to be a problem.
445
# Set to 0 to disable udev synchronisation (if compiled into the binaries).
446
# Processes will not wait for notification from udev.
447
# They will continue irrespective of any possible udev processing
448
# in the background. You should only use this if udev is not running
449
# or has rules that ignore the devices LVM2 creates.
450
# The command line argument --nodevsync takes precedence over this setting.
451
# If set to 1 when udev is not running, and there are LVM2 processes
452
# waiting for udev, run 'dmsetup udevcomplete_all' manually to wake them up.
455
# Set to 0 to disable the udev rules installed by LVM2 (if built with
456
# --enable-udev_rules). LVM2 will then manage the /dev nodes and symlinks
457
# for active logical volumes directly itself.
458
# N.B. Manual intervention may be required if this setting is changed
459
# while any logical volumes are active.
462
# Set to 1 for LVM2 to verify operations performed by udev. This turns on
463
# additional checks (and if necessary, repairs) on entries in the device
464
# directory after udev has completed processing its events.
465
# Useful for diagnosing problems with LVM2/udev interactions.
466
verify_udev_operations = 0
468
# How to fill in missing stripes if activating an incomplete volume.
469
# Using "error" will make inaccessible parts of the device return
470
# I/O errors on access. You can instead use a device path, in which
471
# case, that device will be used to in place of missing stripes.
472
# But note that using anything other than "error" with mirrored
473
# or snapshotted volumes is likely to result in data corruption.
474
missing_stripe_filler = "error"
476
# How much stack (in KB) to reserve for use while devices suspended
479
# How much memory (in KB) to reserve for use while devices suspended
480
reserved_memory = 8192
482
# Nice value used while devices suspended
483
process_priority = -18
485
# If volume_list is defined, each LV is only activated if there is a
486
# match against the list.
487
# "vgname" and "vgname/lvname" are matched exactly.
488
# "@tag" matches any tag set in the LV or VG.
489
# "@*" matches if any tag defined on the host is also set in the LV or VG
491
# volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
493
# Size (in KB) of each copy operation when mirroring
494
mirror_region_size = 512
496
# Setting to use when there is no readahead value stored in the metadata.
498
# "none" - Disable readahead.
499
# "auto" - Use default value chosen by kernel.
502
# 'mirror_image_fault_policy' and 'mirror_log_fault_policy' define
503
# how a device failure affecting a mirror is handled.
504
# A mirror is composed of mirror images (copies) and a log.
505
# A disk log ensures that a mirror does not need to be re-synced
506
# (all copies made the same) every time a machine reboots or crashes.
508
# In the event of a failure, the specified policy will be used to determine
509
# what happens. This applies to automatic repairs (when the mirror is being
510
# monitored by dmeventd) and to manual lvconvert --repair when
511
# --use-policies is given.
513
# "remove" - Simply remove the faulty device and run without it. If
514
# the log device fails, the mirror would convert to using
515
# an in-memory log. This means the mirror will not
516
# remember its sync status across crashes/reboots and
517
# the entire mirror will be re-synced. If a
518
# mirror image fails, the mirror will convert to a
519
# non-mirrored device if there is only one remaining good
522
# "allocate" - Remove the faulty device and try to allocate space on
523
# a new device to be a replacement for the failed device.
524
# Using this policy for the log is fast and maintains the
525
# ability to remember sync state through crashes/reboots.
526
# Using this policy for a mirror device is slow, as it
527
# requires the mirror to resynchronize the devices, but it
528
# will preserve the mirror characteristic of the device.
529
# This policy acts like "remove" if no suitable device and
530
# space can be allocated for the replacement.
532
# "allocate_anywhere" - Not yet implemented. Useful to place the log device
533
# temporarily on same physical volume as one of the mirror
534
# images. This policy is not recommended for mirror devices
535
# since it would break the redundant nature of the mirror. This
536
# policy acts like "remove" if no suitable device and space can
537
# be allocated for the replacement.
539
mirror_log_fault_policy = "allocate"
540
mirror_image_fault_policy = "remove"
542
# 'snapshot_autoextend_threshold' and 'snapshot_autoextend_percent' define
543
# how to handle automatic snapshot extension. The former defines when the
544
# snapshot should be extended: when its space usage exceeds this many
545
# percent. The latter defines how much extra space should be allocated for
546
# the snapshot, in percent of its current size.
548
# For example, if you set snapshot_autoextend_threshold to 70 and
549
# snapshot_autoextend_percent to 20, whenever a snapshot exceeds 70% usage,
550
# it will be extended by another 20%. For a 1G snapshot, using up 700M will
551
# trigger a resize to 1.2G. When the usage exceeds 840M, the snapshot will
552
# be extended to 1.44G, and so on.
554
# Setting snapshot_autoextend_threshold to 100 disables automatic
555
# extensions. The minimum value is 50 (A setting below 50 will be treated
558
snapshot_autoextend_threshold = 100
559
snapshot_autoextend_percent = 20
561
# While activating devices, I/O to devices being (re)configured is
562
# suspended, and as a precaution against deadlocks, LVM2 needs to pin
563
# any memory it is using so it is not paged out. Groups of pages that
564
# are known not to be accessed during activation need not be pinned
565
# into memory. Each string listed in this setting is compared against
566
# each line in /proc/self/maps, and the pages corresponding to any
567
# lines that match are not pinned. On some systems locale-archive was
568
# found to make up over 80% of the memory used by the process.
569
# mlock_filter = [ "locale/locale-archive", "gconv/gconv-modules.cache" ]
571
# Set to 1 to revert to the default behaviour prior to version 2.02.62
572
# which used mlockall() to pin the whole process's memory while activating
576
# Monitoring is enabled by default when activating logical volumes.
577
# Set to 0 to disable monitoring or use the --ignoremonitoring option.
580
# When pvmove or lvconvert must wait for the kernel to finish
581
# synchronising or merging data, they check and report progress
582
# at intervals of this number of seconds. The default is 15 seconds.
583
# If this is set to 0 and there is only one thing to wait for, there
584
# are no progress reports, but the process is awoken immediately the
585
# operation is complete.
586
polling_interval = 15
597
# Default number of copies of metadata to hold on each PV. 0, 1 or 2.
598
# You might want to override it from the command line with 0
599
# when running pvcreate on new PVs which are to be added to large VGs.
601
# pvmetadatacopies = 1
603
# Default number of copies of metadata to maintain for each VG.
604
# If set to a non-zero value, LVM automatically chooses which of
605
# the available metadata areas to use to achieve the requested
606
# number of copies of the VG metadata. If you set a value larger
607
# than the the total number of metadata areas available then
608
# metadata is stored in them all.
609
# The default value of 0 ("unmanaged") disables this automatic
610
# management and allows you to control which metadata areas
611
# are used at the individual PV level using 'pvchange
612
# --metadataignore y/n'.
614
# vgmetadatacopies = 0
616
# Approximate default size of on-disk metadata areas in sectors.
617
# You should increase this if you have large volume groups or
618
# you want to retain a large on-disk history of your metadata changes.
620
# pvmetadatasize = 255
622
# List of directories holding live copies of text format metadata.
623
# These directories must not be on logical volumes!
624
# It's possible to use LVM2 with a couple of directories here,
625
# preferably on different (non-LV) filesystems, and with no other
626
# on-disk metadata (pvmetadatacopies = 0). Or this can be in
627
# addition to on-disk metadata areas.
628
# The feature was originally added to simplify testing and is not
629
# supported under low memory situations - the machine could lock up.
631
# Never edit any files in these directories by hand unless you
632
# you are absolutely sure you know what you are doing! Use
633
# the supplied toolset to make changes (e.g. vgcfgrestore).
635
# dirs = [ "/etc/lvm/metadata", "/mnt/disk2/lvm/metadata2" ]
641
# mirror_library is the library used when monitoring a mirror device.
643
# "libdevmapper-event-lvm2mirror.so" attempts to recover from
644
# failures. It removes failed devices from a volume group and
645
# reconfigures a mirror as necessary. If no mirror library is
646
# provided, mirrors are not monitored through dmeventd.
648
mirror_library = "libdevmapper-event-lvm2mirror.so"
650
# snapshot_library is the library used when monitoring a snapshot device.
652
# "libdevmapper-event-lvm2snapshot.so" monitors the filling of
653
# snapshots and emits a warning through syslog when the use of
654
# the snapshot exceeds 80%. The warning is repeated when 85%, 90% and
655
# 95% of the snapshot is filled.
657
snapshot_library = "libdevmapper-event-lvm2snapshot.so"
659
# Full path of the dmeventd binary.
661
# executable = "@DMEVENTD_PATH@"