blob: c2bb85d8bf4d46c0c047bcb43fd81203c9891209 [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001# 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
43 # By default we accept every block device:
44 filter = [ "a/.*/" ]
45
46 # Exclude the cdrom drive
47 # filter = [ "r|/dev/cdrom|" ]
48
49 # When testing I like to work with just loopback devices:
50 # filter = [ "a/loop/", "r/.*/" ]
51
52 # Or maybe all loops and ide drives except hdc:
53 # filter =[ "a|loop|", "r|/dev/hdc|", "a|/dev/ide|", "r|.*|" ]
54
55 # Use anchors if you want to be really specific
56 # filter = [ "a|^/dev/hda8$|", "r/.*/" ]
57
58 # The results of the filtering are cached on disk to avoid
59 # rescanning dud devices (which can take a very long time). By
60 # default this cache file is hidden in the /etc/lvm directory.
61 # It is safe to delete this file: the tools regenerate it.
62 cache = "/etc/lvm/.cache"
63
64 # You can turn off writing this cache file by setting this to 0.
65 write_cache_state = 1
66
67 # Advanced settings.
68
69 # List of pairs of additional acceptable block device types found
70 # in /proc/devices with maximum (non-zero) number of partitions.
71 # types = [ "fd", 16 ]
72
73 # If sysfs is mounted (2.6 kernels) restrict device scanning to
74 # the block devices it believes are valid.
75 # 1 enables; 0 disables.
76 sysfs_scan = 1
77
78 # By default, LVM2 will ignore devices used as components of
79 # software RAID (md) devices by looking for md superblocks.
80 # 1 enables; 0 disables.
81 md_component_detection = 1
82}
83
84# This section that allows you to configure the nature of the
85# information that LVM2 reports.
86log {
87
88 # Controls the messages sent to stdout or stderr.
89 # There are three levels of verbosity, 3 being the most verbose.
90 verbose = 0
91
92 # Should we send log messages through syslog?
93 # 1 is yes; 0 is no.
94 syslog = 1
95
96 # Should we log error and debug messages to a file?
97 # By default there is no log file.
98 #file = "/var/log/lvm2.log"
99
100 # Should we overwrite the log file each time the program is run?
101 # By default we append.
102 overwrite = 0
103
104 # What level of log messages should we send to the log file and/or syslog?
105 # There are 6 syslog-like log levels currently in use - 2 to 7 inclusive.
106 # 7 is the most verbose (LOG_DEBUG).
107 level = 0
108
109 # Format of output messages
110 # Whether or not (1 or 0) to indent messages according to their severity
111 indent = 1
112
113 # Whether or not (1 or 0) to display the command name on each line output
114 command_names = 0
115
116 # A prefix to use before the message text (but after the command name,
117 # if selected). Default is two spaces, so you can see/grep the severity
118 # of each message.
119 prefix = " "
120
121 # To make the messages look similar to the original LVM tools use:
122 # indent = 0
123 # command_names = 1
124 # prefix = " -- "
125
126 # Set this if you want log messages during activation.
127 # Don't use this in low memory situations (can deadlock).
128 # activation = 0
129}
130
131# Configuration of metadata backups and archiving. In LVM2 when we
132# talk about a 'backup' we mean making a copy of the metadata for the
133# *current* system. The 'archive' contains old metadata configurations.
134# Backups are stored in a human readeable text format.
135backup {
136
137 # Should we maintain a backup of the current metadata configuration ?
138 # Use 1 for Yes; 0 for No.
139 # Think very hard before turning this off!
140 backup = 1
141
142 # Where shall we keep it ?
143 # Remember to back up this directory regularly!
144 backup_dir = "/etc/lvm/backup"
145
146 # Should we maintain an archive of old metadata configurations.
147 # Use 1 for Yes; 0 for No.
148 # On by default. Think very hard before turning this off.
149 archive = 1
150
151 # Where should archived files go ?
152 # Remember to back up this directory regularly!
153 archive_dir = "/etc/lvm/archive"
154
155 # What is the minimum number of archive files you wish to keep ?
156 retain_min = 10
157
158 # What is the minimum time you wish to keep an archive file for ?
159 retain_days = 30
160}
161
162# Settings for the running LVM2 in shell (readline) mode.
163shell {
164
165 # Number of lines of history to store in ~/.lvm_history
166 history_size = 100
167}
168
169
170# Miscellaneous global LVM2 settings
171global {
172
173 # The file creation mask for any files and directories created.
174 # Interpreted as octal if the first digit is zero.
175 umask = 077
176
177 # Allow other users to read the files
178 #umask = 022
179
180 # Enabling test mode means that no changes to the on disk metadata
181 # will be made. Equivalent to having the -t option on every
182 # command. Defaults to off.
183 test = 0
184
185 # Whether or not to communicate with the kernel device-mapper.
186 # Set to 0 if you want to use the tools to manipulate LVM metadata
187 # without activating any logical volumes.
188 # If the device-mapper kernel driver is not present in your kernel
189 # setting this to 0 should suppress the error messages.
190 activation = 1
191
192 # If we can't communicate with device-mapper, should we try running
193 # the LVM1 tools?
194 # This option only applies to 2.4 kernels and is provided to help you
195 # switch between device-mapper kernels and LVM1 kernels.
196 # The LVM1 tools need to be installed with .lvm1 suffices
197 # e.g. vgscan.lvm1 and they will stop working after you start using
198 # the new lvm2 on-disk metadata format.
199 # The default value is set when the tools are built.
200 # fallback_to_lvm1 = 0
201
202 # The default metadata format that commands should use - "lvm1" or "lvm2".
203 # The command line override is -M1 or -M2.
204 # Defaults to "lvm1" if compiled in, else "lvm2".
205 # format = "lvm1"
206
207 # Location of proc filesystem
208 proc = "/proc"
209
210 # Type of locking to use. Defaults to file-based locking (1).
211 # Turn locking off by setting to 0 (dangerous: risks metadata corruption
212 # if LVM2 commands get run concurrently).
213 locking_type = 1
214
215 # Local non-LV directory that holds file-based locks while commands are
216 # in progress. A directory like /tmp that may get wiped on reboot is OK.
Brad Bishopd7bf8c12018-02-25 22:55:05 -0500217 locking_dir = "/tmp/lock/lvm"
Patrick Williamsb48b7b42016-08-17 15:04:38 -0500218
219 # Other entries can go here to allow you to load shared libraries
220 # e.g. if support for LVM1 metadata was compiled as a shared library use
221 # format_libraries = "liblvm2format1.so"
222 # Full pathnames can be given.
223
224 # Search this directory first for shared libraries.
225 # library_dir = "/lib"
226}
227
228activation {
229 # Device used in place of missing stripes if activating incomplete volume.
230 # For now, you need to set this up yourself first (e.g. with 'dmsetup')
231 # For example, you could make it return I/O errors using the 'error'
232 # target or make it return zeros.
233 missing_stripe_filler = "/dev/ioerror"
234
235 # Size (in KB) of each copy operation when mirroring
236 mirror_region_size = 512
237
238 # How much stack (in KB) to reserve for use while devices suspended
239 reserved_stack = 256
240
241 # How much memory (in KB) to reserve for use while devices suspended
242 reserved_memory = 8192
243
244 # Nice value used while devices suspended
245 process_priority = -18
246
247 # If volume_list is defined, each LV is only activated if there is a
248 # match against the list.
249 # "vgname" and "vgname/lvname" are matched exactly.
250 # "@tag" matches any tag set in the LV or VG.
251 # "@*" matches if any tag defined on the host is also set in the LV or VG
252 #
253 # volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]
254}
255
256
257####################
258# Advanced section #
259####################
260
261# Metadata settings
262#
263# metadata {
264 # Default number of copies of metadata to hold on each PV. 0, 1 or 2.
265 # You might want to override it from the command line with 0
266 # when running pvcreate on new PVs which are to be added to large VGs.
267
268 # pvmetadatacopies = 1
269
270 # Approximate default size of on-disk metadata areas in sectors.
271 # You should increase this if you have large volume groups or
272 # you want to retain a large on-disk history of your metadata changes.
273
274 # pvmetadatasize = 255
275
276 # List of directories holding live copies of text format metadata.
277 # These directories must not be on logical volumes!
278 # It's possible to use LVM2 with a couple of directories here,
279 # preferably on different (non-LV) filesystems, and with no other
280 # on-disk metadata (pvmetadatacopies = 0). Or this can be in
281 # addition to on-disk metadata areas.
282 # The feature was originally added to simplify testing and is not
283 # supported under low memory situations - the machine could lock up.
284 #
285 # Never edit any files in these directories by hand unless you
286 # you are absolutely sure you know what you are doing! Use
287 # the supplied toolset to make changes (e.g. vgcfgrestore).
288
289 # dirs = [ "/etc/lvm/metadata", "/mnt/disk2/lvm/metadata2" ]
290#}
291
292# Event daemon
293#
294dmeventd {
295 # mirror_library is the library used when monitoring a mirror device.
296 #
297 # "libdevmapper-event-lvm2mirror.so" attempts to recover from
298 # failures. It removes failed devices from a volume group and
299 # reconfigures a mirror as necessary. If no mirror library is
300 # provided, mirrors are not monitored through dmeventd.
301
302 mirror_library = "@libdir@/device-mapper/libdevmapper-event-lvm2mirror.so"
303
304 # snapshot_library is the library used when monitoring a snapshot device.
305 #
306 # "libdevmapper-event-lvm2snapshot.so" monitors the filling of
307 # snapshots and emits a warning through syslog when the use of
308 # the snapshot exceeds 80%. The warning is repeated when 85%, 90% and
309 # 95% of the snapshot is filled.
310
311 snapshot_library = "@libdir@/device-mapper/libdevmapper-event-lvm2snapshot.so"
312
313 # thin_library is the library used when monitoring a thin device.
314 #
315 # "libdevmapper-event-lvm2thin.so" monitors the filling of
316 # pool and emits a warning through syslog when the use of
317 # the pool exceeds 80%. The warning is repeated when 85%, 90% and
318 # 95% of the pool is filled.
319
320 thin_library = "@libdir@/device-mapper/libdevmapper-event-lvm2thin.so"
321
322 # Full path of the dmeventd binary.
323 #
324 # executable = "@DMEVENTD_PATH@"
325}
326