]>
Commit | Line | Data |
---|---|---|
5a52dca9 AK |
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 | |
3399ae32 | 3 | # @DEFAULT_SYS_DIR@/lvm.conf file. |
5a52dca9 AK |
4 | # |
5 | # Refer to 'man lvm.conf' for further information including the file layout. | |
6 | # | |
3399ae32 | 7 | # To put this file in a different directory and override @DEFAULT_SYS_DIR@ set |
5a52dca9 | 8 | # the environment variable LVM_SYSTEM_DIR before running the tools. |
2c56f60d AK |
9 | # |
10 | # N.B. Take care that each setting only appears once if uncommenting | |
11 | # example settings in this file. | |
c05bd981 JT |
12 | |
13 | ||
5a52dca9 | 14 | # This section allows you to configure which block devices should |
c05bd981 | 15 | # be used by the LVM system. |
c05bd981 | 16 | devices { |
d2b0e8b1 | 17 | |
5a52dca9 | 18 | # Where do you want your volume groups to appear ? |
c05bd981 JT |
19 | dir = "/dev" |
20 | ||
21 | # An array of directories that contain the device nodes you wish | |
22 | # to use with LVM2. | |
5a52dca9 | 23 | scan = [ "/dev" ] |
c05bd981 | 24 | |
edcda01a PR |
25 | # If set, the cache of block device nodes with all associated symlinks |
26 | # will be constructed out of the existing udev database content. | |
27 | # This avoids using and opening any inapplicable non-block devices or | |
28 | # subdirectories found in the device directory. This setting is applied | |
29 | # to udev-managed device directory only, other directories will be scanned | |
30 | # fully. LVM2 needs to be compiled with udev support for this setting to | |
31 | # take effect. N.B. Any device node or symlink not managed by udev in | |
32 | # udev directory will be ignored with this setting on. | |
c52a2a4e | 33 | obtain_device_list_from_udev = 1 |
edcda01a | 34 | |
4f2f566b AK |
35 | # If several entries in the scanned directories correspond to the |
36 | # same block device and the tools need to display a name for device, | |
37 | # all the pathnames are matched against each item in the following | |
38 | # list of regular expressions in turn and the first match is used. | |
bcc4a38c | 39 | preferred_names = [ ] |
4f2f566b | 40 | |
3cde54c5 AK |
41 | # Try to avoid using undescriptive /dev/dm-N names, if present. |
42 | # preferred_names = [ "^/dev/mpath/", "^/dev/mapper/mpath", "^/dev/[hs]d" ] | |
4f2f566b | 43 | |
5a52dca9 | 44 | # A filter that tells LVM2 to only use a restricted set of devices. |
c05bd981 JT |
45 | # The filter consists of an array of regular expressions. These |
46 | # expressions can be delimited by a character of your choice, and | |
47 | # prefixed with either an 'a' (for accept) or 'r' (for reject). | |
d0df19e8 AK |
48 | # The first expression found to match a device name determines if |
49 | # the device will be accepted or rejected (ignored). Devices that | |
50 | # don't match any patterns are accepted. | |
c05bd981 | 51 | |
63bea03e AK |
52 | # Be careful if there there are symbolic links or multiple filesystem |
53 | # entries for the same device as each name is checked separately against | |
ad9c59e2 AK |
54 | # the list of patterns. The effect is that if the first pattern in the |
55 | # list to match a name is an 'a' pattern for any of the names, the device | |
56 | # is accepted; otherwise if the first pattern in the list to match a name | |
57 | # is an 'r' pattern for any of the names it is rejected; otherwise it is | |
58 | # accepted. | |
63bea03e | 59 | |
b496a6b2 AK |
60 | # Don't have more than one filter line active at once: only one gets used. |
61 | ||
62 | # Run vgscan after you change this parameter to ensure that | |
63 | # the cache file gets regenerated (see below). | |
64 | # If it doesn't do what you expect, check the output of 'vgscan -vvvv'. | |
65 | ||
1703d66a | 66 | |
c05bd981 | 67 | # By default we accept every block device: |
5a52dca9 AK |
68 | filter = [ "a/.*/" ] |
69 | ||
70 | # Exclude the cdrom drive | |
71 | # filter = [ "r|/dev/cdrom|" ] | |
c05bd981 JT |
72 | |
73 | # When testing I like to work with just loopback devices: | |
5a52dca9 | 74 | # filter = [ "a/loop/", "r/.*/" ] |
c05bd981 JT |
75 | |
76 | # Or maybe all loops and ide drives except hdc: | |
5a52dca9 | 77 | # filter =[ "a|loop|", "r|/dev/hdc|", "a|/dev/ide|", "r|.*|" ] |
c05bd981 | 78 | |
7cbf161f | 79 | # Use anchors if you want to be really specific |
5a52dca9 | 80 | # filter = [ "a|^/dev/hda8$|", "r/.*/" ] |
7cbf161f | 81 | |
5a52dca9 | 82 | # The results of the filtering are cached on disk to avoid |
87cec8eb | 83 | # rescanning dud devices (which can take a very long time). |
3399ae32 | 84 | # By default this cache is stored in the @DEFAULT_SYS_DIR@/@DEFAULT_CACHE_SUBDIR@ directory |
87cec8eb AK |
85 | # in a file called '.cache'. |
86 | # It is safe to delete the contents: the tools regenerate it. | |
87 | # (The old setting 'cache' is still respected if neither of | |
88 | # these new ones is present.) | |
3399ae32 | 89 | cache_dir = "@DEFAULT_SYS_DIR@/@DEFAULT_CACHE_SUBDIR@" |
87cec8eb | 90 | cache_file_prefix = "" |
c05bd981 | 91 | |
a9c0e97c | 92 | # You can turn off writing this cache file by setting this to 0. |
c05bd981 | 93 | write_cache_state = 1 |
a6483727 | 94 | |
01c6121b AK |
95 | # Advanced settings. |
96 | ||
a6483727 AK |
97 | # List of pairs of additional acceptable block device types found |
98 | # in /proc/devices with maximum (non-zero) number of partitions. | |
99 | # types = [ "fd", 16 ] | |
a8537e6f AK |
100 | |
101 | # If sysfs is mounted (2.6 kernels) restrict device scanning to | |
102 | # the block devices it believes are valid. | |
01c6121b | 103 | # 1 enables; 0 disables. |
8929ce66 | 104 | sysfs_scan = 1 |
01c6121b | 105 | |
07113bee MB |
106 | # By default, LVM2 will ignore devices used as component paths |
107 | # of device-mapper multipath devices. | |
108 | # 1 enables; 0 disables. | |
109 | multipath_component_detection = 1 | |
110 | ||
01c6121b AK |
111 | # By default, LVM2 will ignore devices used as components of |
112 | # software RAID (md) devices by looking for md superblocks. | |
113 | # 1 enables; 0 disables. | |
114 | md_component_detection = 1 | |
f247a4e7 | 115 | |
86fb36e2 | 116 | # By default, if a PV is placed directly upon an md device, LVM2 |
bb6a3a96 | 117 | # will align its data blocks with the md device's stripe-width. |
86fb36e2 AK |
118 | # 1 enables; 0 disables. |
119 | md_chunk_alignment = 1 | |
120 | ||
4efb1d9c | 121 | # Default alignment of the start of a data area in MB. If set to 0, |
5c8cba0b | 122 | # a value of 64KB will be used. Set to 1 for 1MiB, 2 for 2MiB, etc. |
7063efe1 | 123 | # default_data_alignment = @DEFAULT_DATA_ALIGNMENT@ |
4efb1d9c | 124 | |
2aabcc1c MS |
125 | # By default, the start of a PV's data area will be a multiple of |
126 | # the 'minimum_io_size' or 'optimal_io_size' exposed in sysfs. | |
127 | # - minimum_io_size - the smallest request the device can perform | |
128 | # w/o incurring a read-modify-write penalty (e.g. MD's chunk size) | |
129 | # - optimal_io_size - the device's preferred unit of receiving I/O | |
130 | # (e.g. MD's stripe width) | |
131 | # minimum_io_size is used if optimal_io_size is undefined (0). | |
132 | # If md_chunk_alignment is enabled, that detects the optimal_io_size. | |
133 | # This setting takes precedence over md_chunk_alignment. | |
134 | # 1 enables; 0 disables. | |
135 | data_alignment_detection = 1 | |
136 | ||
8929ce66 | 137 | # Alignment (in KB) of start of data area when creating a new PV. |
4efb1d9c MS |
138 | # md_chunk_alignment and data_alignment_detection are disabled if set. |
139 | # Set to 0 for the default alignment (see: data_alignment_default) | |
140 | # or page size, if larger. | |
8929ce66 AK |
141 | data_alignment = 0 |
142 | ||
57b66035 MS |
143 | # By default, the start of the PV's aligned data area will be shifted by |
144 | # the 'alignment_offset' exposed in sysfs. This offset is often 0 but | |
145 | # may be non-zero; e.g.: certain 4KB sector drives that compensate for | |
146 | # windows partitioning will have an alignment_offset of 3584 bytes | |
147 | # (sector 7 is the lowest aligned logical block, the 4KB sectors start | |
148 | # at LBA -1, and consequently sector 63 is aligned on a 4KB boundary). | |
4efb1d9c | 149 | # But note that pvcreate --dataalignmentoffset will skip this detection. |
57b66035 MS |
150 | # 1 enables; 0 disables. |
151 | data_alignment_offset_detection = 1 | |
152 | ||
f247a4e7 AK |
153 | # If, while scanning the system for PVs, LVM2 encounters a device-mapper |
154 | # device that has its I/O suspended, it waits for it to become accessible. | |
155 | # Set this to 1 to skip such devices. This should only be needed | |
156 | # in recovery situations. | |
157 | ignore_suspended_devices = 0 | |
dff22466 | 158 | |
2db2b7f1 PR |
159 | # During each LVM operation errors received from each device are counted. |
160 | # If the counter of a particular device exceeds the limit set here, no | |
161 | # further I/O is sent to that device for the remainder of the respective | |
501d5786 | 162 | # operation. Setting the parameter to 0 disables the counters altogether. |
976b95d9 PR |
163 | disable_after_error_count = 0 |
164 | ||
dff22466 MS |
165 | # Allow use of pvcreate --uuid without requiring --restorefile. |
166 | require_restorefile_with_uuid = 1 | |
794e94fe | 167 | |
2c56f60d AK |
168 | # Minimum size (in KB) of block devices which can be used as PVs. |
169 | # In a clustered environment all nodes must use the same value. | |
e6f24a52 | 170 | # Any value smaller than 512KB is ignored. |
2c56f60d AK |
171 | |
172 | # Ignore devices smaller than 2MB such as floppy drives. | |
173 | pv_min_size = 2048 | |
174 | ||
175 | # The original built-in setting was 512 up to and including version 2.02.84. | |
176 | # pv_min_size = 512 | |
fdc86703 | 177 | |
ffcb1b9c MS |
178 | # Issue discards to a logical volumes's underlying physical volume(s) when |
179 | # the logical volume is no longer using the physical volumes' space (e.g. | |
180 | # lvremove, lvreduce, etc). Discards inform the storage that a region is | |
181 | # no longer in use. Storage that supports discards advertise the protocol | |
182 | # specific way discards should be issued by the kernel (TRIM, UNMAP, or | |
183 | # WRITE SAME with UNMAP bit set). Not all storage will support or benefit | |
184 | # from discards but SSDs and thinly provisioned LUNs generally do. If set | |
fdc86703 | 185 | # to 1, discards will only be issued if both the storage and kernel provide |
ffcb1b9c | 186 | # support. |
fdc86703 MS |
187 | # 1 enables; 0 disables. |
188 | issue_discards = 0 | |
c05bd981 JT |
189 | } |
190 | ||
eb82bd05 AK |
191 | # This section allows you to configure the way in which LVM selects |
192 | # free space for its Logical Volumes. | |
193 | #allocation { | |
194 | # When searching for free space to extend an LV, the "cling" | |
195 | # allocation policy will choose space on the same PVs as the last | |
196 | # segment of the existing LV. If there is insufficient space and a | |
197 | # list of tags is defined here, it will check whether any of them are | |
198 | # attached to the PVs concerned and then seek to match those PV tags | |
199 | # between existing extents and new extents. | |
200 | # Use the special tag "@*" as a wildcard to match any PV tag. | |
201 | # | |
202 | # Example: LVs are mirrored between two sites within a single VG. | |
203 | # PVs are tagged with either @site1 or @site2 to indicate where | |
204 | # they are situated. | |
205 | # | |
206 | # cling_tag_list = [ "@site1", "@site2" ] | |
207 | # cling_tag_list = [ "@*" ] | |
92ffcda1 AK |
208 | # |
209 | # Changes made in version 2.02.85 extended the reach of the 'cling' | |
210 | # policies to detect more situations where data can be grouped | |
211 | # onto the same disks. Set this to 0 to revert to the previous | |
212 | # algorithm. | |
213 | # | |
214 | # maximise_cling = 1 | |
215 | # | |
216 | # Set to 1 to guarantee that mirror logs will always be placed on | |
217 | # different PVs from the mirror images. This was the default | |
218 | # until version 2.02.85. | |
219 | # | |
220 | # mirror_logs_require_separate_pvs = 0 | |
bd15208c ZK |
221 | # |
222 | # Set to 1 to guarantee that thin pool metadata will always | |
223 | # be placed on different PVs from the pool data. | |
224 | # | |
225 | # thin_pool_metadata_require_separate_pvs = 0 | |
eb82bd05 AK |
226 | #} |
227 | ||
5a52dca9 | 228 | # This section that allows you to configure the nature of the |
c05bd981 JT |
229 | # information that LVM2 reports. |
230 | log { | |
231 | ||
5a52dca9 AK |
232 | # Controls the messages sent to stdout or stderr. |
233 | # There are three levels of verbosity, 3 being the most verbose. | |
c05bd981 | 234 | verbose = 0 |
682c0fef AK |
235 | |
236 | # Should we send log messages through syslog? | |
237 | # 1 is yes; 0 is no. | |
238 | syslog = 1 | |
b9dc2b7e | 239 | |
5a52dca9 AK |
240 | # Should we log error and debug messages to a file? |
241 | # By default there is no log file. | |
242 | #file = "/var/log/lvm2.log" | |
243 | ||
244 | # Should we overwrite the log file each time the program is run? | |
245 | # By default we append. | |
246 | overwrite = 0 | |
247 | ||
248 | # What level of log messages should we send to the log file and/or syslog? | |
249 | # There are 6 syslog-like log levels currently in use - 2 to 7 inclusive. | |
250 | # 7 is the most verbose (LOG_DEBUG). | |
251 | level = 0 | |
8929ce66 | 252 | |
5a52dca9 | 253 | # Format of output messages |
b9dc2b7e AK |
254 | # Whether or not (1 or 0) to indent messages according to their severity |
255 | indent = 1 | |
256 | ||
257 | # Whether or not (1 or 0) to display the command name on each line output | |
258 | command_names = 0 | |
259 | ||
260 | # A prefix to use before the message text (but after the command name, | |
5a52dca9 AK |
261 | # if selected). Default is two spaces, so you can see/grep the severity |
262 | # of each message. | |
b9dc2b7e AK |
263 | prefix = " " |
264 | ||
5a52dca9 | 265 | # To make the messages look similar to the original LVM tools use: |
b9dc2b7e AK |
266 | # indent = 0 |
267 | # command_names = 1 | |
268 | # prefix = " -- " | |
914c9723 AK |
269 | |
270 | # Set this if you want log messages during activation. | |
271 | # Don't use this in low memory situations (can deadlock). | |
272 | # activation = 0 | |
c05bd981 JT |
273 | } |
274 | ||
275 | # Configuration of metadata backups and archiving. In LVM2 when we | |
276 | # talk about a 'backup' we mean making a copy of the metadata for the | |
277 | # *current* system. The 'archive' contains old metadata configurations. | |
278 | # Backups are stored in a human readeable text format. | |
279 | backup { | |
280 | ||
281 | # Should we maintain a backup of the current metadata configuration ? | |
a9c0e97c | 282 | # Use 1 for Yes; 0 for No. |
5a52dca9 | 283 | # Think very hard before turning this off! |
c05bd981 JT |
284 | backup = 1 |
285 | ||
286 | # Where shall we keep it ? | |
5a52dca9 | 287 | # Remember to back up this directory regularly! |
3399ae32 | 288 | backup_dir = "@DEFAULT_SYS_DIR@/@DEFAULT_BACKUP_SUBDIR@" |
c05bd981 | 289 | |
c05bd981 | 290 | # Should we maintain an archive of old metadata configurations. |
a9c0e97c AK |
291 | # Use 1 for Yes; 0 for No. |
292 | # On by default. Think very hard before turning this off. | |
c05bd981 JT |
293 | archive = 1 |
294 | ||
295 | # Where should archived files go ? | |
5a52dca9 | 296 | # Remember to back up this directory regularly! |
3399ae32 | 297 | archive_dir = "@DEFAULT_SYS_DIR@/@DEFAULT_ARCHIVE_SUBDIR@" |
8929ce66 | 298 | |
c05bd981 JT |
299 | # What is the minimum number of archive files you wish to keep ? |
300 | retain_min = 10 | |
301 | ||
302 | # What is the minimum time you wish to keep an archive file for ? | |
303 | retain_days = 30 | |
304 | } | |
305 | ||
5a52dca9 | 306 | # Settings for the running LVM2 in shell (readline) mode. |
c05bd981 JT |
307 | shell { |
308 | ||
309 | # Number of lines of history to store in ~/.lvm_history | |
310 | history_size = 100 | |
311 | } | |
312 | ||
1524c1a4 | 313 | |
5a52dca9 | 314 | # Miscellaneous global LVM2 settings |
c05bd981 | 315 | global { |
8929ce66 | 316 | |
c05bd981 JT |
317 | # The file creation mask for any files and directories created. |
318 | # Interpreted as octal if the first digit is zero. | |
319 | umask = 077 | |
320 | ||
321 | # Allow other users to read the files | |
322 | #umask = 022 | |
323 | ||
324 | # Enabling test mode means that no changes to the on disk metadata | |
a9c0e97c | 325 | # will be made. Equivalent to having the -t option on every |
c05bd981 JT |
326 | # command. Defaults to off. |
327 | test = 0 | |
1524c1a4 | 328 | |
d8ff86fd AK |
329 | # Default value for --units argument |
330 | units = "h" | |
331 | ||
95eaa683 AK |
332 | # Since version 2.02.54, the tools distinguish between powers of |
333 | # 1024 bytes (e.g. KiB, MiB, GiB) and powers of 1000 bytes (e.g. | |
334 | # KB, MB, GB). | |
335 | # If you have scripts that depend on the old behaviour, set this to 0 | |
336 | # temporarily until you update them. | |
337 | si_unit_consistency = 1 | |
338 | ||
5a52dca9 AK |
339 | # Whether or not to communicate with the kernel device-mapper. |
340 | # Set to 0 if you want to use the tools to manipulate LVM metadata | |
341 | # without activating any logical volumes. | |
342 | # If the device-mapper kernel driver is not present in your kernel | |
343 | # setting this to 0 should suppress the error messages. | |
344 | activation = 1 | |
345 | ||
7d1552c9 AK |
346 | # If we can't communicate with device-mapper, should we try running |
347 | # the LVM1 tools? | |
348 | # This option only applies to 2.4 kernels and is provided to help you | |
349 | # switch between device-mapper kernels and LVM1 kernels. | |
350 | # The LVM1 tools need to be installed with .lvm1 suffices | |
351 | # e.g. vgscan.lvm1 and they will stop working after you start using | |
352 | # the new lvm2 on-disk metadata format. | |
353 | # The default value is set when the tools are built. | |
354 | # fallback_to_lvm1 = 0 | |
355 | ||
5a52dca9 AK |
356 | # The default metadata format that commands should use - "lvm1" or "lvm2". |
357 | # The command line override is -M1 or -M2. | |
cf65a124 AK |
358 | # Defaults to "lvm2". |
359 | # format = "lvm2" | |
1524c1a4 AK |
360 | |
361 | # Location of proc filesystem | |
362 | proc = "/proc" | |
5a52dca9 | 363 | |
dc4d7417 | 364 | # Type of locking to use. Defaults to local file-based locking (1). |
5a52dca9 AK |
365 | # Turn locking off by setting to 0 (dangerous: risks metadata corruption |
366 | # if LVM2 commands get run concurrently). | |
dc4d7417 AK |
367 | # Type 2 uses the external shared library locking_library. |
368 | # Type 3 uses built-in clustered locking. | |
663bf8f7 AK |
369 | # Type 4 uses read-only locking which forbids any operations that might |
370 | # change metadata. | |
5a52dca9 AK |
371 | locking_type = 1 |
372 | ||
1cc59fa4 AK |
373 | # Set to 0 to fail when a lock request cannot be satisfied immediately. |
374 | wait_for_locks = 1 | |
375 | ||
dc4d7417 AK |
376 | # If using external locking (type 2) and initialisation fails, |
377 | # with this set to 1 an attempt will be made to use the built-in | |
378 | # clustered locking. | |
379 | # If you are using a customised locking_library you should set this to 0. | |
380 | fallback_to_clustered_locking = 1 | |
381 | ||
382 | # If an attempt to initialise type 2 or type 3 locking failed, perhaps | |
383 | # because cluster components such as clvmd are not running, with this set | |
384 | # to 1 an attempt will be made to use local file-based locking (type 1). | |
385 | # If this succeeds, only commands against local volume groups will proceed. | |
386 | # Volume Groups marked as clustered will be ignored. | |
387 | fallback_to_local_locking = 1 | |
388 | ||
5a52dca9 AK |
389 | # Local non-LV directory that holds file-based locks while commands are |
390 | # in progress. A directory like /tmp that may get wiped on reboot is OK. | |
3399ae32 | 391 | locking_dir = "@DEFAULT_LOCK_DIR@" |
5a52dca9 | 392 | |
663bf8f7 AK |
393 | # Whenever there are competing read-only and read-write access requests for |
394 | # a volume group's metadata, instead of always granting the read-only | |
395 | # requests immediately, delay them to allow the read-write requests to be | |
396 | # serviced. Without this setting, write access may be stalled by a high | |
397 | # volume of read-only requests. | |
398 | # NB. This option only affects locking_type = 1 viz. local file-based | |
399 | # locking. | |
74aa6b56 PR |
400 | prioritise_write_locks = 1 |
401 | ||
5a52dca9 AK |
402 | # Other entries can go here to allow you to load shared libraries |
403 | # e.g. if support for LVM1 metadata was compiled as a shared library use | |
404 | # format_libraries = "liblvm2format1.so" | |
405 | # Full pathnames can be given. | |
406 | ||
407 | # Search this directory first for shared libraries. | |
408 | # library_dir = "/lib" | |
1c792fad AK |
409 | |
410 | # The external locking library to load if locking_type is set to 2. | |
411 | # locking_library = "liblvm2clusterlock.so" | |
99a304bc PR |
412 | |
413 | # Treat any internal errors as fatal errors, aborting the process that | |
414 | # encountered the internal error. Please only enable for debugging. | |
415 | abort_on_internal_errors = 0 | |
b83af516 | 416 | |
cf98c050 ZK |
417 | # Check whether CRC is matching when parsed VG is used multiple times. |
418 | # This is useful to catch unexpected internal cached volume group | |
419 | # structure modification. Please only enable for debugging. | |
420 | detect_internal_vg_cache_corruption = 0 | |
421 | ||
b83af516 AK |
422 | # If set to 1, no operations that change on-disk metadata will be permitted. |
423 | # Additionally, read-only commands that encounter metadata in need of repair | |
424 | # will still be allowed to proceed exactly as if the repair had been | |
425 | # performed (except for the unchanged vg_seqno). | |
426 | # Inappropriate use could mess up your system, so seek advice first! | |
427 | metadata_read_only = 0 | |
d8b1aa19 AK |
428 | |
429 | # 'mirror_segtype_default' defines which segtype will be used when the | |
430 | # shorthand '-m' option is used for mirroring. The possible options are: | |
431 | # | |
432 | # "mirror" - The original RAID1 implementation provided by LVM2/DM. It is | |
433 | # characterized by a flexible log solution (core, disk, mirrored) | |
434 | # and by the necessity to block I/O while reconfiguring in the | |
435 | # event of a failure. Snapshots of this type of RAID1 can be | |
436 | # problematic. | |
437 | # | |
438 | # "raid1" - This implementation leverages MD's RAID1 personality through | |
439 | # device-mapper. It is characterized by a lack of log options. | |
440 | # (A log is always allocated for every device and they are placed | |
441 | # on the same device as the image - no separate devices are | |
442 | # required.) This mirror implementation does not require I/O | |
443 | # to be blocked in the kernel in the event of a failure. | |
444 | # | |
445 | # Specify the '--type <mirror|raid1>' option to override this default | |
446 | # setting. | |
447 | mirror_segtype_default = "mirror" | |
c5499820 | 448 | |
a1991f10 AK |
449 | # The default format for displaying LV names in lvdisplay was changed |
450 | # in version 2.02.89 to show the LV name and path separately. | |
451 | # Previously this was always shown as /dev/vgname/lvname even when that | |
452 | # was never a valid path in the /dev filesystem. | |
453 | # Set to 1 to reinstate the previous format. | |
454 | # | |
455 | # lvdisplay_shows_full_device_path = 0 | |
dae08226 PR |
456 | |
457 | # Whether to use (trust) a running instance of lvmetad. If this is set to | |
458 | # 0, all commands fall back to the usual scanning mechanisms. When set to 1 | |
459 | # *and* when lvmetad is running (it is not auto-started), the volume group | |
460 | # metadata and PV state flags are obtained from the lvmetad instance and no | |
461 | # scanning is done by the individual commands. In a setup with lvmetad, | |
462 | # lvmetad udev rules *must* be set up for LVM to work correctly. Without | |
463 | # proper udev rules, all changes in block device configuration will be | |
464 | # *ignored* until a manual 'vgscan' is performed. | |
465 | use_lvmetad = 0 | |
a9c0e97c | 466 | } |
1524c1a4 | 467 | |
a3f950d5 | 468 | activation { |
2243718f AK |
469 | # Set to 1 to perform internal checks on the operations issued to |
470 | # libdevmapper. Useful for debugging problems with activation. | |
471 | # Some of the checks may be expensive, so it's best to use this | |
472 | # only when there seems to be a problem. | |
473 | checks = 0 | |
474 | ||
cda69e17 | 475 | # Set to 0 to disable udev synchronisation (if compiled into the binaries). |
cf8235e0 AK |
476 | # Processes will not wait for notification from udev. |
477 | # They will continue irrespective of any possible udev processing | |
478 | # in the background. You should only use this if udev is not running | |
479 | # or has rules that ignore the devices LVM2 creates. | |
480 | # The command line argument --nodevsync takes precedence over this setting. | |
481 | # If set to 1 when udev is not running, and there are LVM2 processes | |
9a9026c2 | 482 | # waiting for udev, run 'dmsetup udevcomplete_all' manually to wake them up. |
cf8235e0 AK |
483 | udev_sync = 1 |
484 | ||
cda69e17 PR |
485 | # Set to 0 to disable the udev rules installed by LVM2 (if built with |
486 | # --enable-udev_rules). LVM2 will then manage the /dev nodes and symlinks | |
487 | # for active logical volumes directly itself. | |
488 | # N.B. Manual intervention may be required if this setting is changed | |
489 | # while any logical volumes are active. | |
490 | udev_rules = 1 | |
491 | ||
0437bccc AK |
492 | # Set to 1 for LVM2 to verify operations performed by udev. This turns on |
493 | # additional checks (and if necessary, repairs) on entries in the device | |
494 | # directory after udev has completed processing its events. | |
495 | # Useful for diagnosing problems with LVM2/udev interactions. | |
496 | verify_udev_operations = 0 | |
418663b6 | 497 | |
9fa1d30a PR |
498 | # If set to 1 and if deactivation of an LV fails, perhaps because |
499 | # a process run from a quick udev rule temporarily opened the device, | |
500 | # retry the operation for a few seconds before failing. | |
501 | retry_deactivation = 1 | |
502 | ||
8c5bcdab AK |
503 | # How to fill in missing stripes if activating an incomplete volume. |
504 | # Using "error" will make inaccessible parts of the device return | |
505 | # I/O errors on access. You can instead use a device path, in which | |
506 | # case, that device will be used to in place of missing stripes. | |
507 | # But note that using anything other than "error" with mirrored | |
508 | # or snapshotted volumes is likely to result in data corruption. | |
509 | missing_stripe_filler = "error" | |
3a55f5d5 | 510 | |
8dd6036d AK |
511 | # The linear target is an optimised version of the striped target |
512 | # that only handles a single stripe. Set this to 0 to disable this | |
513 | # optimisation and always use the striped target. | |
514 | use_linear_target = 1 | |
515 | ||
914c9723 | 516 | # How much stack (in KB) to reserve for use while devices suspended |
57f4dfc6 ZK |
517 | # Prior to version 2.02.89 this used to be set to 256KB |
518 | reserved_stack = 64 | |
914c9723 AK |
519 | |
520 | # How much memory (in KB) to reserve for use while devices suspended | |
521 | reserved_memory = 8192 | |
522 | ||
523 | # Nice value used while devices suspended | |
524 | process_priority = -18 | |
de17d760 AK |
525 | |
526 | # If volume_list is defined, each LV is only activated if there is a | |
527 | # match against the list. | |
528 | # "vgname" and "vgname/lvname" are matched exactly. | |
529 | # "@tag" matches any tag set in the LV or VG. | |
530 | # "@*" matches if any tag defined on the host is also set in the LV or VG | |
531 | # | |
532 | # volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ] | |
aeb2c277 | 533 | |
a18dcfb5 AK |
534 | # If read_only_volume_list is defined, each LV that is to be activated |
535 | # is checked against the list, and if it matches, it as activated | |
536 | # in read-only mode. (This overrides '--permission rw' stored in the | |
537 | # metadata.) | |
538 | # "vgname" and "vgname/lvname" are matched exactly. | |
539 | # "@tag" matches any tag set in the LV or VG. | |
540 | # "@*" matches if any tag defined on the host is also set in the LV or VG | |
541 | # | |
542 | # read_only_volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ] | |
543 | ||
aeb2c277 AK |
544 | # Size (in KB) of each copy operation when mirroring |
545 | mirror_region_size = 512 | |
546 | ||
b4068515 AK |
547 | # Setting to use when there is no readahead value stored in the metadata. |
548 | # | |
549 | # "none" - Disable readahead. | |
550 | # "auto" - Use default value chosen by kernel. | |
551 | readahead = "auto" | |
552 | ||
d0981401 JEB |
553 | # 'raid_fault_policy' defines how a device failure in a RAID logical |
554 | # volume is handled. This includes logical volumes that have the following | |
555 | # segment types: raid1, raid4, raid5*, and raid6*. | |
556 | # | |
557 | # In the event of a failure, the following policies will determine what | |
558 | # actions are performed during the automated response to failures (when | |
559 | # dmeventd is monitoring the RAID logical volume) and when 'lvconvert' is | |
560 | # called manually with the options '--repair' and '--use-policies'. | |
561 | # | |
562 | # "warn" - Use the system log to warn the user that a device in the RAID | |
563 | # logical volume has failed. It is left to the user to run | |
564 | # 'lvconvert --repair' manually to remove or replace the failed | |
565 | # device. As long as the number of failed devices does not | |
566 | # exceed the redundancy of the logical volume (1 device for | |
567 | # raid4/5, 2 for raid6, etc) the logical volume will remain | |
568 | # usable. | |
569 | # | |
570 | # "allocate" - Attempt to use any extra physical volumes in the volume | |
571 | # group as spares and replace faulty devices. | |
572 | # | |
573 | raid_fault_policy = "warn" | |
574 | ||
aeb2c277 | 575 | # 'mirror_image_fault_policy' and 'mirror_log_fault_policy' define |
d0981401 JEB |
576 | # how a device failure affecting a mirror (of "mirror" segment type) is |
577 | # handled. A mirror is composed of mirror images (copies) and a log. | |
aeb2c277 AK |
578 | # A disk log ensures that a mirror does not need to be re-synced |
579 | # (all copies made the same) every time a machine reboots or crashes. | |
580 | # | |
c26488d3 MB |
581 | # In the event of a failure, the specified policy will be used to determine |
582 | # what happens. This applies to automatic repairs (when the mirror is being | |
583 | # monitored by dmeventd) and to manual lvconvert --repair when | |
584 | # --use-policies is given. | |
aeb2c277 AK |
585 | # |
586 | # "remove" - Simply remove the faulty device and run without it. If | |
587 | # the log device fails, the mirror would convert to using | |
588 | # an in-memory log. This means the mirror will not | |
589 | # remember its sync status across crashes/reboots and | |
590 | # the entire mirror will be re-synced. If a | |
591 | # mirror image fails, the mirror will convert to a | |
592 | # non-mirrored device if there is only one remaining good | |
593 | # copy. | |
594 | # | |
595 | # "allocate" - Remove the faulty device and try to allocate space on | |
596 | # a new device to be a replacement for the failed device. | |
597 | # Using this policy for the log is fast and maintains the | |
598 | # ability to remember sync state through crashes/reboots. | |
599 | # Using this policy for a mirror device is slow, as it | |
600 | # requires the mirror to resynchronize the devices, but it | |
601 | # will preserve the mirror characteristic of the device. | |
602 | # This policy acts like "remove" if no suitable device and | |
603 | # space can be allocated for the replacement. | |
aeb2c277 | 604 | # |
c26488d3 MB |
605 | # "allocate_anywhere" - Not yet implemented. Useful to place the log device |
606 | # temporarily on same physical volume as one of the mirror | |
607 | # images. This policy is not recommended for mirror devices | |
608 | # since it would break the redundant nature of the mirror. This | |
609 | # policy acts like "remove" if no suitable device and space can | |
610 | # be allocated for the replacement. | |
aeb2c277 AK |
611 | |
612 | mirror_log_fault_policy = "allocate" | |
03984e05 | 613 | mirror_image_fault_policy = "remove" |
18b82048 | 614 | |
a341cab7 PR |
615 | # 'snapshot_autoextend_threshold' and 'snapshot_autoextend_percent' define |
616 | # how to handle automatic snapshot extension. The former defines when the | |
617 | # snapshot should be extended: when its space usage exceeds this many | |
618 | # percent. The latter defines how much extra space should be allocated for | |
619 | # the snapshot, in percent of its current size. | |
620 | # | |
621 | # For example, if you set snapshot_autoextend_threshold to 70 and | |
622 | # snapshot_autoextend_percent to 20, whenever a snapshot exceeds 70% usage, | |
623 | # it will be extended by another 20%. For a 1G snapshot, using up 700M will | |
624 | # trigger a resize to 1.2G. When the usage exceeds 840M, the snapshot will | |
625 | # be extended to 1.44G, and so on. | |
626 | # | |
627 | # Setting snapshot_autoextend_threshold to 100 disables automatic | |
628 | # extensions. The minimum value is 50 (A setting below 50 will be treated | |
629 | # as 50). | |
630 | ||
631 | snapshot_autoextend_threshold = 100 | |
632 | snapshot_autoextend_percent = 20 | |
633 | ||
0e0f706f ZK |
634 | # 'thin_pool_autoextend_threshold' and 'thin_pool_autoextend_percent' define |
635 | # how to handle automatic pool extension. The former defines when the | |
636 | # pool should be extended: when its space usage exceeds this many | |
637 | # percent. The latter defines how much extra space should be allocated for | |
638 | # the pool, in percent of its current size. | |
639 | # | |
640 | # For example, if you set thin_pool_autoextend_threshold to 70 and | |
641 | # thin_pool_autoextend_percent to 20, whenever a pool exceeds 70% usage, | |
642 | # it will be extended by another 20%. For a 1G pool, using up 700M will | |
643 | # trigger a resize to 1.2G. When the usage exceeds 840M, the pool will | |
644 | # be extended to 1.44G, and so on. | |
645 | # | |
646 | # Setting thin_pool_autoextend_threshold to 100 disables automatic | |
647 | # extensions. The minimum value is 50 (A setting below 50 will be treated | |
648 | # as 50). | |
649 | ||
650 | thin_pool_autoextend_threshold = 100 | |
651 | thin_pool_autoextend_percent = 20 | |
652 | ||
6c7a6c07 ZK |
653 | # Full path of the utility called to check that a thin metadata device |
654 | # is in a state that allows it to be used. | |
655 | # Each time a thin pool needs to be activated, this utility is executed. | |
656 | # The activation will only proceed if the utility has an exit status of 0. | |
657 | # Set to "" to skip this check. (Not recommended.) | |
658 | # The thin tools are available as part of the device-mapper-persistent-data | |
659 | # package from https://github.com/jthornber/thin-provisioning-tools. | |
660 | # | |
661 | thin_check_executable = "/sbin/thin_check -q" | |
662 | ||
18b82048 ZK |
663 | # While activating devices, I/O to devices being (re)configured is |
664 | # suspended, and as a precaution against deadlocks, LVM2 needs to pin | |
665 | # any memory it is using so it is not paged out. Groups of pages that | |
666 | # are known not to be accessed during activation need not be pinned | |
667 | # into memory. Each string listed in this setting is compared against | |
668 | # each line in /proc/self/maps, and the pages corresponding to any | |
669 | # lines that match are not pinned. On some systems locale-archive was | |
670 | # found to make up over 80% of the memory used by the process. | |
671 | # mlock_filter = [ "locale/locale-archive", "gconv/gconv-modules.cache" ] | |
672 | ||
673 | # Set to 1 to revert to the default behaviour prior to version 2.02.62 | |
674 | # which used mlockall() to pin the whole process's memory while activating | |
675 | # devices. | |
59131572 | 676 | use_mlockall = 0 |
a6bc975a MS |
677 | |
678 | # Monitoring is enabled by default when activating logical volumes. | |
679 | # Set to 0 to disable monitoring or use the --ignoremonitoring option. | |
59131572 AK |
680 | monitoring = 1 |
681 | ||
682 | # When pvmove or lvconvert must wait for the kernel to finish | |
683 | # synchronising or merging data, they check and report progress | |
684 | # at intervals of this number of seconds. The default is 15 seconds. | |
685 | # If this is set to 0 and there is only one thing to wait for, there | |
686 | # are no progress reports, but the process is awoken immediately the | |
687 | # operation is complete. | |
688 | polling_interval = 15 | |
a3f950d5 AK |
689 | } |
690 | ||
5a52dca9 AK |
691 | |
692 | #################### | |
693 | # Advanced section # | |
694 | #################### | |
695 | ||
696 | # Metadata settings | |
697 | # | |
698 | # metadata { | |
699 | # Default number of copies of metadata to hold on each PV. 0, 1 or 2. | |
f3b0ea28 | 700 | # You might want to override it from the command line with 0 |
5a52dca9 AK |
701 | # when running pvcreate on new PVs which are to be added to large VGs. |
702 | ||
f3b0ea28 | 703 | # pvmetadatacopies = 1 |
5a52dca9 | 704 | |
4e118517 | 705 | # Default number of copies of metadata to maintain for each VG. |
9b95a5a9 AK |
706 | # If set to a non-zero value, LVM automatically chooses which of |
707 | # the available metadata areas to use to achieve the requested | |
708 | # number of copies of the VG metadata. If you set a value larger | |
709 | # than the the total number of metadata areas available then | |
710 | # metadata is stored in them all. | |
711 | # The default value of 0 ("unmanaged") disables this automatic | |
712 | # management and allows you to control which metadata areas | |
713 | # are used at the individual PV level using 'pvchange | |
714 | # --metadataignore y/n'. | |
292358a5 DW |
715 | |
716 | # vgmetadatacopies = 0 | |
717 | ||
5a52dca9 AK |
718 | # Approximate default size of on-disk metadata areas in sectors. |
719 | # You should increase this if you have large volume groups or | |
720 | # you want to retain a large on-disk history of your metadata changes. | |
721 | ||
722 | # pvmetadatasize = 255 | |
723 | ||
724 | # List of directories holding live copies of text format metadata. | |
725 | # These directories must not be on logical volumes! | |
726 | # It's possible to use LVM2 with a couple of directories here, | |
727 | # preferably on different (non-LV) filesystems, and with no other | |
728 | # on-disk metadata (pvmetadatacopies = 0). Or this can be in | |
729 | # addition to on-disk metadata areas. | |
914c9723 AK |
730 | # The feature was originally added to simplify testing and is not |
731 | # supported under low memory situations - the machine could lock up. | |
5a52dca9 AK |
732 | # |
733 | # Never edit any files in these directories by hand unless you | |
734 | # you are absolutely sure you know what you are doing! Use | |
735 | # the supplied toolset to make changes (e.g. vgcfgrestore). | |
736 | ||
737 | # dirs = [ "/etc/lvm/metadata", "/mnt/disk2/lvm/metadata2" ] | |
738 | #} | |
739 | ||
54d9d3cf AK |
740 | # Event daemon |
741 | # | |
d9be54ad | 742 | dmeventd { |
898e6f8e AK |
743 | # mirror_library is the library used when monitoring a mirror device. |
744 | # | |
67961c7c PR |
745 | # "libdevmapper-event-lvm2mirror.so" attempts to recover from |
746 | # failures. It removes failed devices from a volume group and | |
747 | # reconfigures a mirror as necessary. If no mirror library is | |
748 | # provided, mirrors are not monitored through dmeventd. | |
749 | ||
d9be54ad | 750 | mirror_library = "libdevmapper-event-lvm2mirror.so" |
67961c7c PR |
751 | |
752 | # snapshot_library is the library used when monitoring a snapshot device. | |
753 | # | |
754 | # "libdevmapper-event-lvm2snapshot.so" monitors the filling of | |
d1e8046f AK |
755 | # snapshots and emits a warning through syslog when the use of |
756 | # the snapshot exceeds 80%. The warning is repeated when 85%, 90% and | |
757 | # 95% of the snapshot is filled. | |
67961c7c | 758 | |
d9be54ad | 759 | snapshot_library = "libdevmapper-event-lvm2snapshot.so" |
d1e8046f | 760 | |
2bc1d759 ZK |
761 | # thin_library is the library used when monitoring a thin device. |
762 | # | |
763 | # "libdevmapper-event-lvm2thin.so" monitors the filling of | |
764 | # pool and emits a warning through syslog when the use of | |
765 | # the pool exceeds 80%. The warning is repeated when 85%, 90% and | |
766 | # 95% of the pool is filled. | |
767 | ||
768 | thin_library = "libdevmapper-event-lvm2thin.so" | |
769 | ||
d1e8046f AK |
770 | # Full path of the dmeventd binary. |
771 | # | |
772 | # executable = "@DMEVENTD_PATH@" | |
d9be54ad | 773 | } |