~brightbox/ubuntu/raring/lvm2/fix-for-1076304

« back to all changes in this revision

Viewing changes to doc/example.conf

  • Committer: Bazaar Package Importer
  • Author(s): Bastian Blank
  • Date: 2010-06-04 11:47:51 UTC
  • mto: (1.3.1 upstream) (3.1.11 sid)
  • mto: This revision was merged to the branch mainline in revision 54.
  • Revision ID: james.westby@ubuntu.com-20100604114751-suf9sag0lbcpsc2s
ImportĀ upstreamĀ versionĀ 2.02.66

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
 
 
11
 
# This section allows you to configure which block devices should
12
 
# be used by the LVM system.
13
 
devices {
14
 
 
15
 
    # Where do you want your volume groups to appear ?
16
 
    dir = "/dev"
17
 
 
18
 
    # An array of directories that contain the device nodes you wish
19
 
    # to use with LVM2.
20
 
    scan = [ "/dev" ]
21
 
 
22
 
    # If several entries in the scanned directories correspond to the
23
 
    # same block device and the tools need to display a name for device,
24
 
    # all the pathnames are matched against each item in the following
25
 
    # list of regular expressions in turn and the first match is used.
26
 
    preferred_names = [ ]
27
 
 
28
 
    # Try to avoid using undescriptive /dev/dm-N names, if present.
29
 
    # preferred_names = [ "^/dev/mpath/", "^/dev/mapper/mpath", "^/dev/[hs]d" ]
30
 
 
31
 
    # A filter that tells LVM2 to only use a restricted set of devices.
32
 
    # The filter consists of an array of regular expressions.  These
33
 
    # expressions can be delimited by a character of your choice, and
34
 
    # prefixed with either an 'a' (for accept) or 'r' (for reject).
35
 
    # The first expression found to match a device name determines if
36
 
    # the device will be accepted or rejected (ignored).  Devices that
37
 
    # don't match any patterns are accepted.
38
 
 
39
 
    # Be careful if there there are symbolic links or multiple filesystem 
40
 
    # entries for the same device as each name is checked separately against
41
 
    # the list of patterns.  The effect is that if any name matches any 'a'
42
 
    # pattern, the device is accepted; otherwise if any name matches any 'r'
43
 
    # pattern it is rejected; otherwise it is accepted.
44
 
 
45
 
    # Don't have more than one filter line active at once: only one gets used.
46
 
 
47
 
    # Run vgscan after you change this parameter to ensure that
48
 
    # the cache file gets regenerated (see below).
49
 
    # If it doesn't do what you expect, check the output of 'vgscan -vvvv'.
50
 
 
51
 
 
52
 
    # By default we accept every block device:
53
 
    filter = [ "a/.*/" ]
54
 
 
55
 
    # Exclude the cdrom drive
56
 
    # filter = [ "r|/dev/cdrom|" ]
57
 
 
58
 
    # When testing I like to work with just loopback devices:
59
 
    # filter = [ "a/loop/", "r/.*/" ]
60
 
 
61
 
    # Or maybe all loops and ide drives except hdc:
62
 
    # filter =[ "a|loop|", "r|/dev/hdc|", "a|/dev/ide|", "r|.*|" ]
63
 
 
64
 
    # Use anchors if you want to be really specific
65
 
    # filter = [ "a|^/dev/hda8$|", "r/.*/" ]
66
 
 
67
 
    # The results of the filtering are cached on disk to avoid
68
 
    # rescanning dud devices (which can take a very long time).
69
 
    # By default this cache is stored in the /etc/lvm/cache directory
70
 
    # in a file called '.cache'.
71
 
    # It is safe to delete the contents: the tools regenerate it.
72
 
    # (The old setting 'cache' is still respected if neither of
73
 
    # these new ones is present.)
74
 
    cache_dir = "/etc/lvm/cache"
75
 
    cache_file_prefix = ""
76
 
 
77
 
    # You can turn off writing this cache file by setting this to 0.
78
 
    write_cache_state = 1
79
 
 
80
 
    # Advanced settings.
81
 
 
82
 
    # List of pairs of additional acceptable block device types found 
83
 
    # in /proc/devices with maximum (non-zero) number of partitions.
84
 
    # types = [ "fd", 16 ]
85
 
 
86
 
    # If sysfs is mounted (2.6 kernels) restrict device scanning to 
87
 
    # the block devices it believes are valid.
88
 
    # 1 enables; 0 disables.
89
 
    sysfs_scan = 1
90
 
 
91
 
    # By default, LVM2 will ignore devices used as components of
92
 
    # software RAID (md) devices by looking for md superblocks.
93
 
    # 1 enables; 0 disables.
94
 
    md_component_detection = 1
95
 
 
96
 
    # By default, if a PV is placed directly upon an md device, LVM2
97
 
    # will align its data blocks with the md device's stripe-width.
98
 
    # 1 enables; 0 disables.
99
 
    md_chunk_alignment = 1
100
 
 
101
 
    # By default, the start of a PV's data area will be a multiple of
102
 
    # the 'minimum_io_size' or 'optimal_io_size' exposed in sysfs.
103
 
    # - minimum_io_size - the smallest request the device can perform
104
 
    #   w/o incurring a read-modify-write penalty (e.g. MD's chunk size)
105
 
    # - optimal_io_size - the device's preferred unit of receiving I/O
106
 
    #   (e.g. MD's stripe width)
107
 
    # minimum_io_size is used if optimal_io_size is undefined (0).
108
 
    # If md_chunk_alignment is enabled, that detects the optimal_io_size.
109
 
    # This setting takes precedence over md_chunk_alignment.
110
 
    # 1 enables; 0 disables.
111
 
    data_alignment_detection = 1
112
 
 
113
 
    # Alignment (in KB) of start of data area when creating a new PV.
114
 
    # If a PV is placed directly upon an md device and md_chunk_alignment or
115
 
    # data_alignment_detection is enabled this parameter is ignored.
116
 
    # Set to 0 for the default alignment of 64KB or page size, if larger.
117
 
    data_alignment = 0
118
 
 
119
 
    # By default, the start of the PV's aligned data area will be shifted by
120
 
    # the 'alignment_offset' exposed in sysfs.  This offset is often 0 but
121
 
    # may be non-zero; e.g.: certain 4KB sector drives that compensate for
122
 
    # windows partitioning will have an alignment_offset of 3584 bytes
123
 
    # (sector 7 is the lowest aligned logical block, the 4KB sectors start
124
 
    # at LBA -1, and consequently sector 63 is aligned on a 4KB boundary).
125
 
    # 1 enables; 0 disables.
126
 
    data_alignment_offset_detection = 1
127
 
 
128
 
    # If, while scanning the system for PVs, LVM2 encounters a device-mapper
129
 
    # device that has its I/O suspended, it waits for it to become accessible.
130
 
    # Set this to 1 to skip such devices.  This should only be needed
131
 
    # in recovery situations.
132
 
    ignore_suspended_devices = 0
133
 
}
134
 
 
135
 
# This section that allows you to configure the nature of the
136
 
# information that LVM2 reports.
137
 
log {
138
 
 
139
 
    # Controls the messages sent to stdout or stderr.
140
 
    # There are three levels of verbosity, 3 being the most verbose.
141
 
    verbose = 0
142
 
 
143
 
    # Should we send log messages through syslog?
144
 
    # 1 is yes; 0 is no.
145
 
    syslog = 1
146
 
 
147
 
    # Should we log error and debug messages to a file?
148
 
    # By default there is no log file.
149
 
    #file = "/var/log/lvm2.log"
150
 
 
151
 
    # Should we overwrite the log file each time the program is run?
152
 
    # By default we append.
153
 
    overwrite = 0
154
 
 
155
 
    # What level of log messages should we send to the log file and/or syslog?
156
 
    # There are 6 syslog-like log levels currently in use - 2 to 7 inclusive.
157
 
    # 7 is the most verbose (LOG_DEBUG).
158
 
    level = 0
159
 
 
160
 
    # Format of output messages
161
 
    # Whether or not (1 or 0) to indent messages according to their severity
162
 
    indent = 1
163
 
 
164
 
    # Whether or not (1 or 0) to display the command name on each line output
165
 
    command_names = 0
166
 
 
167
 
    # A prefix to use before the message text (but after the command name,
168
 
    # if selected).  Default is two spaces, so you can see/grep the severity
169
 
    # of each message.
170
 
    prefix = "  "
171
 
 
172
 
    # To make the messages look similar to the original LVM tools use:
173
 
    #   indent = 0
174
 
    #   command_names = 1
175
 
    #   prefix = " -- "
176
 
 
177
 
    # Set this if you want log messages during activation.
178
 
    # Don't use this in low memory situations (can deadlock).
179
 
    # activation = 0
180
 
}
181
 
 
182
 
# Configuration of metadata backups and archiving.  In LVM2 when we
183
 
# talk about a 'backup' we mean making a copy of the metadata for the
184
 
# *current* system.  The 'archive' contains old metadata configurations.
185
 
# Backups are stored in a human readeable text format.
186
 
backup {
187
 
 
188
 
    # Should we maintain a backup of the current metadata configuration ?
189
 
    # Use 1 for Yes; 0 for No.
190
 
    # Think very hard before turning this off!
191
 
    backup = 1
192
 
 
193
 
    # Where shall we keep it ?
194
 
    # Remember to back up this directory regularly!
195
 
    backup_dir = "/etc/lvm/backup"
196
 
 
197
 
    # Should we maintain an archive of old metadata configurations.
198
 
    # Use 1 for Yes; 0 for No.
199
 
    # On by default.  Think very hard before turning this off.
200
 
    archive = 1
201
 
 
202
 
    # Where should archived files go ?
203
 
    # Remember to back up this directory regularly!
204
 
    archive_dir = "/etc/lvm/archive"
205
 
 
206
 
    # What is the minimum number of archive files you wish to keep ?
207
 
    retain_min = 10
208
 
 
209
 
    # What is the minimum time you wish to keep an archive file for ?
210
 
    retain_days = 30
211
 
}
212
 
 
213
 
# Settings for the running LVM2 in shell (readline) mode.
214
 
shell {
215
 
 
216
 
    # Number of lines of history to store in ~/.lvm_history
217
 
    history_size = 100
218
 
}
219
 
 
220
 
 
221
 
# Miscellaneous global LVM2 settings
222
 
global {
223
 
 
224
 
    # The file creation mask for any files and directories created.
225
 
    # Interpreted as octal if the first digit is zero.
226
 
    umask = 077
227
 
 
228
 
    # Allow other users to read the files
229
 
    #umask = 022
230
 
 
231
 
    # Enabling test mode means that no changes to the on disk metadata
232
 
    # will be made.  Equivalent to having the -t option on every
233
 
    # command.  Defaults to off.
234
 
    test = 0
235
 
 
236
 
    # Default value for --units argument
237
 
    units = "h"
238
 
 
239
 
    # Since version 2.02.54, the tools distinguish between powers of
240
 
    # 1024 bytes (e.g. KiB, MiB, GiB) and powers of 1000 bytes (e.g.
241
 
    # KB, MB, GB).
242
 
    # If you have scripts that depend on the old behaviour, set this to 0
243
 
    # temporarily until you update them.
244
 
    si_unit_consistency = 1
245
 
 
246
 
    # Whether or not to communicate with the kernel device-mapper.
247
 
    # Set to 0 if you want to use the tools to manipulate LVM metadata 
248
 
    # without activating any logical volumes.
249
 
    # If the device-mapper kernel driver is not present in your kernel
250
 
    # setting this to 0 should suppress the error messages.
251
 
    activation = 1
252
 
 
253
 
    # If we can't communicate with device-mapper, should we try running 
254
 
    # the LVM1 tools?
255
 
    # This option only applies to 2.4 kernels and is provided to help you
256
 
    # switch between device-mapper kernels and LVM1 kernels.
257
 
    # The LVM1 tools need to be installed with .lvm1 suffices
258
 
    # e.g. vgscan.lvm1 and they will stop working after you start using
259
 
    # the new lvm2 on-disk metadata format.
260
 
    # The default value is set when the tools are built.
261
 
    # fallback_to_lvm1 = 0
262
 
 
263
 
    # The default metadata format that commands should use - "lvm1" or "lvm2".
264
 
    # The command line override is -M1 or -M2.
265
 
    # Defaults to "lvm2".
266
 
    # format = "lvm2"
267
 
 
268
 
    # Location of proc filesystem
269
 
    proc = "/proc"
270
 
 
271
 
    # Type of locking to use. Defaults to local file-based locking (1).
272
 
    # Turn locking off by setting to 0 (dangerous: risks metadata corruption
273
 
    # if LVM2 commands get run concurrently).
274
 
    # Type 2 uses the external shared library locking_library.
275
 
    # Type 3 uses built-in clustered locking.
276
 
    # Type 4 uses read-only locking which forbids any operations that might 
277
 
    # change metadata.
278
 
    locking_type = 1
279
 
 
280
 
    # Set to 0 to fail when a lock request cannot be satisfied immediately.
281
 
    wait_for_locks = 1
282
 
 
283
 
    # If using external locking (type 2) and initialisation fails,
284
 
    # with this set to 1 an attempt will be made to use the built-in
285
 
    # clustered locking.
286
 
    # If you are using a customised locking_library you should set this to 0.
287
 
    fallback_to_clustered_locking = 1
288
 
 
289
 
    # If an attempt to initialise type 2 or type 3 locking failed, perhaps
290
 
    # because cluster components such as clvmd are not running, with this set
291
 
    # to 1 an attempt will be made to use local file-based locking (type 1).
292
 
    # If this succeeds, only commands against local volume groups will proceed.
293
 
    # Volume Groups marked as clustered will be ignored.
294
 
    fallback_to_local_locking = 1
295
 
 
296
 
    # Local non-LV directory that holds file-based locks while commands are
297
 
    # in progress.  A directory like /tmp that may get wiped on reboot is OK.
298
 
    locking_dir = "/var/lock/lvm"
299
 
 
300
 
    # Whenever there are competing read-only and read-write access requests for
301
 
    # a volume group's metadata, instead of always granting the read-only
302
 
    # requests immediately, delay them to allow the read-write requests to be
303
 
    # serviced.  Without this setting, write access may be stalled by a high
304
 
    # volume of read-only requests.
305
 
    # NB. This option only affects locking_type = 1 viz. local file-based
306
 
    # locking.
307
 
    prioritise_write_locks = 1
308
 
 
309
 
    # Other entries can go here to allow you to load shared libraries
310
 
    # e.g. if support for LVM1 metadata was compiled as a shared library use
311
 
    #   format_libraries = "liblvm2format1.so" 
312
 
    # Full pathnames can be given.
313
 
 
314
 
    # Search this directory first for shared libraries.
315
 
    #   library_dir = "/lib"
316
 
 
317
 
    # The external locking library to load if locking_type is set to 2.
318
 
    #   locking_library = "liblvm2clusterlock.so"
319
 
 
320
 
    # Treat any internal errors as fatal errors, aborting the process that
321
 
    # encountered the internal error. Please only enable for debugging.
322
 
    abort_on_internal_errors = 0
323
 
}
324
 
 
325
 
activation {
326
 
    # Set to 0 to disable udev synchronisation (if compiled into the binaries).
327
 
    # Processes will not wait for notification from udev.
328
 
    # They will continue irrespective of any possible udev processing
329
 
    # in the background.  You should only use this if udev is not running
330
 
    # or has rules that ignore the devices LVM2 creates.
331
 
    # The command line argument --nodevsync takes precedence over this setting.
332
 
    # If set to 1 when udev is not running, and there are LVM2 processes
333
 
    # waiting for udev, run 'dmsetup udevcomplete_all' manually to wake them up.
334
 
    udev_sync = 1
335
 
 
336
 
    # Set to 0 to disable the udev rules installed by LVM2 (if built with
337
 
    # --enable-udev_rules). LVM2 will then manage the /dev nodes and symlinks
338
 
    # for active logical volumes directly itself.
339
 
    # N.B. Manual intervention may be required if this setting is changed
340
 
    # while any logical volumes are active.
341
 
    udev_rules = 1
342
 
 
343
 
    # How to fill in missing stripes if activating an incomplete volume.
344
 
    # Using "error" will make inaccessible parts of the device return
345
 
    # I/O errors on access.  You can instead use a device path, in which 
346
 
    # case, that device will be used to in place of missing stripes.
347
 
    # But note that using anything other than "error" with mirrored 
348
 
    # or snapshotted volumes is likely to result in data corruption.
349
 
    missing_stripe_filler = "error"
350
 
 
351
 
    # How much stack (in KB) to reserve for use while devices suspended
352
 
    reserved_stack = 256
353
 
 
354
 
    # How much memory (in KB) to reserve for use while devices suspended
355
 
    reserved_memory = 8192
356
 
 
357
 
    # Nice value used while devices suspended
358
 
    process_priority = -18
359
 
 
360
 
    # If volume_list is defined, each LV is only activated if there is a
361
 
    # match against the list.
362
 
    #   "vgname" and "vgname/lvname" are matched exactly.
363
 
    #   "@tag" matches any tag set in the LV or VG.
364
 
    #   "@*" matches if any tag defined on the host is also set in the LV or VG
365
 
    #
366
 
    # volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
367
 
 
368
 
    # Size (in KB) of each copy operation when mirroring
369
 
    mirror_region_size = 512
370
 
 
371
 
    # Setting to use when there is no readahead value stored in the metadata.
372
 
    #
373
 
    # "none" - Disable readahead.
374
 
    # "auto" - Use default value chosen by kernel.
375
 
    readahead = "auto"
376
 
 
377
 
    # 'mirror_image_fault_policy' and 'mirror_log_fault_policy' define
378
 
    # how a device failure affecting a mirror is handled.
379
 
    # A mirror is composed of mirror images (copies) and a log.
380
 
    # A disk log ensures that a mirror does not need to be re-synced
381
 
    # (all copies made the same) every time a machine reboots or crashes.
382
 
    #
383
 
    # In the event of a failure, the specified policy will be used to determine
384
 
    # what happens. This applies to automatic repairs (when the mirror is being
385
 
    # monitored by dmeventd) and to manual lvconvert --repair when
386
 
    # --use-policies is given.
387
 
    #
388
 
    # "remove" - Simply remove the faulty device and run without it.  If
389
 
    #            the log device fails, the mirror would convert to using
390
 
    #            an in-memory log.  This means the mirror will not
391
 
    #            remember its sync status across crashes/reboots and
392
 
    #            the entire mirror will be re-synced.  If a
393
 
    #            mirror image fails, the mirror will convert to a
394
 
    #            non-mirrored device if there is only one remaining good
395
 
    #            copy.
396
 
    #
397
 
    # "allocate" - Remove the faulty device and try to allocate space on
398
 
    #            a new device to be a replacement for the failed device.
399
 
    #            Using this policy for the log is fast and maintains the
400
 
    #            ability to remember sync state through crashes/reboots.
401
 
    #            Using this policy for a mirror device is slow, as it
402
 
    #            requires the mirror to resynchronize the devices, but it
403
 
    #            will preserve the mirror characteristic of the device.
404
 
    #            This policy acts like "remove" if no suitable device and
405
 
    #            space can be allocated for the replacement.
406
 
    #
407
 
    # "allocate_anywhere" - Not yet implemented. Useful to place the log device
408
 
    #            temporarily on same physical volume as one of the mirror
409
 
    #            images. This policy is not recommended for mirror devices
410
 
    #            since it would break the redundant nature of the mirror. This
411
 
    #            policy acts like "remove" if no suitable device and space can
412
 
    #            be allocated for the replacement.
413
 
 
414
 
    mirror_log_fault_policy = "allocate"
415
 
    mirror_image_fault_policy = "remove"
416
 
 
417
 
    # While activating devices, I/O to devices being (re)configured is
418
 
    # suspended, and as a precaution against deadlocks, LVM2 needs to pin
419
 
    # any memory it is using so it is not paged out.  Groups of pages that
420
 
    # are known not to be accessed during activation need not be pinned
421
 
    # into memory.  Each string listed in this setting is compared against
422
 
    # each line in /proc/self/maps, and the pages corresponding to any
423
 
    # lines that match are not pinned.  On some systems locale-archive was
424
 
    # found to make up over 80% of the memory used by the process.
425
 
    # mlock_filter = [ "locale/locale-archive", "gconv/gconv-modules.cache" ]
426
 
 
427
 
    # Set to 1 to revert to the default behaviour prior to version 2.02.62
428
 
    # which used mlockall() to pin the whole process's memory while activating
429
 
    # devices.
430
 
    use_mlockall = 0
431
 
 
432
 
    # Monitoring is enabled by default when activating logical volumes.
433
 
    # Set to 0 to disable monitoring or use the --ignoremonitoring option.
434
 
    monitoring = 1
435
 
 
436
 
    # When pvmove or lvconvert must wait for the kernel to finish
437
 
    # synchronising or merging data, they check and report progress
438
 
    # at intervals of this number of seconds.  The default is 15 seconds.
439
 
    # If this is set to 0 and there is only one thing to wait for, there
440
 
    # are no progress reports, but the process is awoken immediately the
441
 
    # operation is complete.
442
 
    polling_interval = 15
443
 
}
444
 
 
445
 
 
446
 
####################
447
 
# Advanced section #
448
 
####################
449
 
 
450
 
# Metadata settings
451
 
#
452
 
# metadata {
453
 
    # Default number of copies of metadata to hold on each PV.  0, 1 or 2.
454
 
    # You might want to override it from the command line with 0 
455
 
    # when running pvcreate on new PVs which are to be added to large VGs.
456
 
 
457
 
    # pvmetadatacopies = 1
458
 
 
459
 
    # Approximate default size of on-disk metadata areas in sectors.
460
 
    # You should increase this if you have large volume groups or
461
 
    # you want to retain a large on-disk history of your metadata changes.
462
 
 
463
 
    # pvmetadatasize = 255
464
 
 
465
 
    # List of directories holding live copies of text format metadata.
466
 
    # These directories must not be on logical volumes!
467
 
    # It's possible to use LVM2 with a couple of directories here,
468
 
    # preferably on different (non-LV) filesystems, and with no other 
469
 
    # on-disk metadata (pvmetadatacopies = 0). Or this can be in
470
 
    # addition to on-disk metadata areas.
471
 
    # The feature was originally added to simplify testing and is not
472
 
    # supported under low memory situations - the machine could lock up.
473
 
    #
474
 
    # Never edit any files in these directories by hand unless you
475
 
    # you are absolutely sure you know what you are doing! Use
476
 
    # the supplied toolset to make changes (e.g. vgcfgrestore).
477
 
 
478
 
    # dirs = [ "/etc/lvm/metadata", "/mnt/disk2/lvm/metadata2" ]
479
 
#}
480
 
 
481
 
# Event daemon
482
 
#
483
 
dmeventd {
484
 
    # mirror_library is the library used when monitoring a mirror device.
485
 
    #
486
 
    # "libdevmapper-event-lvm2mirror.so" attempts to recover from
487
 
    # failures.  It removes failed devices from a volume group and
488
 
    # reconfigures a mirror as necessary. If no mirror library is
489
 
    # provided, mirrors are not monitored through dmeventd.
490
 
 
491
 
    mirror_library = "libdevmapper-event-lvm2mirror.so"
492
 
 
493
 
    # snapshot_library is the library used when monitoring a snapshot device.
494
 
    #
495
 
    # "libdevmapper-event-lvm2snapshot.so" monitors the filling of
496
 
    # snapshots and emits a warning through syslog, when the use of
497
 
    # snapshot exceedes 80%. The warning is repeated when 85%, 90% and
498
 
    # 95% of the snapshot are filled.
499
 
 
500
 
    snapshot_library = "libdevmapper-event-lvm2snapshot.so"
501
 
}