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.
5 # Refer to 'man lvm.conf' for further information including the file layout.
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.
11 # This section allows you to configure which block devices should
12 # be used by the LVM system.
15 # Where do you want your volume groups to appear ?
18 # An array of directories that contain the device nodes you wish
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.
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.
36 # Don't have more than one filter line active at once: only one gets used.
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'.
42 # By default we accept every block device
43 # filter = [ "a/.*/" ]
45 # Exclude the cdrom drive
46 filter = [ "r|/dev/cdrom|" ]
48 # When testing I like to work with just loopback devices:
49 # filter = [ "a/loop/", "r/.*/" ]
51 # Or maybe all loops and ide drives except hdc:
52 # filter =[ "a|loop|", "r|/dev/hdc|", "a|/dev/ide|", "r|.*|" ]
54 # Use anchors if you want to be really specific
55 # filter = [ "a|^/dev/hda8$|", "r/.*/" ]
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"
63 # You can turn off writing this cache file by setting this to 0.
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 ]
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.
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
83 # This section that allows you to configure the nature of the
84 # information that LVM2 reports.
87 # Controls the messages sent to stdout or stderr.
88 # There are three levels of verbosity, 3 being the most verbose.
91 # Should we send log messages through syslog?
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"
99 # Should we overwrite the log file each time the program is run?
100 # By default we append.
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).
108 # Format of output messages
109 # Whether or not (1 or 0) to indent messages according to their severity
112 # Whether or not (1 or 0) to display the command name on each line output
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
120 # To make the messages look similar to the original LVM tools use:
125 # Set this if you want log messages during activation.
126 # Don't use this in low memory situations (can deadlock).
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.
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!
141 # Where shall we keep it ?
142 # Remember to back up this directory regularly!
143 backup_dir = "/etc/lvm/backup"
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.
150 # Where should archived files go ?
151 # Remember to back up this directory regularly!
152 archive_dir = "/etc/lvm/archive"
154 # What is the minimum number of archive files you wish to keep ?
157 # What is the minimum time you wish to keep an archive file for ?
161 # Settings for the running LVM2 in shell (readline) mode.
164 # Number of lines of history to store in ~/.lvm_history
169 # Miscellaneous global LVM2 settings
172 # The file creation mask for any files and directories created.
173 # Interpreted as octal if the first digit is zero.
176 # Allow other users to read the files
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.
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.
191 # If we can't communicate with device-mapper, should we try running
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
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".
206 # Location of proc filesystem
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).
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"
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.
223 # Search this directory first for shared libraries.
224 # library_dir = "/lib/lvm2"
226 # Enable these three for cluster LVM when clvmd is running.
227 # Remember to remove the "locking_type = 1" above.
229 locking_library = "liblvm2clusterlock.so"
231 library_dir = "/lib/lvm2"
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"
241 # How much stack (in KB) to reserve for use while devices suspended
244 # How much memory (in KB) to reserve for use while devices suspended
245 reserved_memory = 8192
247 # Nice value used while devices suspended
248 process_priority = -18
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
256 # volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
258 # Permissions to use for new devices
259 # device_permissions = [ 0, 6, 0660 ]
261 # Size (in KB) of each copy operation when mirroring
262 mirror_region_size = 512
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.
270 # In the event of a failure, the specified policy will be used to
271 # determine what happens:
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
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
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.
306 mirror_log_fault_policy = "allocate"
307 mirror_device_fault_policy = "remove"
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.
322 # pvmetadatacopies = 1
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.
328 # pvmetadatasize = 255
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.
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).
343 # dirs = [ "/etc/lvm/metadata", "/mnt/disk2/lvm/metadata2" ]
349 # mirror_library is the library used when monitoring a mirror device.
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.
355 # mirror_library = "libdevmapper-event-lvm2mirror.so"