Subversion Repositories configs

Rev

Rev 8 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
3 - 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
# /etc/lvm/lvm.conf file.
4
#
5
# Refer to 'man lvm.conf' for further information including the file layout.
6
#
7
# To put this file in a different directory and override /etc/lvm set
8
# the environment variable LVM_SYSTEM_DIR before running the tools.
9
#
10
# N.B. Take care that each setting only appears once if uncommenting
11
# example settings in this file.
12
 
13
# This section allows you to set the way the configuration settings are handled.
14
config {
15
 
16
    # If enabled, any LVM2 configuration mismatch is reported.
17
    # This implies checking that the configuration key is understood
18
    # by LVM2 and that the value of the key is of a proper type.
19
    # If disabled, any configuration mismatch is ignored and default
20
    # value is used instead without any warning (a message about the
21
    # configuration key not being found is issued in verbose mode only).
22
    checks = 1
23
 
24
    # If enabled, any configuration mismatch aborts the LVM2 process.
25
    abort_on_errors = 0
26
 
27
    # Directory where LVM looks for configuration profiles.
28
    profile_dir = "/etc/lvm/profile"
29
}
30
 
31
# This section allows you to configure which block devices should
32
# be used by the LVM system.
33
devices {
34
 
35
    # Where do you want your volume groups to appear ?
36
    dir = "/dev"
37
 
38
    # An array of directories that contain the device nodes you wish
39
    # to use with LVM2.
40
    scan = [ "/dev" ]
41
 
33 - 42
    # Select external device information source to use for further and more
43
    # detailed device determination. Some information may already be available
44
    # in the system and LVM2 can use this information to determine the exact
45
    # type or use of the device it processes. Using existing external device
46
    # information source can speed up device processing as LVM2 does not need
47
    # to run its own native routines to acquire this information. For example,
48
    # such information is used to drive LVM2 filtering like MD component
49
    # detection, multipath component detection, partition detection and others.
50
    # Possible options are:
51
    # "none"        - No external device information source is used.
52
    #
53
    # "udev"        - Reuse existing udev database records. Applicable
54
    #                 only if LVM is compiled with udev support.
55
    #
56
    external_device_info_source = "none"
57
 
3 - 58
    # If set, the cache of block device nodes with all associated symlinks
59
    # will be constructed out of the existing udev database content.
60
    # This avoids using and opening any inapplicable non-block devices or
61
    # subdirectories found in the device directory. This setting is applied
62
    # to udev-managed device directory only, other directories will be scanned
63
    # fully. LVM2 needs to be compiled with udev support for this setting to
64
    # take effect. N.B. Any device node or symlink not managed by udev in
65
    # udev directory will be ignored with this setting on.
66
    obtain_device_list_from_udev = 0
67
 
68
    # If several entries in the scanned directories correspond to the
69
    # same block device and the tools need to display a name for device,
70
    # all the pathnames are matched against each item in the following
71
    # list of regular expressions in turn and the first match is used.
8 - 72
 
73
    # By default no preferred names are defined.
3 - 74
    # preferred_names = [ ]
75
 
76
    # Try to avoid using undescriptive /dev/dm-N names, if present.
77
    preferred_names = [ "^/dev/mpath/", "^/dev/mapper/mpath", "^/dev/[hs]d" ]
78
 
8 - 79
    # In case no prefererred name matches or if preferred_names are not
80
    # defined at all, builtin rules are used to determine the preference.
81
    #
82
    # The first builtin rule checks path prefixes and it gives preference
83
    # based on this ordering (where "dev" depends on devices/dev setting):
84
    #   /dev/mapper > /dev/disk > /dev/dm-* > /dev/block
85
    #
86
    # If the ordering above cannot be applied, the path with fewer slashes
87
    # gets preference then.
88
    #
89
    # If the number of slashes is the same, a symlink gets preference.
90
    #
91
    # Finally, if all the rules mentioned above are not applicable,
92
    # lexicographical order is used over paths and the smallest one
93
    # of all gets preference.
94
 
95
 
3 - 96
    # A filter that tells LVM2 to only use a restricted set of devices.
97
    # The filter consists of an array of regular expressions.  These
98
    # expressions can be delimited by a character of your choice, and
99
    # prefixed with either an 'a' (for accept) or 'r' (for reject).
100
    # The first expression found to match a device name determines if
101
    # the device will be accepted or rejected (ignored).  Devices that
102
    # don't match any patterns are accepted.
103
 
104
    # Be careful if there there are symbolic links or multiple filesystem
105
    # entries for the same device as each name is checked separately against
106
    # the list of patterns.  The effect is that if the first pattern in the
107
    # list to match a name is an 'a' pattern for any of the names, the device
108
    # is accepted; otherwise if the first pattern in the list to match a name
109
    # is an 'r' pattern for any of the names it is rejected; otherwise it is
110
    # accepted.
111
 
112
    # Don't have more than one filter line active at once: only one gets used.
113
 
114
    # Run vgscan after you change this parameter to ensure that
115
    # the cache file gets regenerated (see below).
116
    # If it doesn't do what you expect, check the output of 'vgscan -vvvv'.
117
 
8 - 118
    # If lvmetad is used, then see "A note about device filtering while
119
    # lvmetad is used" comment that is attached to global/use_lvmetad setting.
3 - 120
 
121
    # By default we accept every block device:
8 - 122
    # filter = [ "a/.*/" ]
3 - 123
 
124
    # Exclude the cdrom drive
125
    # filter = [ "r|/dev/cdrom|" ]
126
 
127
    # When testing I like to work with just loopback devices:
128
    # filter = [ "a/loop/", "r/.*/" ]
129
 
130
    # Or maybe all loops and ide drives except hdc:
131
    # filter =[ "a|loop|", "r|/dev/hdc|", "a|/dev/ide|", "r|.*|" ]
132
 
133
    # Use anchors if you want to be really specific
134
    # filter = [ "a|^/dev/hda8$|", "r/.*/" ]
135
 
136
    # Since "filter" is often overridden from command line, it is not suitable
137
    # for system-wide device filtering (udev rules, lvmetad). To hide devices
138
    # from LVM-specific udev processing and/or from lvmetad, you need to set
139
    # global_filter. The syntax is the same as for normal "filter"
140
    # above. Devices that fail the global_filter are not even opened by LVM.
141
 
142
    # global_filter = []
143
 
144
    # The results of the filtering are cached on disk to avoid
145
    # rescanning dud devices (which can take a very long time).
146
    # By default this cache is stored in the /etc/lvm/cache directory
147
    # in a file called '.cache'.
148
    # It is safe to delete the contents: the tools regenerate it.
149
    # (The old setting 'cache' is still respected if neither of
150
    # these new ones is present.)
151
    # N.B. If obtain_device_list_from_udev is set to 1 the list of
152
    # devices is instead obtained from udev and any existing .cache
153
    # file is removed.
154
    cache_dir = "/etc/lvm/cache"
155
    cache_file_prefix = ""
156
 
157
    # You can turn off writing this cache file by setting this to 0.
158
    write_cache_state = 1
159
 
160
    # Advanced settings.
161
 
162
    # List of pairs of additional acceptable block device types found
163
    # in /proc/devices with maximum (non-zero) number of partitions.
164
    # types = [ "fd", 16 ]
165
 
166
    # If sysfs is mounted (2.6 kernels) restrict device scanning to
167
    # the block devices it believes are valid.
168
    # 1 enables; 0 disables.
169
    sysfs_scan = 1
170
 
171
    # By default, LVM2 will ignore devices used as component paths
172
    # of device-mapper multipath devices.
173
    # 1 enables; 0 disables.
174
    multipath_component_detection = 1
175
 
176
    # By default, LVM2 will ignore devices used as components of
177
    # software RAID (md) devices by looking for md superblocks.
178
    # 1 enables; 0 disables.
179
    md_component_detection = 1
180
 
33 - 181
    # By default, LVM2 will not ignore devices used as components of
182
    # firmware RAID devices. Set to 1 to enable this detection.
183
    # N.B. LVM2 itself is not detecting firmware RAID - an
184
    # external_device_info_source other than "none" must
185
    # be used for this detection to execute.
186
    # 1 enables; 0 disables
187
    fw_raid_component_detection = 0
188
 
3 - 189
    # By default, if a PV is placed directly upon an md device, LVM2
190
    # will align its data blocks with the md device's stripe-width.
191
    # 1 enables; 0 disables.
192
    md_chunk_alignment = 1
193
 
194
    # Default alignment of the start of a data area in MB.  If set to 0,
195
    # a value of 64KB will be used.  Set to 1 for 1MiB, 2 for 2MiB, etc.
196
    # default_data_alignment = 1
197
 
198
    # By default, the start of a PV's data area will be a multiple of
199
    # the 'minimum_io_size' or 'optimal_io_size' exposed in sysfs.
200
    # - minimum_io_size - the smallest request the device can perform
201
    #   w/o incurring a read-modify-write penalty (e.g. MD's chunk size)
202
    # - optimal_io_size - the device's preferred unit of receiving I/O
203
    #   (e.g. MD's stripe width)
204
    # minimum_io_size is used if optimal_io_size is undefined (0).
205
    # If md_chunk_alignment is enabled, that detects the optimal_io_size.
206
    # This setting takes precedence over md_chunk_alignment.
207
    # 1 enables; 0 disables.
208
    data_alignment_detection = 1
209
 
210
    # Alignment (in KB) of start of data area when creating a new PV.
211
    # md_chunk_alignment and data_alignment_detection are disabled if set.
212
    # Set to 0 for the default alignment (see: data_alignment_default)
213
    # or page size, if larger.
214
    data_alignment = 0
215
 
216
    # By default, the start of the PV's aligned data area will be shifted by
217
    # the 'alignment_offset' exposed in sysfs.  This offset is often 0 but
218
    # may be non-zero; e.g.: certain 4KB sector drives that compensate for
219
    # windows partitioning will have an alignment_offset of 3584 bytes
220
    # (sector 7 is the lowest aligned logical block, the 4KB sectors start
221
    # at LBA -1, and consequently sector 63 is aligned on a 4KB boundary).
222
    # But note that pvcreate --dataalignmentoffset will skip this detection.
223
    # 1 enables; 0 disables.
224
    data_alignment_offset_detection = 1
225
 
226
    # If, while scanning the system for PVs, LVM2 encounters a device-mapper
227
    # device that has its I/O suspended, it waits for it to become accessible.
228
    # Set this to 1 to skip such devices.  This should only be needed
229
    # in recovery situations.
230
    ignore_suspended_devices = 0
231
 
232
    # ignore_lvm_mirrors:  Introduced in version 2.02.104
233
    # This setting determines whether logical volumes of "mirror" segment
234
    # type are scanned for LVM labels.  This affects the ability of
235
    # mirrors to be used as physical volumes.  If 'ignore_lvm_mirrors'
236
    # is set to '1', it becomes impossible to create volume groups on top
237
    # of mirror logical volumes - i.e. to stack volume groups on mirrors.
238
    #
239
    # Allowing mirror logical volumes to be scanned (setting the value to '0')
240
    # can potentially cause LVM processes and I/O to the mirror to become
241
    # blocked.  This is due to the way that the "mirror" segment type handles
242
    # failures.  In order for the hang to manifest itself, an LVM command must
243
    # be run just after a failure and before the automatic LVM repair process
244
    # takes place OR there must be failures in multiple mirrors in the same
245
    # volume group at the same time with write failures occurring moments
246
    # before a scan of the mirror's labels.
247
    #
248
    # Note that these scanning limitations do not apply to the LVM RAID
249
    # types, like "raid1".  The RAID segment types handle failures in a
250
    # different way and are not subject to possible process or I/O blocking.
251
    #
252
    # It is encouraged that users set 'ignore_lvm_mirrors' to 1 if they
253
    # are using the "mirror" segment type.  Users that require volume group
254
    # stacking on mirrored logical volumes should consider using the "raid1"
255
    # segment type.  The "raid1" segment type is not available for
256
    # active/active clustered volume groups.
257
    #
258
    # Set to 1 to disallow stacking and thereby avoid a possible deadlock.
8 - 259
    ignore_lvm_mirrors = 1
3 - 260
 
261
    # During each LVM operation errors received from each device are counted.
262
    # If the counter of a particular device exceeds the limit set here, no
263
    # further I/O is sent to that device for the remainder of the respective
264
    # operation. Setting the parameter to 0 disables the counters altogether.
265
    disable_after_error_count = 0
266
 
267
    # Allow use of pvcreate --uuid without requiring --restorefile.
268
    require_restorefile_with_uuid = 1
269
 
270
    # Minimum size (in KB) of block devices which can be used as PVs.
271
    # In a clustered environment all nodes must use the same value.
272
    # Any value smaller than 512KB is ignored.
273
 
274
    # Ignore devices smaller than 2MB such as floppy drives.
275
    pv_min_size = 2048
276
 
277
    # The original built-in setting was 512 up to and including version 2.02.84.
278
    # pv_min_size = 512
279
 
280
    # Issue discards to a logical volumes's underlying physical volume(s) when
281
    # the logical volume is no longer using the physical volumes' space (e.g.
282
    # lvremove, lvreduce, etc).  Discards inform the storage that a region is
283
    # no longer in use.  Storage that supports discards advertise the protocol
284
    # specific way discards should be issued by the kernel (TRIM, UNMAP, or
285
    # WRITE SAME with UNMAP bit set).  Not all storage will support or benefit
286
    # from discards but SSDs and thinly provisioned LUNs generally do.  If set
287
    # to 1, discards will only be issued if both the storage and kernel provide
288
    # support.
289
    # 1 enables; 0 disables.
290
    issue_discards = 0
291
}
292
 
293
# This section allows you to configure the way in which LVM selects
294
# free space for its Logical Volumes.
295
allocation {
296
 
297
    # When searching for free space to extend an LV, the "cling"
298
    # allocation policy will choose space on the same PVs as the last
299
    # segment of the existing LV.  If there is insufficient space and a
300
    # list of tags is defined here, it will check whether any of them are
301
    # attached to the PVs concerned and then seek to match those PV tags
302
    # between existing extents and new extents.
303
    # Use the special tag "@*" as a wildcard to match any PV tag.
304
 
305
    # Example: LVs are mirrored between two sites within a single VG.
306
    # PVs are tagged with either @site1 or @site2 to indicate where
307
    # they are situated.
308
 
309
    # cling_tag_list = [ "@site1", "@site2" ]
310
    # cling_tag_list = [ "@*" ]
311
 
312
    # Changes made in version 2.02.85 extended the reach of the 'cling'
313
    # policies to detect more situations where data can be grouped
314
    # onto the same disks.  Set this to 0 to revert to the previous
315
    # algorithm.
316
    maximise_cling = 1
317
 
8 - 318
    # Whether to use blkid library instead of native LVM2 code to detect
319
    # any existing signatures while creating new Physical Volumes and
320
    # Logical Volumes. LVM2 needs to be compiled with blkid wiping support
321
    # for this setting to take effect.
322
    #
323
    # LVM2 native detection code is currently able to recognize these signatures:
324
    #   - MD device signature
325
    #   - swap signature
326
    #   - LUKS signature
327
    # To see the list of signatures recognized by blkid, check the output
328
    # of 'blkid -k' command. The blkid can recognize more signatures than
329
    # LVM2 native detection code, but due to this higher number of signatures
330
    # to be recognized, it can take more time to complete the signature scan.
331
    use_blkid_wiping = 1
332
 
33 - 333
    # Set to 1 to detect any signatures found on newly-created Logical Volume
334
    # whenever zeroing of the LV is done (zeroing is controlled by -Z/--zero
335
    # option and if not specified, zeroing is used by default if possible).
8 - 336
    #
33 - 337
    # While zeroing simply overwrites first 4 KiB of the LV with zeroes without
338
    # doing any signature detection, signature wiping goes beyond that and it
339
    # can detect exact type and position of signature within the whole LV.
340
    # As such, it provides cleaner LV for use after creation as all known
341
    # signatures are wiped so that the LV is not claimed by other tools
342
    # incorrectly by the existence of old signature from any previous use.
343
    # The number of signatures that LVM can detect depends on detection
344
    # code that is selected - see also use_blkid_wiping option.
345
    #
346
    # Wiping of each detected signature must be confirmed.
347
    #
348
    # The default is to wipe signatures when zeroing. The command line
349
    # option -W/--wipesignatures takes precedence over this setting.
350
    #
351
    # Without this option set, signatures on newly-created Logical Volumes
352
    # are never detected and wiped and you always need to use
353
    # -W/--wipesignatures y option directly to enable this feature
354
    # no matter whether zeroing is used or not.
8 - 355
    wipe_signatures_when_zeroing_new_lvs = 1
356
 
3 - 357
    # Set to 1 to guarantee that mirror logs will always be placed on
358
    # different PVs from the mirror images.  This was the default
359
    # until version 2.02.85.
360
    mirror_logs_require_separate_pvs = 0
361
 
8 - 362
    # Set to 1 to guarantee that cache_pool metadata will always be
363
    # placed on  different PVs from the cache_pool data.
364
    cache_pool_metadata_require_separate_pvs = 0
365
 
366
    # Specify the minimal chunk size (in kiB) for cache pool volumes.
367
    # Using a chunk_size that is too large can result in wasteful use of
368
    # the cache, where small reads and writes can cause large sections of
369
    # an LV to be mapped into the cache.  However, choosing a chunk_size
370
    # that is too small can result in more overhead trying to manage the
371
    # numerous chunks that become mapped into the cache.  The former is
372
    # more of a problem than the latter in most cases, so we default to
373
    # a value that is on the smaller end of the spectrum.  Supported values
374
    # range from 32(kiB) to 1048576 in multiples of 32.
375
    # cache_pool_chunk_size = 64
376
 
33 - 377
    # Specify the default cache mode used for new cache pools.
378
    # Possible options are:
379
    # "writethrough"    - Data blocks are immediately written from
380
    #                     the cache to disk.
381
    # "writeback"       - Data blocks are written from the cache
382
    #                     back to disk after some delay to improve
383
    #                     performance.
384
    # cache_pool_cachemode = "writethrough"
385
 
3 - 386
    # Set to 1 to guarantee that thin pool metadata will always
387
    # be placed on different PVs from the pool data.
388
    thin_pool_metadata_require_separate_pvs = 0
389
 
8 - 390
    # Specify chunk size calculation policy for thin pool volumes.
391
    # Possible options are:
392
    # "generic"        - if thin_pool_chunk_size is defined, use it.
393
    #                    Otherwise, calculate the chunk size based on
394
    #                    estimation and device hints exposed in sysfs:
395
    #                    the minimum_io_size. The chunk size is always
396
    #                    at least 64KiB.
397
    #
398
    # "performance"    - if thin_pool_chunk_size is defined, use it.
399
    # 			 Otherwise, calculate the chunk size for
400
    # 			 performance based on device hints exposed in
401
    # 			 sysfs: the optimal_io_size. The chunk size is
402
    # 			 always at least 512KiB.
403
    # thin_pool_chunk_size_policy = "generic"
404
 
3 - 405
    # Specify the minimal chunk size (in KB) for thin pool volumes.
8 - 406
    # Use of the larger chunk size may improve performance for plain
3 - 407
    # thin volumes, however using them for snapshot volumes is less efficient,
408
    # as it consumes more space and takes extra time for copying.
409
    # When unset, lvm tries to estimate chunk size starting from 64KB
410
    # Supported values are in range from 64 to 1048576.
411
    # thin_pool_chunk_size = 64
412
 
8 - 413
    # Specify discards behaviour of the thin pool volume.
3 - 414
    # Select one of  "ignore", "nopassdown", "passdown"
415
    # thin_pool_discards = "passdown"
416
 
417
    # Set to 0, to disable zeroing of thin pool data chunks before their
418
    # first use.
419
    # N.B. zeroing larger thin pool chunk size degrades performance.
420
    # thin_pool_zero = 1
33 - 421
 
422
    # Default physical extent size to use for newly created VGs (in KB).
423
    # physical_extent_size = 4096
3 - 424
}
425
 
426
# This section that allows you to configure the nature of the
427
# information that LVM2 reports.
428
log {
429
 
430
    # Controls the messages sent to stdout or stderr.
431
    # There are three levels of verbosity, 3 being the most verbose.
432
    verbose = 0
433
 
434
    # Set to 1 to suppress all non-essential messages from stdout.
435
    # This has the same effect as -qq.
436
    # When this is set, the following commands still produce output:
437
    # dumpconfig, lvdisplay, lvmdiskscan, lvs, pvck, pvdisplay,
438
    # pvs, version, vgcfgrestore -l, vgdisplay, vgs.
439
    # Non-essential messages are shifted from log level 4 to log level 5
440
    # for syslog and lvm2_log_fn purposes.
441
    # Any 'yes' or 'no' questions not overridden by other arguments
442
    # are suppressed and default to 'no'.
443
    silent = 0
444
 
445
    # Should we send log messages through syslog?
446
    # 1 is yes; 0 is no.
447
    syslog = 1
448
 
449
    # Should we log error and debug messages to a file?
450
    # By default there is no log file.
451
    #file = "/var/log/lvm2.log"
452
 
453
    # Should we overwrite the log file each time the program is run?
454
    # By default we append.
455
    overwrite = 0
456
 
457
    # What level of log messages should we send to the log file and/or syslog?
458
    # There are 6 syslog-like log levels currently in use - 2 to 7 inclusive.
459
    # 7 is the most verbose (LOG_DEBUG).
460
    level = 0
461
 
462
    # Format of output messages
463
    # Whether or not (1 or 0) to indent messages according to their severity
464
    indent = 1
465
 
466
    # Whether or not (1 or 0) to display the command name on each line output
467
    command_names = 0
468
 
469
    # A prefix to use before the message text (but after the command name,
470
    # if selected).  Default is two spaces, so you can see/grep the severity
471
    # of each message.
472
    prefix = "  "
473
 
474
    # To make the messages look similar to the original LVM tools use:
475
    #   indent = 0
476
    #   command_names = 1
477
    #   prefix = " -- "
478
 
479
    # Set this if you want log messages during activation.
480
    # Don't use this in low memory situations (can deadlock).
481
    # activation = 0
482
 
483
    # Some debugging messages are assigned to a class and only appear
484
    # in debug output if the class is listed here.
485
    # Classes currently available:
486
    #   memory, devices, activation, allocation, lvmetad, metadata, cache,
487
    #   locking
488
    # Use "all" to see everything.
489
    debug_classes = [ "memory", "devices", "activation", "allocation",
490
		      "lvmetad", "metadata", "cache", "locking" ]
491
}
492
 
493
# Configuration of metadata backups and archiving.  In LVM2 when we
494
# talk about a 'backup' we mean making a copy of the metadata for the
495
# *current* system.  The 'archive' contains old metadata configurations.
8 - 496
# Backups are stored in a human readable text format.
3 - 497
backup {
498
 
499
    # Should we maintain a backup of the current metadata configuration ?
500
    # Use 1 for Yes; 0 for No.
501
    # Think very hard before turning this off!
502
    backup = 1
503
 
504
    # Where shall we keep it ?
505
    # Remember to back up this directory regularly!
506
    backup_dir = "/etc/lvm/backup"
507
 
508
    # Should we maintain an archive of old metadata configurations.
509
    # Use 1 for Yes; 0 for No.
510
    # On by default.  Think very hard before turning this off.
511
    archive = 1
512
 
513
    # Where should archived files go ?
514
    # Remember to back up this directory regularly!
515
    archive_dir = "/etc/lvm/archive"
516
 
517
    # What is the minimum number of archive files you wish to keep ?
518
    retain_min = 10
519
 
520
    # What is the minimum time you wish to keep an archive file for ?
521
    retain_days = 30
522
}
523
 
524
# Settings for the running LVM2 in shell (readline) mode.
525
shell {
526
 
527
    # Number of lines of history to store in ~/.lvm_history
528
    history_size = 100
529
}
530
 
531
 
532
# Miscellaneous global LVM2 settings
533
global {
534
    # The file creation mask for any files and directories created.
535
    # Interpreted as octal if the first digit is zero.
536
    umask = 077
537
 
538
    # Allow other users to read the files
539
    #umask = 022
540
 
541
    # Enabling test mode means that no changes to the on disk metadata
542
    # will be made.  Equivalent to having the -t option on every
543
    # command.  Defaults to off.
544
    test = 0
545
 
546
    # Default value for --units argument
547
    units = "h"
548
 
549
    # Since version 2.02.54, the tools distinguish between powers of
550
    # 1024 bytes (e.g. KiB, MiB, GiB) and powers of 1000 bytes (e.g.
551
    # KB, MB, GB).
552
    # If you have scripts that depend on the old behaviour, set this to 0
553
    # temporarily until you update them.
554
    si_unit_consistency = 1
555
 
8 - 556
    # Whether or not to display unit suffix for sizes. This setting has
557
    # no effect if the units are in human-readable form (global/units="h")
558
    # in which case the suffix is always displayed.
559
    suffix = 1
560
 
3 - 561
    # Whether or not to communicate with the kernel device-mapper.
562
    # Set to 0 if you want to use the tools to manipulate LVM metadata
563
    # without activating any logical volumes.
564
    # If the device-mapper kernel driver is not present in your kernel
565
    # setting this to 0 should suppress the error messages.
566
    activation = 1
567
 
568
    # If we can't communicate with device-mapper, should we try running
569
    # the LVM1 tools?
570
    # This option only applies to 2.4 kernels and is provided to help you
571
    # switch between device-mapper kernels and LVM1 kernels.
572
    # The LVM1 tools need to be installed with .lvm1 suffices
573
    # e.g. vgscan.lvm1 and they will stop working after you start using
574
    # the new lvm2 on-disk metadata format.
575
    # The default value is set when the tools are built.
576
    # fallback_to_lvm1 = 0
577
 
578
    # The default metadata format that commands should use - "lvm1" or "lvm2".
579
    # The command line override is -M1 or -M2.
580
    # Defaults to "lvm2".
581
    # format = "lvm2"
582
 
33 - 583
    # Location of /etc system configuration directory.
584
    etc = "/etc"
585
 
3 - 586
    # Location of proc filesystem
587
    proc = "/proc"
588
 
589
    # Type of locking to use. Defaults to local file-based locking (1).
590
    # Turn locking off by setting to 0 (dangerous: risks metadata corruption
591
    # if LVM2 commands get run concurrently).
592
    # Type 2 uses the external shared library locking_library.
593
    # Type 3 uses built-in clustered locking.
594
    # Type 4 uses read-only locking which forbids any operations that might
595
    # change metadata.
8 - 596
    # Type 5 offers dummy locking for tools that do not need any locks.
597
    # You should not need to set this directly: the tools will select when
598
    # to use it instead of the configured locking_type.  Do not use lvmetad or
599
    # the kernel device-mapper driver with this locking type.
600
    # It is used by the --readonly option that offers read-only access to
601
    # Volume Group metadata that cannot be locked safely because it belongs to
602
    # an inaccessible domain and might be in use, for example a virtual machine
603
    # image or a disk that is shared by a clustered machine.
604
    #
605
    # N.B. Don't use lvmetad with locking type 3 as lvmetad is not yet
606
    # supported in clustered environment. If use_lvmetad=1 and locking_type=3
607
    # is set at the same time, LVM always issues a warning message about this
608
    # and then it automatically disables lvmetad use.
3 - 609
    locking_type = 1
610
 
611
    # Set to 0 to fail when a lock request cannot be satisfied immediately.
612
    wait_for_locks = 1
613
 
614
    # If using external locking (type 2) and initialisation fails,
615
    # with this set to 1 an attempt will be made to use the built-in
616
    # clustered locking.
617
    # If you are using a customised locking_library you should set this to 0.
618
    fallback_to_clustered_locking = 1
619
 
620
    # If an attempt to initialise type 2 or type 3 locking failed, perhaps
621
    # because cluster components such as clvmd are not running, with this set
622
    # to 1 an attempt will be made to use local file-based locking (type 1).
623
    # If this succeeds, only commands against local volume groups will proceed.
624
    # Volume Groups marked as clustered will be ignored.
625
    fallback_to_local_locking = 1
626
 
627
    # Local non-LV directory that holds file-based locks while commands are
628
    # in progress.  A directory like /tmp that may get wiped on reboot is OK.
629
    locking_dir = "/var/lock/lvm"
630
 
631
    # Whenever there are competing read-only and read-write access requests for
632
    # a volume group's metadata, instead of always granting the read-only
633
    # requests immediately, delay them to allow the read-write requests to be
634
    # serviced.  Without this setting, write access may be stalled by a high
635
    # volume of read-only requests.
636
    # NB. This option only affects locking_type = 1 viz. local file-based
637
    # locking.
638
    prioritise_write_locks = 1
639
 
640
    # Other entries can go here to allow you to load shared libraries
641
    # e.g. if support for LVM1 metadata was compiled as a shared library use
642
    #   format_libraries = "liblvm2format1.so"
643
    # Full pathnames can be given.
644
 
645
    # Search this directory first for shared libraries.
646
    #   library_dir = "/lib"
647
 
648
    # The external locking library to load if locking_type is set to 2.
649
    #   locking_library = "liblvm2clusterlock.so"
650
 
651
    # Treat any internal errors as fatal errors, aborting the process that
652
    # encountered the internal error. Please only enable for debugging.
653
    abort_on_internal_errors = 0
654
 
655
    # Check whether CRC is matching when parsed VG is used multiple times.
656
    # This is useful to catch unexpected internal cached volume group
657
    # structure modification. Please only enable for debugging.
658
    detect_internal_vg_cache_corruption = 0
659
 
660
    # If set to 1, no operations that change on-disk metadata will be permitted.
661
    # Additionally, read-only commands that encounter metadata in need of repair
662
    # will still be allowed to proceed exactly as if the repair had been
663
    # performed (except for the unchanged vg_seqno).
664
    # Inappropriate use could mess up your system, so seek advice first!
665
    metadata_read_only = 0
666
 
667
    # 'mirror_segtype_default' defines which segtype will be used when the
668
    # shorthand '-m' option is used for mirroring.  The possible options are:
669
    #
670
    # "mirror" - The original RAID1 implementation provided by LVM2/DM.  It is
671
    # 	         characterized by a flexible log solution (core, disk, mirrored)
672
    #		 and by the necessity to block I/O while reconfiguring in the
673
    #		 event of a failure.
674
    #
675
    #		 There is an inherent race in the dmeventd failure handling
676
    #		 logic with snapshots of devices using this type of RAID1 that
677
    #		 in the worst case could cause a deadlock.
678
    #		   Ref: https://bugzilla.redhat.com/show_bug.cgi?id=817130#c10
679
    #
680
    # "raid1"  - This implementation leverages MD's RAID1 personality through
681
    # 	       	 device-mapper.  It is characterized by a lack of log options.
682
    #		 (A log is always allocated for every device and they are placed
683
    #		 on the same device as the image - no separate devices are
684
    #		 required.)  This mirror implementation does not require I/O
685
    #		 to be blocked in the kernel in the event of a failure.
686
    #		 This mirror implementation is not cluster-aware and cannot be
687
    #		 used in a shared (active/active) fashion in a cluster.
688
    #
689
    # Specify the '--type <mirror|raid1>' option to override this default
690
    # setting.
691
    mirror_segtype_default = "mirror"
692
 
693
    # 'raid10_segtype_default' determines the segment types used by default
694
    # when the '--stripes/-i' and '--mirrors/-m' arguments are both specified
695
    # during the creation of a logical volume.
696
    # Possible settings include:
697
    #
698
    # "raid10" - This implementation leverages MD's RAID10 personality through
699
    #            device-mapper.
700
    #
701
    # "mirror" - LVM will layer the 'mirror' and 'stripe' segment types.  It
702
    #            will do this by creating a mirror on top of striped sub-LVs;
703
    #            effectively creating a RAID 0+1 array.  This is suboptimal
8 - 704
    #            in terms of providing redundancy and performance. Changing to
3 - 705
    #            this setting is not advised.
706
    # Specify the '--type <raid10|mirror>' option to override this default
707
    # setting.
708
    raid10_segtype_default = "mirror"
709
 
33 - 710
    # 'sparse_segtype_default' defines which segtype will be used when the
711
    # shorthand '-V and -L' option is used for sparse volume creation.
712
    #
713
    # "snapshot" - The original snapshot implementation provided by LVM2/DM.
714
    #		   It is using old snashot that mixes data and metadata within
715
    #		   a single COW storage volume and has poor performs when
716
    #		   the size of stored data passes hundereds of MB.
717
    #
718
    # "thin"     - Newer implementation leverages thin provisioning target.
719
    #		   It has bigger minimal chunk size (64KiB) and uses separate volume
720
    #		   for metadata. It has better performance especially in case of
721
    #		   bigger data uses. This device type has also full snapshot support.
722
    #
723
    # Specify the '--type <snapshot|thin>' option to override this default
724
    # setting.
725
    sparse_segtype_default = "snapshot"
726
 
727
 
3 - 728
    # The default format for displaying LV names in lvdisplay was changed
729
    # in version 2.02.89 to show the LV name and path separately.
730
    # Previously this was always shown as /dev/vgname/lvname even when that
731
    # was never a valid path in the /dev filesystem.
732
    # Set to 1 to reinstate the previous format.
733
    #
734
    # lvdisplay_shows_full_device_path = 0
735
 
736
    # Whether to use (trust) a running instance of lvmetad. If this is set to
737
    # 0, all commands fall back to the usual scanning mechanisms. When set to 1
738
    # *and* when lvmetad is running (automatically instantiated by making use of
739
    # systemd's socket-based service activation or run as an initscripts service
740
    # or run manually), the volume group metadata and PV state flags are obtained
741
    # from the lvmetad instance and no scanning is done by the individual
742
    # commands. In a setup with lvmetad, lvmetad udev rules *must* be set up for
743
    # LVM to work correctly. Without proper udev rules, all changes in block
744
    # device configuration will be *ignored* until a manual 'pvscan --cache'
745
    # is performed. These rules are installed by default.
746
    #
747
    # If lvmetad has been running while use_lvmetad was 0, it MUST be stopped
748
    # before changing use_lvmetad to 1 and started again afterwards.
749
    #
33 - 750
    # If using lvmetad, volume activation is also switched to automatic
3 - 751
    # event-based mode. In this mode, the volumes are activated based on
33 - 752
    # incoming udev events that automatically inform lvmetad about new PVs that
753
    # appear in the system. Once a VG is complete (all the PVs are present), it
754
    # is auto-activated. The activation/auto_activation_volume_list setting
755
    # controls which volumes are auto-activated (all by default).
756
 
8 - 757
    # A note about device filtering while lvmetad is used:
33 - 758
 
759
    # When lvmetad is updated (either automatically based on udev events or
760
    # directly by a pvscan --cache <device> call), devices/filter is ignored and
761
    # all devices are scanned by default -- lvmetad always keeps unfiltered
762
    # information which is then provided to LVM commands and then each LVM
763
    # command does the filtering based on devices/filter setting itself.  This
764
    # does not apply to non-regexp filters though: component filters such as
765
    # multipath and MD are checked at pvscan --cache time.
766
 
767
    # In order to completely prevent LVM from scanning a device, even when using
768
    # lvmetad, devices/global_filter must be used.
769
 
8 - 770
    # N.B. Don't use lvmetad with locking type 3 as lvmetad is not yet
771
    # supported in clustered environment. If use_lvmetad=1 and locking_type=3
772
    # is set at the same time, LVM always issues a warning message about this
33 - 773
    # and then it automatically disables use_lvmetad.
774
 
3 - 775
    use_lvmetad = 0
776
 
777
    # Full path of the utility called to check that a thin metadata device
778
    # is in a state that allows it to be used.
779
    # Each time a thin pool needs to be activated or after it is deactivated
780
    # this utility is executed. The activation will only proceed if the utility
781
    # has an exit status of 0.
782
    # Set to "" to skip this check.  (Not recommended.)
783
    # The thin tools are available as part of the device-mapper-persistent-data
784
    # package from https://github.com/jthornber/thin-provisioning-tools.
785
    #
786
    # thin_check_executable = "/usr/sbin/thin_check"
787
 
788
    # Array of string options passed with thin_check command. By default,
789
    # option "-q" is for quiet output.
790
    # With thin_check version 2.1 or newer you can add "--ignore-non-fatal-errors"
8 - 791
    # to let it pass through ignorable errors and fix them later.
792
    # With thin_check version 3.2 or newer you should add
793
    # "--clear-needs-check-flag".
3 - 794
    #
8 - 795
    # thin_check_options = [ "-q", "--clear-needs-check-flag" ]
3 - 796
 
797
    # Full path of the utility called to repair a thin metadata device
798
    # is in a state that allows it to be used.
799
    # Each time a thin pool needs repair this utility is executed.
800
    # See thin_check_executable how to obtain binaries.
801
    #
802
    # thin_repair_executable = "/usr/sbin/thin_repair"
803
 
804
    # Array of extra string options passed with thin_repair command.
805
    # thin_repair_options = [ "" ]
806
 
807
    # Full path of the utility called to dump thin metadata content.
808
    # See thin_check_executable how to obtain binaries.
809
    #
810
    # thin_dump_executable = "/usr/sbin/thin_dump"
811
 
812
    # If set, given features are not used by thin driver.
813
    # This can be helpful not just for testing, but i.e. allows to avoid
814
    # using problematic implementation of some thin feature.
815
    # Features:
816
    #   block_size
817
    #   discards
818
    #   discards_non_power_2
819
    #   external_origin
820
    #   metadata_resize
8 - 821
    #   external_origin_extend
33 - 822
    #   error_if_no_space
3 - 823
    #
824
    # thin_disabled_features = [ "discards", "block_size" ]
8 - 825
 
826
    # Full path of the utility called to check that a cache metadata device
827
    # is in a state that allows it to be used.
828
    # Each time a cached LV needs to be used or after it is deactivated
829
    # this utility is executed. The activation will only proceed if the utility
830
    # has an exit status of 0.
831
    # Set to "" to skip this check.  (Not recommended.)
832
    # The cache tools are available as part of the device-mapper-persistent-data
833
    # package from https://github.com/jthornber/thin-provisioning-tools.
834
    #
835
    # cache_check_executable = "/usr/sbin/cache_check"
836
 
837
    # Array of string options passed with cache_check command. By default,
838
    # option "-q" is for quiet output.
839
    #
840
    # cache_check_options = [ "-q" ]
841
 
842
    # Full path of the utility called to repair a cache metadata device.
843
    # Each time a cache metadata needs repair this utility is executed.
844
    # See cache_check_executable how to obtain binaries.
845
    #
846
    # cache_repair_executable = "/usr/sbin/cache_repair"
847
 
848
    # Array of extra string options passed with cache_repair command.
849
    # cache_repair_options = [ "" ]
850
 
851
    # Full path of the utility called to dump cache metadata content.
852
    # See cache_check_executable how to obtain binaries.
853
    #
854
    # cache_dump_executable = "/usr/sbin/cache_dump"
33 - 855
 
856
    # The method, if any, used to define a local system ID on this host.
857
    # By placing the same system ID on a Volume Group you can prevent
858
    # other co-operating hosts that see the same storage devices (each
859
    # with a different system ID) from accessing the same Volume Group.
860
    #
861
    # Set this to one of: none, machineid, uname, lvmlocal, or file.
862
    #
863
    # N.B. Do not use this feature without reading 'man lvmsystemid' to
864
    # understand the correct ways to use it and its limitations.
865
    #
866
    # system_id_source = "none"
867
    #
868
    # Obtain the system ID from the "system_id" setting in the "local"
869
    # section of a configuration file such as /etc/lvm/lvmlocal.conf.
870
    #
871
    # system_id_source = "lvmlocal"
872
    #
873
    # Set the system ID from the hostname of the system.
874
    # System IDs beginning "localhost" are not permitted.
875
    #
876
    # system_id_source = "uname"
877
    #
878
    # Use the contents of the file /etc/lvm/machine-id
879
    # to set the system ID.  Some systems create this file at
880
    # installation time - see 'man machine-id'.
881
    #
882
    # system_id_source = "machineid"
883
    #
884
    # Use the contents of an alternative file to set the system ID.
885
    # Comments starting with the character # are ignored.
886
    #
887
    # system_id_source = "file"
888
    # system_id_file = "/etc/systemid"
3 - 889
}
890
 
891
activation {
892
    # Set to 1 to perform internal checks on the operations issued to
893
    # libdevmapper.  Useful for debugging problems with activation.
894
    # Some of the checks may be expensive, so it's best to use this
895
    # only when there seems to be a problem.
896
    checks = 0
897
 
898
    # Set to 0 to disable udev synchronisation (if compiled into the binaries).
899
    # Processes will not wait for notification from udev.
900
    # They will continue irrespective of any possible udev processing
901
    # in the background.  You should only use this if udev is not running
902
    # or has rules that ignore the devices LVM2 creates.
903
    # The command line argument --nodevsync takes precedence over this setting.
904
    # If set to 1 when udev is not running, and there are LVM2 processes
905
    # waiting for udev, run 'dmsetup udevcomplete_all' manually to wake them up.
906
    udev_sync = 1
907
 
908
    # Set to 0 to disable the udev rules installed by LVM2 (if built with
909
    # --enable-udev_rules). LVM2 will then manage the /dev nodes and symlinks
910
    # for active logical volumes directly itself.
911
    # N.B. Manual intervention may be required if this setting is changed
912
    # while any logical volumes are active.
913
    udev_rules = 1
914
 
915
    # Set to 1 for LVM2 to verify operations performed by udev. This turns on
916
    # additional checks (and if necessary, repairs) on entries in the device
917
    # directory after udev has completed processing its events.
918
    # Useful for diagnosing problems with LVM2/udev interactions.
919
    verify_udev_operations = 0
920
 
921
    # If set to 1 and if deactivation of an LV fails, perhaps because
922
    # a process run from a quick udev rule temporarily opened the device,
923
    # retry the operation for a few seconds before failing.
924
    retry_deactivation = 1
925
 
926
    # How to fill in missing stripes if activating an incomplete volume.
927
    # Using "error" will make inaccessible parts of the device return
928
    # I/O errors on access.  You can instead use a device path, in which
929
    # case, that device will be used to in place of missing stripes.
930
    # But note that using anything other than "error" with mirrored
931
    # or snapshotted volumes is likely to result in data corruption.
932
    missing_stripe_filler = "error"
933
 
934
    # The linear target is an optimised version of the striped target
935
    # that only handles a single stripe.  Set this to 0 to disable this
936
    # optimisation and always use the striped target.
937
    use_linear_target = 1
938
 
939
    # How much stack (in KB) to reserve for use while devices suspended
940
    # Prior to version 2.02.89 this used to be set to 256KB
941
    reserved_stack = 64
942
 
943
    # How much memory (in KB) to reserve for use while devices suspended
944
    reserved_memory = 8192
945
 
946
    # Nice value used while devices suspended
947
    process_priority = -18
948
 
949
    # If volume_list is defined, each LV is only activated if there is a
950
    # match against the list.
951
    #
952
    #   "vgname" and "vgname/lvname" are matched exactly.
953
    #   "@tag" matches any tag set in the LV or VG.
954
    #   "@*" matches if any tag defined on the host is also set in the LV or VG
955
    #
956
    # If any host tags exist but volume_list is not defined, a default
957
    # single-entry list containing "@*" is assumed.
958
    #
959
    # volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
960
 
961
    # If auto_activation_volume_list is defined, each LV that is to be
962
    # activated with the autoactivation option (--activate ay/-a ay) is
963
    # first checked against the list. There are two scenarios in which
964
    # the autoactivation option is used:
965
    #
966
    #   - automatic activation of volumes based on incoming PVs. If all the
967
    #     PVs making up a VG are present in the system, the autoactivation
968
    #     is triggered. This requires lvmetad (global/use_lvmetad=1) and udev
969
    #     to be running. In this case, "pvscan --cache -aay" is called
970
    #     automatically without any user intervention while processing
971
    #     udev events. Please, make sure you define auto_activation_volume_list
972
    #     properly so only the volumes you want and expect are autoactivated.
973
    #
974
    #   - direct activation on command line with the autoactivation option.
975
    #     In this case, the user calls "vgchange --activate ay/-a ay" or
976
    #     "lvchange --activate ay/-a ay" directly.
977
    #
978
    # By default, the auto_activation_volume_list is not defined and all
979
    # volumes will be activated either automatically or by using --activate ay/-a ay.
980
    #
981
    # N.B. The "activation/volume_list" is still honoured in all cases so even
982
    # if the VG/LV passes the auto_activation_volume_list, it still needs to
983
    # pass the volume_list for it to be activated in the end.
984
 
985
    # If auto_activation_volume_list is defined but empty, no volumes will be
986
    # activated automatically and --activate ay/-a ay will do nothing.
987
    #
988
    # auto_activation_volume_list = []
989
 
990
    # If auto_activation_volume_list is defined and it's not empty, only matching
991
    # volumes will be activated either automatically or by using --activate ay/-a ay.
992
    #
993
    #   "vgname" and "vgname/lvname" are matched exactly.
994
    #   "@tag" matches any tag set in the LV or VG.
995
    #   "@*" matches if any tag defined on the host is also set in the LV or VG
996
    #
997
    # auto_activation_volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
998
 
999
    # If read_only_volume_list is defined, each LV that is to be activated
33 - 1000
    # is checked against the list, and if it matches, it is activated
3 - 1001
    # in read-only mode.  (This overrides '--permission rw' stored in the
1002
    # metadata.)
1003
    #
1004
    #   "vgname" and "vgname/lvname" are matched exactly.
1005
    #   "@tag" matches any tag set in the LV or VG.
1006
    #   "@*" matches if any tag defined on the host is also set in the LV or VG
1007
    #
1008
    # read_only_volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
1009
 
1010
    # Each LV can have an 'activation skip' flag stored persistently against it.
1011
    # During activation, this flag is used to decide whether such an LV is skipped.
1012
    # The 'activation skip' flag can be set during LV creation and by default it
1013
    # is automatically set for thin snapshot LVs. The 'auto_set_activation_skip'
1014
    # enables or disables this automatic setting of the flag while LVs are created.
1015
    # auto_set_activation_skip = 1
1016
 
33 - 1017
    # Control error behavior when provisioned device becomes full.  This
1018
    # determines the default --errorwhenfull setting of new thin pools.
1019
    # The command line option --errorwhenfull takes precedence over this
1020
    # setting.  error_when_full 0 means --errorwhenfull n.
1021
    #
1022
    # error_when_full = 0
1023
 
3 - 1024
    # For RAID or 'mirror' segment types, 'raid_region_size' is the
8 - 1025
    # size (in KiB) of each:
3 - 1026
    # - synchronization operation when initializing
1027
    # - each copy operation when performing a 'pvmove' (using 'mirror' segtype)
1028
    # This setting has replaced 'mirror_region_size' since version 2.02.99
1029
    raid_region_size = 512
1030
 
1031
    # Setting to use when there is no readahead value stored in the metadata.
1032
    #
1033
    # "none" - Disable readahead.
1034
    # "auto" - Use default value chosen by kernel.
1035
    readahead = "auto"
1036
 
1037
    # 'raid_fault_policy' defines how a device failure in a RAID logical
1038
    # volume is handled.  This includes logical volumes that have the following
1039
    # segment types: raid1, raid4, raid5*, and raid6*.
1040
    #
1041
    # In the event of a failure, the following policies will determine what
1042
    # actions are performed during the automated response to failures (when
1043
    # dmeventd is monitoring the RAID logical volume) and when 'lvconvert' is
1044
    # called manually with the options '--repair' and '--use-policies'.
1045
    #
1046
    # "warn"	- Use the system log to warn the user that a device in the RAID
1047
    # 		  logical volume has failed.  It is left to the user to run
1048
    #		  'lvconvert --repair' manually to remove or replace the failed
1049
    #		  device.  As long as the number of failed devices does not
1050
    #		  exceed the redundancy of the logical volume (1 device for
1051
    #		  raid4/5, 2 for raid6, etc) the logical volume will remain
1052
    #		  usable.
1053
    #
1054
    # "allocate" - Attempt to use any extra physical volumes in the volume
1055
    # 		  group as spares and replace faulty devices.
1056
    #
1057
    raid_fault_policy = "warn"
1058
 
1059
    # 'mirror_image_fault_policy' and 'mirror_log_fault_policy' define
1060
    # how a device failure affecting a mirror (of "mirror" segment type) is
1061
    # handled.  A mirror is composed of mirror images (copies) and a log.
1062
    # A disk log ensures that a mirror does not need to be re-synced
1063
    # (all copies made the same) every time a machine reboots or crashes.
1064
    #
1065
    # In the event of a failure, the specified policy will be used to determine
1066
    # what happens. This applies to automatic repairs (when the mirror is being
1067
    # monitored by dmeventd) and to manual lvconvert --repair when
1068
    # --use-policies is given.
1069
    #
1070
    # "remove" - Simply remove the faulty device and run without it.  If
1071
    #            the log device fails, the mirror would convert to using
1072
    #            an in-memory log.  This means the mirror will not
1073
    #            remember its sync status across crashes/reboots and
1074
    #            the entire mirror will be re-synced.  If a
1075
    #            mirror image fails, the mirror will convert to a
1076
    #            non-mirrored device if there is only one remaining good
1077
    #            copy.
1078
    #
1079
    # "allocate" - Remove the faulty device and try to allocate space on
1080
    #            a new device to be a replacement for the failed device.
1081
    #            Using this policy for the log is fast and maintains the
1082
    #            ability to remember sync state through crashes/reboots.
1083
    #            Using this policy for a mirror device is slow, as it
1084
    #            requires the mirror to resynchronize the devices, but it
1085
    #            will preserve the mirror characteristic of the device.
1086
    #            This policy acts like "remove" if no suitable device and
1087
    #            space can be allocated for the replacement.
1088
    #
1089
    # "allocate_anywhere" - Not yet implemented. Useful to place the log device
1090
    #            temporarily on same physical volume as one of the mirror
1091
    #            images. This policy is not recommended for mirror devices
1092
    #            since it would break the redundant nature of the mirror. This
1093
    #            policy acts like "remove" if no suitable device and space can
1094
    #            be allocated for the replacement.
1095
 
1096
    mirror_log_fault_policy = "allocate"
1097
    mirror_image_fault_policy = "remove"
1098
 
1099
    # 'snapshot_autoextend_threshold' and 'snapshot_autoextend_percent' define
1100
    # how to handle automatic snapshot extension. The former defines when the
1101
    # snapshot should be extended: when its space usage exceeds this many
1102
    # percent. The latter defines how much extra space should be allocated for
1103
    # the snapshot, in percent of its current size.
1104
    #
1105
    # For example, if you set snapshot_autoextend_threshold to 70 and
1106
    # snapshot_autoextend_percent to 20, whenever a snapshot exceeds 70% usage,
1107
    # it will be extended by another 20%. For a 1G snapshot, using up 700M will
1108
    # trigger a resize to 1.2G. When the usage exceeds 840M, the snapshot will
1109
    # be extended to 1.44G, and so on.
1110
    #
1111
    # Setting snapshot_autoextend_threshold to 100 disables automatic
1112
    # extensions. The minimum value is 50 (A setting below 50 will be treated
1113
    # as 50).
1114
 
1115
    snapshot_autoextend_threshold = 100
1116
    snapshot_autoextend_percent = 20
1117
 
1118
    # 'thin_pool_autoextend_threshold' and 'thin_pool_autoextend_percent' define
1119
    # how to handle automatic pool extension. The former defines when the
1120
    # pool should be extended: when its space usage exceeds this many
1121
    # percent. The latter defines how much extra space should be allocated for
1122
    # the pool, in percent of its current size.
1123
    #
1124
    # For example, if you set thin_pool_autoextend_threshold to 70 and
1125
    # thin_pool_autoextend_percent to 20, whenever a pool exceeds 70% usage,
1126
    # it will be extended by another 20%. For a 1G pool, using up 700M will
1127
    # trigger a resize to 1.2G. When the usage exceeds 840M, the pool will
1128
    # be extended to 1.44G, and so on.
1129
    #
1130
    # Setting thin_pool_autoextend_threshold to 100 disables automatic
1131
    # extensions. The minimum value is 50 (A setting below 50 will be treated
1132
    # as 50).
1133
 
1134
    thin_pool_autoextend_threshold = 100
1135
    thin_pool_autoextend_percent = 20
1136
 
1137
    # While activating devices, I/O to devices being (re)configured is
1138
    # suspended, and as a precaution against deadlocks, LVM2 needs to pin
1139
    # any memory it is using so it is not paged out.  Groups of pages that
1140
    # are known not to be accessed during activation need not be pinned
1141
    # into memory.  Each string listed in this setting is compared against
1142
    # each line in /proc/self/maps, and the pages corresponding to any
1143
    # lines that match are not pinned.  On some systems locale-archive was
1144
    # found to make up over 80% of the memory used by the process.
1145
    # mlock_filter = [ "locale/locale-archive", "gconv/gconv-modules.cache" ]
1146
 
1147
    # Set to 1 to revert to the default behaviour prior to version 2.02.62
1148
    # which used mlockall() to pin the whole process's memory while activating
1149
    # devices.
1150
    use_mlockall = 0
1151
 
1152
    # Monitoring is enabled by default when activating logical volumes.
1153
    # Set to 0 to disable monitoring or use the --ignoremonitoring option.
1154
    monitoring = 1
1155
 
1156
    # When pvmove or lvconvert must wait for the kernel to finish
1157
    # synchronising or merging data, they check and report progress
1158
    # at intervals of this number of seconds.  The default is 15 seconds.
1159
    # If this is set to 0 and there is only one thing to wait for, there
1160
    # are no progress reports, but the process is awoken immediately the
1161
    # operation is complete.
1162
    polling_interval = 15
8 - 1163
 
1164
    # 'activation_mode' determines how Logical Volumes are activated if
1165
    # any devices are missing.  Possible settings are:
1166
    #
1167
    #	"complete" -  Only allow activation of an LV if all of the Physical
1168
    #		      Volumes it uses are present.  Other PVs in the Volume
1169
    #		      Group may be missing.
1170
    #
1171
    #	"degraded" -  Like "complete", but additionally RAID Logical Volumes of
1172
    #		      segment type raid1, raid4, raid5, radid6 and raid10 will
1173
    #		      be activated if there is no data loss, i.e. they have
1174
    #		      sufficient redundancy to present the entire addressable
1175
    #		      range of the Logical Volume.
1176
    #
1177
    #	"partial"  -  Allows the activation of any Logical Volume even if
1178
    #		      a missing or failed PV could cause data loss with a
1179
    #		      portion of the Logical Volume inaccessible.
1180
    #		      This setting should not normally be used, but may
1181
    #		      sometimes assist with data recovery.
1182
    #
1183
    # This setting was introduced in LVM version 2.02.108.  It corresponds
1184
    # with the '--activationmode' option for lvchange and vgchange.
1185
    activation_mode = "degraded"
3 - 1186
}
1187
 
8 - 1188
# Report settings.
1189
#
1190
# report {
33 - 1191
    # If compact output is enabled, fields which don't have value
1192
    # set for any of the rows reported are skipped on output. Compact
1193
    # output is applicable only if report is buffered (report/buffered=1).
1194
    # compact_output=0
1195
 
8 - 1196
    # Align columns on report output.
1197
    # aligned=1
3 - 1198
 
8 - 1199
    # When buffered reporting is used, the report's content is appended
1200
    # incrementally to include each object being reported until the report
1201
    # is flushed to output which normally happens at the end of command
1202
    # execution. Otherwise, if buffering is not used, each object is
1203
    # reported as soon as its processing is finished.
1204
    # buffered=1
1205
 
1206
    # Show headings for columns on report.
1207
    # headings=1
1208
 
1209
    # A separator to use on report after each field.
1210
    # separator=" "
1211
 
1212
    # A separator to use for list items when reported.
1213
    # list_item_separator=","
1214
 
1215
    # Use a field name prefix for each field reported.
1216
    # prefixes=0
1217
 
1218
    # Quote field values when using field name prefixes.
1219
    # quoted=1
1220
 
1221
    # Output each column as a row. If set, this also implies report/prefixes=1.
1222
    # colums_as_rows=0
1223
 
1224
    # Use binary values "0" or "1" instead of descriptive literal values for
1225
    # columns that have exactly two valid values to report (not counting the
1226
    # "unknown" value which denotes that the value could not be determined).
1227
    #
1228
    # binary_values_as_numeric = 0
1229
 
1230
    # Comma separated list of columns to sort by when reporting 'lvm devtypes' command.
1231
    # See 'lvm devtypes -o help' for the list of possible fields.
1232
    # devtypes_sort="devtype_name"
1233
 
1234
    # Comma separated list of columns to report for 'lvm devtypes' command.
1235
    # See 'lvm devtypes -o help' for the list of possible fields.
1236
    # devtypes_cols="devtype_name,devtype_max_partitions,devtype_description"
1237
 
1238
    # Comma separated list of columns to report for 'lvm devtypes' command in verbose mode.
1239
    # See 'lvm devtypes -o help' for the list of possible fields.
1240
    # devtypes_cols_verbose="devtype_name,devtype_max_partitions,devtype_description"
1241
 
1242
    # Comma separated list of columns to sort by when reporting 'lvs' command.
1243
    # See 'lvs -o help' for the list of possible fields.
1244
    # lvs_sort="vg_name,lv_name"
1245
 
1246
    # Comma separated list of columns to report for 'lvs' command.
1247
    # See 'lvs -o help' for the list of possible fields.
1248
    # lvs_cols="lv_name,vg_name,lv_attr,lv_size,pool_lv,origin,data_percent,metadata_percent,move_pv,mirror_log,copy_percent,convert_lv"
1249
 
1250
    # Comma separated list of columns to report for 'lvs' command in verbose mode.
1251
    # See 'lvs -o help' for the list of possible fields.
1252
    # lvs_cols_verbose="lv_name,vg_name,seg_count,lv_attr,lv_size,lv_major,lv_minor,lv_kernel_major,lv_kernel_minor,pool_lv,origin,data_percent,metadata_percent,move_pv,copy_percent,mirror_log,convert
1253
 
1254
    # Comma separated list of columns to sort by when reporting 'vgs' command.
1255
    # See 'vgs -o help' for the list of possible fields.
1256
    # vgs_sort="vg_name"
1257
 
1258
    # Comma separated list of columns to report for 'vgs' command.
1259
    # See 'vgs -o help' for the list of possible fields.
1260
    # vgs_cols="vg_name,pv_count,lv_count,snap_count,vg_attr,vg_size,vg_free"
1261
 
1262
    # Comma separated list of columns to report for 'vgs' command in verbose mode.
1263
    # See 'vgs -o help' for the list of possible fields.
1264
    # vgs_cols_verbose="vg_name,vg_attr,vg_extent_size,pv_count,lv_count,snap_count,vg_size,vg_free,vg_uuid,vg_profile"
1265
 
1266
    # Comma separated list of columns to sort by when reporting 'pvs' command.
1267
    # See 'pvs -o help' for the list of possible fields.
1268
    # pvs_sort="pv_name"
1269
 
1270
    # Comma separated list of columns to report for 'pvs' command.
1271
    # See 'pvs -o help' for the list of possible fields.
1272
    # pvs_cols="pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free"
1273
 
1274
    # Comma separated list of columns to report for 'pvs' command in verbose mode.
1275
    # See 'pvs -o help' for the list of possible fields.
1276
    # pvs_cols_verbose="pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free,dev_size,pv_uuid"
1277
 
1278
    # Comma separated list of columns to sort by when reporting 'lvs --segments' command.
1279
    # See 'lvs --segments -o help' for the list of possible fields.
1280
    # segs_sort="vg_name,lv_name,seg_start"
1281
 
1282
    # Comma separated list of columns to report for 'lvs --segments' command.
1283
    # See 'lvs --segments  -o help' for the list of possible fields.
1284
    # segs_cols="lv_name,vg_name,lv_attr,stripes,segtype,seg_size"
1285
 
1286
    # Comma separated list of columns to report for 'lvs --segments' command in verbose mode.
1287
    # See 'lvs --segments -o help' for the list of possible fields.
1288
    # segs_cols_verbose="lv_name,vg_name,lv_attr,seg_start,seg_size,stripes,segtype,stripesize,chunksize"
1289
 
1290
    # Comma separated list of columns to sort by when reporting 'pvs --segments' command.
1291
    # See 'pvs --segments -o help' for the list of possible fields.
1292
    # pvsegs_sort="pv_name,pvseg_start"
1293
 
1294
    # Comma separated list of columns to sort by when reporting 'pvs --segments' command.
1295
    # See 'pvs --segments -o help' for the list of possible fields.
1296
    # pvsegs_cols="pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free,pvseg_start,pvseg_size"
1297
 
1298
    # Comma separated list of columns to sort by when reporting 'pvs --segments' command in verbose mode.
1299
    # See 'pvs --segments -o help' for the list of possible fields.
1300
    # pvsegs_cols_verbose="pv_name,vg_name,pv_fmt,pv_attr,pv_size,pv_free,pvseg_start,pvseg_size,lv_name,seg_start_pe,segtype,seg_pe_ranges"
1301
#}
1302
 
3 - 1303
####################
1304
# Advanced section #
1305
####################
1306
 
1307
# Metadata settings
1308
#
1309
# metadata {
1310
    # Default number of copies of metadata to hold on each PV.  0, 1 or 2.
1311
    # You might want to override it from the command line with 0
1312
    # when running pvcreate on new PVs which are to be added to large VGs.
1313
 
1314
    # pvmetadatacopies = 1
1315
 
1316
    # Default number of copies of metadata to maintain for each VG.
1317
    # If set to a non-zero value, LVM automatically chooses which of
1318
    # the available metadata areas to use to achieve the requested
1319
    # number of copies of the VG metadata.  If you set a value larger
1320
    # than the the total number of metadata areas available then
1321
    # metadata is stored in them all.
1322
    # The default value of 0 ("unmanaged") disables this automatic
1323
    # management and allows you to control which metadata areas
1324
    # are used at the individual PV level using 'pvchange
1325
    # --metadataignore y/n'.
1326
 
1327
    # vgmetadatacopies = 0
1328
 
1329
    # Approximate default size of on-disk metadata areas in sectors.
1330
    # You should increase this if you have large volume groups or
1331
    # you want to retain a large on-disk history of your metadata changes.
1332
 
1333
    # pvmetadatasize = 255
1334
 
1335
    # List of directories holding live copies of text format metadata.
1336
    # These directories must not be on logical volumes!
1337
    # It's possible to use LVM2 with a couple of directories here,
1338
    # preferably on different (non-LV) filesystems, and with no other
1339
    # on-disk metadata (pvmetadatacopies = 0). Or this can be in
1340
    # addition to on-disk metadata areas.
1341
    # The feature was originally added to simplify testing and is not
1342
    # supported under low memory situations - the machine could lock up.
1343
    #
1344
    # Never edit any files in these directories by hand unless you
1345
    # you are absolutely sure you know what you are doing! Use
1346
    # the supplied toolset to make changes (e.g. vgcfgrestore).
1347
 
1348
    # dirs = [ "/etc/lvm/metadata", "/mnt/disk2/lvm/metadata2" ]
1349
#}
1350
 
1351
# Event daemon
1352
#
1353
dmeventd {
1354
    # mirror_library is the library used when monitoring a mirror device.
1355
    #
1356
    # "libdevmapper-event-lvm2mirror.so" attempts to recover from
1357
    # failures.  It removes failed devices from a volume group and
1358
    # reconfigures a mirror as necessary. If no mirror library is
1359
    # provided, mirrors are not monitored through dmeventd.
1360
 
1361
    mirror_library = "libdevmapper-event-lvm2mirror.so"
1362
 
1363
    # snapshot_library is the library used when monitoring a snapshot device.
1364
    #
1365
    # "libdevmapper-event-lvm2snapshot.so" monitors the filling of
1366
    # snapshots and emits a warning through syslog when the use of
1367
    # the snapshot exceeds 80%. The warning is repeated when 85%, 90% and
1368
    # 95% of the snapshot is filled.
1369
 
1370
    snapshot_library = "libdevmapper-event-lvm2snapshot.so"
1371
 
1372
    # thin_library is the library used when monitoring a thin device.
1373
    #
1374
    # "libdevmapper-event-lvm2thin.so" monitors the filling of
1375
    # pool and emits a warning through syslog when the use of
1376
    # the pool exceeds 80%. The warning is repeated when 85%, 90% and
1377
    # 95% of the pool is filled.
1378
 
1379
    thin_library = "libdevmapper-event-lvm2thin.so"
1380
 
1381
    # Full path of the dmeventd binary.
1382
    #
1383
    # executable = "/sbin/dmeventd"
1384
}