source: trunk/packages/sipb-xen-clvm-config/files/etc/lvm/lvm.conf.sipb-xen @ 509

Last change on this file since 509 was 477, checked in by quentin, 17 years ago

Make LVM actually use clvm.

File size: 13.4 KB
Line 
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.
13devices {
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    # A filter that tells LVM2 to only use a restricted set of devices.
23    # The filter consists of an array of regular expressions.  These
24    # expressions can be delimited by a character of your choice, and
25    # prefixed with either an 'a' (for accept) or 'r' (for reject).
26    # The first expression found to match a device name determines if
27    # the device will be accepted or rejected (ignored).  Devices that
28    # don't match any patterns are accepted.
29
30    # Be careful if there there are symbolic links or multiple filesystem
31    # entries for the same device as each name is checked separately against
32    # the list of patterns.  The effect is that if any name matches any 'a'
33    # pattern, the device is accepted; otherwise if any name matches any 'r'
34    # pattern it is rejected; otherwise it is accepted.
35
36    # Don't have more than one filter line active at once: only one gets used.
37
38    # Run vgscan after you change this parameter to ensure that
39    # the cache file gets regenerated (see below).
40    # If it doesn't do what you expect, check the output of 'vgscan -vvvv'.
41
42    # By default we accept every block device
43    # filter = [ "a/.*/" ]
44
45    # Exclude the cdrom drive
46    filter = [ "r|/dev/cdrom|" ]
47
48    # When testing I like to work with just loopback devices:
49    # filter = [ "a/loop/", "r/.*/" ]
50
51    # Or maybe all loops and ide drives except hdc:
52    # filter =[ "a|loop|", "r|/dev/hdc|", "a|/dev/ide|", "r|.*|" ]
53
54    # Use anchors if you want to be really specific
55    # filter = [ "a|^/dev/hda8$|", "r/.*/" ]
56
57    # The results of the filtering are cached on disk to avoid
58    # rescanning dud devices (which can take a very long time).  By
59    # default this cache file is hidden in the /etc/lvm directory.
60    # It is safe to delete this file: the tools regenerate it.
61    cache = "/etc/lvm/.cache"
62
63    # You can turn off writing this cache file by setting this to 0.
64    write_cache_state = 1
65
66    # Advanced settings.
67
68    # List of pairs of additional acceptable block device types found
69    # in /proc/devices with maximum (non-zero) number of partitions.
70    # types = [ "fd", 16 ]
71
72    # If sysfs is mounted (2.6 kernels) restrict device scanning to
73    # the block devices it believes are valid.
74    # 1 enables; 0 disables.
75    sysfs_scan = 1     
76
77    # By default, LVM2 will ignore devices used as components of
78    # software RAID (md) devices by looking for md superblocks.
79    # 1 enables; 0 disables.
80    md_component_detection = 1
81}
82
83# This section that allows you to configure the nature of the
84# information that LVM2 reports.
85log {
86
87    # Controls the messages sent to stdout or stderr.
88    # There are three levels of verbosity, 3 being the most verbose.
89    verbose = 0
90
91    # Should we send log messages through syslog?
92    # 1 is yes; 0 is no.
93    syslog = 1
94
95    # Should we log error and debug messages to a file?
96    # By default there is no log file.
97    #file = "/var/log/lvm2.log"
98
99    # Should we overwrite the log file each time the program is run?
100    # By default we append.
101    overwrite = 0
102
103    # What level of log messages should we send to the log file and/or syslog?
104    # There are 6 syslog-like log levels currently in use - 2 to 7 inclusive.
105    # 7 is the most verbose (LOG_DEBUG).
106    level = 0
107   
108    # Format of output messages
109    # Whether or not (1 or 0) to indent messages according to their severity
110    indent = 1
111
112    # Whether or not (1 or 0) to display the command name on each line output
113    command_names = 0
114
115    # A prefix to use before the message text (but after the command name,
116    # if selected).  Default is two spaces, so you can see/grep the severity
117    # of each message.
118    prefix = "  "
119
120    # To make the messages look similar to the original LVM tools use:
121    #   indent = 0
122    #   command_names = 1
123    #   prefix = " -- "
124
125    # Set this if you want log messages during activation.
126    # Don't use this in low memory situations (can deadlock).
127    # activation = 0
128}
129
130# Configuration of metadata backups and archiving.  In LVM2 when we
131# talk about a 'backup' we mean making a copy of the metadata for the
132# *current* system.  The 'archive' contains old metadata configurations.
133# Backups are stored in a human readeable text format.
134backup {
135
136    # Should we maintain a backup of the current metadata configuration ?
137    # Use 1 for Yes; 0 for No.
138    # Think very hard before turning this off!
139    backup = 1
140
141    # Where shall we keep it ?
142    # Remember to back up this directory regularly!
143    backup_dir = "/etc/lvm/backup"
144
145    # Should we maintain an archive of old metadata configurations.
146    # Use 1 for Yes; 0 for No.
147    # On by default.  Think very hard before turning this off.
148    archive = 1
149
150    # Where should archived files go ?
151    # Remember to back up this directory regularly!
152    archive_dir = "/etc/lvm/archive"
153   
154    # What is the minimum number of archive files you wish to keep ?
155    retain_min = 10
156
157    # What is the minimum time you wish to keep an archive file for ?
158    retain_days = 30
159}
160
161# Settings for the running LVM2 in shell (readline) mode.
162shell {
163
164    # Number of lines of history to store in ~/.lvm_history
165    history_size = 100
166}
167
168
169# Miscellaneous global LVM2 settings
170global {
171   
172    # The file creation mask for any files and directories created.
173    # Interpreted as octal if the first digit is zero.
174    umask = 077
175
176    # Allow other users to read the files
177    #umask = 022
178
179    # Enabling test mode means that no changes to the on disk metadata
180    # will be made.  Equivalent to having the -t option on every
181    # command.  Defaults to off.
182    test = 0
183
184    # Whether or not to communicate with the kernel device-mapper.
185    # Set to 0 if you want to use the tools to manipulate LVM metadata
186    # without activating any logical volumes.
187    # If the device-mapper kernel driver is not present in your kernel
188    # setting this to 0 should suppress the error messages.
189    activation = 1
190
191    # If we can't communicate with device-mapper, should we try running
192    # the LVM1 tools?
193    # This option only applies to 2.4 kernels and is provided to help you
194    # switch between device-mapper kernels and LVM1 kernels.
195    # The LVM1 tools need to be installed with .lvm1 suffices
196    # e.g. vgscan.lvm1 and they will stop working after you start using
197    # the new lvm2 on-disk metadata format.
198    # The default value is set when the tools are built.
199    # fallback_to_lvm1 = 0
200
201    # The default metadata format that commands should use - "lvm1" or "lvm2".
202    # The command line override is -M1 or -M2.
203    # Defaults to "lvm1" if compiled in, else "lvm2".
204    # format = "lvm1"
205
206    # Location of proc filesystem
207    proc = "/proc"
208
209    # Type of locking to use. Defaults to file-based locking (1).
210    # Turn locking off by setting to 0 (dangerous: risks metadata corruption
211    # if LVM2 commands get run concurrently).
212    #locking_type = 1
213
214    # Local non-LV directory that holds file-based locks while commands are
215    # in progress.  A directory like /tmp that may get wiped on reboot is OK.
216    locking_dir = "/var/lock/lvm"
217
218    # Other entries can go here to allow you to load shared libraries
219    # e.g. if support for LVM1 metadata was compiled as a shared library use
220    #   format_libraries = "liblvm2format1.so"
221    # Full pathnames can be given.
222
223    # Search this directory first for shared libraries.
224    #  library_dir = "/lib/lvm2"
225   
226    # Enable these three for cluster LVM when clvmd is running.
227    # Remember to remove the "locking_type = 1" above.
228    #
229    locking_library = "liblvm2clusterlock.so"
230    locking_type = 2
231    library_dir = "/lib/lvm2"
232}
233
234activation {
235    # Device used in place of missing stripes if activating incomplete volume.
236    # For now, you need to set this up yourself first (e.g. with 'dmsetup')
237    # For example, you could make it return I/O errors using the 'error'
238    # target or make it return zeros.
239    missing_stripe_filler = "/dev/ioerror"
240
241    # How much stack (in KB) to reserve for use while devices suspended
242    reserved_stack = 256
243
244    # How much memory (in KB) to reserve for use while devices suspended
245    reserved_memory = 8192
246
247    # Nice value used while devices suspended
248    process_priority = -18
249
250    # If volume_list is defined, each LV is only activated if there is a
251    # match against the list.
252    #   "vgname" and "vgname/lvname" are matched exactly.
253    #   "@tag" matches any tag set in the LV or VG.
254    #   "@*" matches if any tag defined on the host is also set in the LV or VG
255    #
256    # volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
257
258    # Permissions to use for new devices
259    # device_permissions = [ 0, 6, 0660 ]
260
261    # Size (in KB) of each copy operation when mirroring
262    mirror_region_size = 512
263
264    # 'mirror_image_fault_policy' and 'mirror_log_fault_policy' define
265    # how a device failure affecting a mirror is handled.
266    # A mirror is composed of mirror images (copies) and a log.
267    # A disk log ensures that a mirror does not need to be re-synced
268    # (all copies made the same) every time a machine reboots or crashes.
269    #
270    # In the event of a failure, the specified policy will be used to
271    # determine what happens:
272    #
273    # "remove" - Simply remove the faulty device and run without it.  If
274    #            the log device fails, the mirror would convert to using
275    #            an in-memory log.  This means the mirror will not
276    #            remember its sync status across crashes/reboots and
277    #            the entire mirror will be re-synced.  If a
278    #            mirror image fails, the mirror will convert to a
279    #            non-mirrored device if there is only one remaining good
280    #            copy.
281    #
282    # "allocate" - Remove the faulty device and try to allocate space on
283    #            a new device to be a replacement for the failed device.
284    #            Using this policy for the log is fast and maintains the
285    #            ability to remember sync state through crashes/reboots.
286    #            Using this policy for a mirror device is slow, as it
287    #            requires the mirror to resynchronize the devices, but it
288    #            will preserve the mirror characteristic of the device.
289    #            This policy acts like "remove" if no suitable device and
290    #            space can be allocated for the replacement.
291    #            Currently this is not implemented properly and behaves
292    #            similarly to:
293    #
294    # "allocate_anywhere" - Operates like "allocate", but it does not
295    #            require that the new space being allocated be on a
296    #            device is not part of the mirror.  For a log device
297    #            failure, this could mean that the log is allocated on
298    #            the same device as a mirror device.  For a mirror
299    #            device, this could mean that the mirror device is
300    #            allocated on the same device as another mirror device.
301    #            This policy would not be wise for mirror devices
302    #            because it would break the redundant nature of the
303    #            mirror.  This policy acts like "remove" if no suitable
304    #            device and space can be allocated for the replacement.
305
306    mirror_log_fault_policy = "allocate"
307    mirror_device_fault_policy = "remove"
308}
309
310
311####################
312# Advanced section #
313####################
314
315# Metadata settings
316#
317# metadata {
318    # Default number of copies of metadata to hold on each PV.  0, 1 or 2.
319    # You might want to override it from the command line with 0
320    # when running pvcreate on new PVs which are to be added to large VGs.
321
322    # pvmetadatacopies = 1
323
324    # Approximate default size of on-disk metadata areas in sectors.
325    # You should increase this if you have large volume groups or
326    # you want to retain a large on-disk history of your metadata changes.
327
328    # pvmetadatasize = 255
329
330    # List of directories holding live copies of text format metadata.
331    # These directories must not be on logical volumes!
332    # It's possible to use LVM2 with a couple of directories here,
333    # preferably on different (non-LV) filesystems, and with no other
334    # on-disk metadata (pvmetadatacopies = 0). Or this can be in
335    # addition to on-disk metadata areas.
336    # The feature was originally added to simplify testing and is not
337    # supported under low memory situations - the machine could lock up.
338    #
339    # Never edit any files in these directories by hand unless you
340    # you are absolutely sure you know what you are doing! Use
341    # the supplied toolset to make changes (e.g. vgcfgrestore).
342
343    # dirs = [ "/etc/lvm/metadata", "/mnt/disk2/lvm/metadata2" ]
344#}
345
346# Event daemon
347#
348# dmeventd {
349    # mirror_library is the library used when monitoring a mirror device.
350    #
351    # "libdevmapper-event-lvm2mirror.so" attempts to recover from failures.
352    # It removes failed devices from a volume group and reconfigures a
353    # mirror as necessary.
354    #
355    # mirror_library = "libdevmapper-event-lvm2mirror.so"
356#}
357
Note: See TracBrowser for help on using the repository browser.