]> sourceware.org Git - lvm2.git/blame - man/lvm.conf.5.in
spacing
[lvm2.git] / man / lvm.conf.5.in
CommitLineData
5951ef33 1.TH LVM.CONF 5 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
ef91884b
AK
2.SH NAME
3lvm.conf \- Configuration file for LVM2
4.SH SYNOPSIS
3399ae32 5.B #DEFAULT_SYS_DIR#/lvm.conf
ef91884b 6.SH DESCRIPTION
c63b155d
ZK
7lvm.conf is loaded during the initialisation phase of
8\fBlvm\fP(8). This file can in turn lead to other files
63bea03e 9being loaded - settings read in later override earlier
c63b155d
ZK
10settings. File timestamps are checked between commands and if
11any have changed, all the files are reloaded.
ef91884b 12.LP
63bea03e 13Use \fBlvm dumpconfig\fP to check what settings are in use.
ba57d1f8 14.SH SYNTAX
75666847
AK
15.LP
16This section describes the configuration file syntax.
17.LP
c63b155d 18Whitespace is not significant unless it is within quotes.
75666847
AK
19This provides a wide choice of acceptable indentation styles.
20Comments begin with # and continue to the end of the line.
21They are treated as whitespace.
22.LP
23Here is an informal grammar:
24.TP
c63b155d 25.BR file " = " value *
ba57d1f8 26.br
75666847
AK
27A configuration file consists of a set of values.
28.TP
c63b155d 29.BR value " = " section " | " assignment
ba57d1f8
JT
30.br
31A value can either be a new section, or an assignment.
75666847 32.TP
c63b155d 33.BR section " = " identifier " '" { "' " value "* '" } '
ba57d1f8 34.br
c63b155d 35A section is groups associated values together.
ba57d1f8 36.br
75666847 37It is denoted by a name and delimited by curly brackets.
ba57d1f8 38.br
ea5b424e 39e.g. backup {
ba57d1f8 40.br
75666847 41 ...
ba57d1f8 42.br
75666847
AK
43 }
44.TP
c63b155d 45.BR assignment " = " identifier " '" = "' ( " array " | " type " )"
ba57d1f8 46.br
75666847 47An assignment associates a type with an identifier.
ba57d1f8 48.br
952d12a5 49e.g. max_archives = 42
ba57d1f8 50.br
75666847 51.TP
c63b155d 52.BR array " = '" [ "' ( " type " '" , "')* " type " '" ] "' | '" [ "' '" ] '
ba57d1f8 53.br
c63b155d 54Inhomogeneous arrays are supported.
ba57d1f8 55.br
c63b155d 56Elements must be separated by commas.
ba57d1f8 57.br
75666847
AK
58An empty array is acceptable.
59.TP
c63b155d
ZK
60.BR type " = " integer " | " float " | " string
61.BR integer " = [0-9]*"
ba57d1f8 62.br
c63b155d 63.BR float " = [0-9]*'" . '[0-9]*
ba57d1f8 64.br
c63b155d 65.B string \fR= '\fB"\fR'.*'\fB"\fR'
75666847 66.IP
ba57d1f8 67Strings must be enclosed in double quotes.
ba57d1f8
JT
68
69.SH SECTIONS
ef91884b
AK
70.LP
71The sections that may be present in the file are:
72.TP
73\fBdevices\fP \(em Device settings
74.IP
75\fBdir\fP \(em Directory in which to create volume group device nodes.
c63b155d 76Defaults to "/dev". Commands also accept this as a prefix on volume
63bea03e 77group names.
ef91884b 78.IP
c63b155d 79\fBscan\fP \(em List of directories to scan recursively for
ef91884b
AK
80LVM physical volumes.
81Devices in directories outside this hierarchy will be ignored.
82Defaults to "/dev".
83.IP
30b95041
AK
84\fBpreferred_names\fP \(em List of patterns compared in turn against
85all the pathnames referencing the same device in in the scanned directories.
86The pathname that matches the earliest pattern in the list is the
3cde54c5 87one used in any output. As an example, if device-mapper multipathing
57b2c9d3
DW
88is used, the following will select multipath device names:
89.br
90\fBdevices { preferred_names = [ "^/dev/mapper/mpath" ] }\fP
30b95041 91.IP
ef91884b
AK
92\fBfilter\fP \(em List of patterns to apply to devices found by a scan.
93Patterns are regular expressions delimited by any character and preceded
94by \fBa\fP (for accept) or \fBr\fP (for reject). The list is traversed
95in order, and the first regex that matches determines if the device
96will be accepted or rejected (ignored). Devices that don't match
63bea03e
AK
97any patterns are accepted. If you want to reject patterns that
98don't match, end the list with "r/.*/".
99If there are several names for the same device (e.g. symbolic links
c540e5d1
AK
100in /dev), if the first matching pattern in the list for any of the names is an
101\fBa\fP pattern, the device is accepted; otherwise if the first matching
102pattern in the list for any of the names is an \fBr\fP pattern it is rejected;
103otherwise it is accepted. As an example, to ignore /dev/cdrom you could use:
57b2c9d3 104.br
c63b155d 105\fBdevices { filter=["r|cdrom|"] }\fP
d315fcb9 106.IP
87cec8eb 107\fBcache_dir\fP \(em Persistent filter cache file directory.
3399ae32 108Defaults to "#DEFAULT_CACHE_DIR#".
d315fcb9 109.IP
c63b155d 110\fBwrite_cache_state\fP \(em Set to 0 to disable the writing out of the
d315fcb9
AK
111persistent filter cache file when \fBlvm\fP exits.
112Defaults to 1.
a6483727
AK
113.IP
114\fBtypes\fP \(em List of pairs of additional acceptable block device types
115found in /proc/devices together with maximum (non-zero) number of
c63b155d 116partitions (normally 16). By default, LVM2 supports ide, sd, md, loop,
63bea03e
AK
117dasd, dac960, nbd, ida, cciss, ubd, ataraid, drbd, power2, i2o_block
118and iseries/vd. Block devices with major
c63b155d 119numbers of different types are ignored by LVM2.
63bea03e
AK
120Example: \fBtypes = ["fd", 16]\fP.
121To create physical volumes on device-mapper volumes
122created outside LVM2, perhaps encrypted ones from \fBcryptsetup\fP,
123you'll need \fBtypes = ["device-mapper", 16]\fP. But if you do this,
c63b155d 124be careful to avoid recursion within LVM2. The figure for number
65b0b42f 125of partitions is not currently used in LVM2 - and might never be.
63bea03e 126.IP
c63b155d 127\fBsysfs_scan\fP \(em If set to 1 and your kernel supports sysfs and
63bea03e
AK
128it is mounted, sysfs will be used as a quick way of filtering out
129block devices that are not present.
130.IP
8929ce66 131\fBmd_component_detection\fP \(em If set to 1, LVM2 will ignore devices
63bea03e 132used as components of software RAID (md) devices by looking for md
c63b155d 133superblocks. This doesn't always work satisfactorily e.g. if a device
63bea03e 134has been reused without wiping the md superblocks first.
8929ce66
AK
135.IP
136\fBmd_chunk_alignment\fP \(em If set to 1, and a Physical Volume is placed
bb6a3a96
MS
137directly upon an md device, LVM2 will align its data blocks with the
138md device's stripe-width.
8929ce66 139.IP
2aabcc1c
MS
140\fBdata_alignment_detection\fP \(em If set to 1, and your kernel provides
141topology information in sysfs for the Physical Volume, the start of data
142area will be aligned on a multiple of the ’minimum_io_size’ or
143’optimal_io_size’ exposed in sysfs. minimum_io_size is the smallest
144request the device can perform without incurring a read-modify-write
145penalty (e.g. MD's chunk size). optimal_io_size is the device's
146preferred unit of receiving I/O (e.g. MD's stripe width). minimum_io_size
147is used if optimal_io_size is undefined (0). If both \fBmd_chunk_alignment\fP
148and \fBdata_alignment_detection\fP are enabled the result of
149\fBdata_alignment_detection\fP is used.
150.IP
8929ce66
AK
151\fBdata_alignment\fP \(em Default alignment (in KB) of start of data area
152when creating a new Physical Volume using the \fBlvm2\fP format.
153If a Physical Volume is placed directly upon an md device and
2aabcc1c
MS
154\fBmd_chunk_alignment\fP or \fBdata_alignment_detection\fP is enabled
155this parameter is ignored. Set to 0 to use the default alignment of
15664KB or the page size, if larger.
57b66035
MS
157.IP
158\fBdata_alignment_offset_detection\fP \(em If set to 1, and your kernel
159provides topology information in sysfs for the Physical Volume, the
160start of the aligned data area of the Physical Volume will be shifted
161by the alignment_offset exposed in sysfs.
8929ce66
AK
162.sp
163To see the location of the first Physical Extent of an existing Physical Volume
164use \fBpvs -o +pe_start\fP . It will be a multiple of the requested
57b66035
MS
165\fBdata_alignment\fP plus the alignment_offset from
166\fBdata_alignment_offset_detection\fP (if enabled) or the pvcreate
167commandline.
976b95d9 168.IP
501d5786
PR
169\fBdisable_after_error_count\fP \(em During each LVM operation errors received
170from each device are counted. If the counter of a particular device exceeds
171the limit set here, no further I/O is sent to that device for the remainder of
172the respective operation. Setting the parameter to 0 disables the counters
173altogether.
8c162552
ZK
174.IP
175\fBpv_min_size\fP \(em
176Minimal size (in KB) of the block device which can be used as a PV.
177In clustered environment all nodes have to use the same value.
919ab56b
AK
178Any value smaller than 512KB is ignored. Up to and include version 2.02.84
179the default was 512KB. From 2.02.85 onwards it was changed to 2MB to
180avoid floppy drives by default.
8c162552 181.IP
fdc86703 182\fBissue_discards\fP \(em
ffcb1b9c
MS
183Issue discards to a logical volumes's underlying physical volume(s) when the
184logical volume is no longer using the physical volumes' space (e.g. lvremove,
185lvreduce, etc). Discards inform the storage that a region is no longer in use.
186Storage that supports discards advertise the protocol specific way discards
187should be issued by the kernel (TRIM, UNMAP, or WRITE SAME with UNMAP bit set).
188Not all storage will support or benefit from discards but SSDs and thinly
189provisioned LUNs generally do. If set to 1, discards will only be issued if
c63b155d 190both the storage and kernel provide support.
fdc86703 191.IP
ef91884b 192.TP
eb82bd05
AK
193\fBallocation\fP \(em Space allocation policies
194.IP
195\fBcling_tag_list\fP \(em List of PV tags matched by the \fBcling\fP allocation policy.
196.IP
197When searching for free space to extend an LV, the \fBcling\fP
198allocation policy will choose space on the same PVs as the last
199segment of the existing LV. If there is insufficient space and a
200list of tags is defined here, it will check whether any of them are
201attached to the PVs concerned and then seek to match those PV tags
202between existing extents and new extents.
c63b155d 203.IP
eb82bd05 204The @ prefix for tags is required.
c63b155d 205Use the special tag "@*" as a wildcard to match any PV tag and so use
eb82bd05
AK
206all PV tags for this purpose.
207.IP
208For example, LVs are mirrored between two sites within a single VG.
209PVs are tagged with either @site1 or @site2 to indicate where
210they are situated and these two PV tags are selected for use with this
211allocation policy:
212.IP
213cling_tag_list = [ "@site1", "@site2" ]
214.TP
ef91884b
AK
215\fBlog\fP \(em Default log settings
216.IP
217\fBfile\fP \(em Location of log file. If this entry is not present, no
218log file is written.
219.IP
220\fBoverwrite\fP \(em Set to 1 to overwrite the log file each time a tool
221is invoked. By default tools append messages to the log file.
222.IP
223\fBlevel\fP \(em Log level (0-9) of messages to write to the file.
2249 is the most verbose; 0 should produce no output.
225.IP
226\fBverbose\fP \(em Default level (0-3) of messages sent to stdout or stderr.
2273 is the most verbose; 0 should produce the least output.
682c0fef
AK
228.IP
229\fBsyslog\fP \(em Set to 1 (the default) to send log messages through syslog.
230Turn off by setting to 0. If you set to an integer greater than one,
c63b155d 231this is used - unvalidated - as the facility. The default is LOG_USER.
682c0fef
AK
232See /usr/include/sys/syslog.h for safe facility values to use.
233For example, LOG_LOCAL0 might be 128.
40df115b 234.IP
c63b155d
ZK
235\fBindent\fP \(em When set to 1 (the default) messages are indented
236according to their severity, two spaces per level.
63bea03e 237Set to 0 to turn off indentation.
40df115b
AK
238.IP
239\fBcommand_names\fP \(em When set to 1, the command name is used as a
240prefix for each message.
241Default is 0 (off).
242.IP
243\fBprefix\fP \(em Prefix used for all messages (after the command name).
244Default is two spaces.
63bea03e
AK
245.IP
246\fBactivation\fP \(em Set to 1 to log messages while
c63b155d 247devices are suspended during activation.
63bea03e
AK
248Only set this temporarily while debugging a problem because
249in low memory situations this setting can cause your machine to lock up.
ef91884b 250.TP
952d12a5 251\fBbackup\fP \(em Configuration for metadata backups.
ef91884b 252.IP
952d12a5
AK
253\fBarchive_dir\fP \(em Directory used for automatic metadata archives.
254Backup copies of former metadata for each volume group are archived here.
3399ae32 255Defaults to "#DEFAULT_ARCHIVE_DIR#".
952d12a5
AK
256.IP
257\fBbackup_dir\fP \(em Directory used for automatic metadata backups.
c63b155d 258A single backup copy of the current metadata for each volume group
952d12a5 259is stored here.
3399ae32 260Defaults to "#DEFAULT_BACKUP_DIR#".
41b2fd5f 261.IP
952d12a5
AK
262\fBarchive\fP \(em Whether or not tools automatically archive existing
263metadata into \fBarchive_dir\fP before making changes to it.
c63b155d
ZK
264Default is 1 (automatic archives enabled).
265Set to 0 to disable.
266Disabling this might make metadata recovery difficult or impossible
952d12a5
AK
267if something goes wrong.
268.IP
c63b155d
ZK
269\fBbackup\fP \(em Whether or not tools make an automatic backup
270into \fBbackup_dir\fP after changing metadata.
952d12a5 271Default is 1 (automatic backups enabled). Set to 0 to disable.
c63b155d 272Disabling this might make metadata recovery difficult or impossible
952d12a5 273if something goes wrong.
41b2fd5f 274.IP
952d12a5
AK
275\fBretain_min\fP \(em Minimum number of archives to keep.
276Defaults to 10.
41b2fd5f 277.IP
952d12a5
AK
278\fBretain_days\fP \(em Minimum number of days to keep archive files.
279Defaults to 30.
ef91884b
AK
280.TP
281\fBshell\fP \(em LVM2 built-in readline shell settings
282.IP
283\fBhistory_size\fP \(em Maximum number of lines of shell history to retain (default 100) in $HOME/.lvm_history
952d12a5
AK
284.TP
285\fBglobal\fP \(em Global settings
286.IP
63bea03e
AK
287\fBtest\fP \(em If set to 1, run tools in test mode i.e. no changes to
288the on-disk metadata will get made. It's equivalent to having the
289-t option on every command.
290.IP
291\fBactivation\fP \(em Set to 0 to turn off all communication with
292the device-mapper driver. Useful if you want to manipulate logical
293volumes while device-mapper is not present in your kernel.
9fea2775 294.IP
48a00f13
AK
295\fBproc\fP \(em Mount point of proc filesystem.
296Defaults to /proc.
297.IP
952d12a5
AK
298\fBumask\fP \(em File creation mask for any files and directories created.
299Interpreted as octal if the first digit is zero.
c63b155d 300Defaults to 077.
952d12a5 301Use 022 to allow other users to read the files by default.
65b0b42f
AK
302.IP
303\fBformat\fP \(em The default value of \fB--metadatatype\fP used
c63b155d 304to determine which format of metadata to use when creating new
65b0b42f
AK
305physical volumes and volume groups. \fBlvm1\fP or \fBlvm2\fP.
306.IP
c63b155d 307\fBfallback_to_lvm1\fP \(em Set this to 1 if you need to
65b0b42f
AK
308be able to switch between 2.4 kernels using LVM1 and kernels
309including device-mapper.
310The LVM2 tools should be installed as normal and
311the LVM1 tools should be installed with a .lvm1 suffix e.g.
c63b155d 312vgscan.lvm1.
65b0b42f 313If an LVM2 tool is then run but unable to communicate
c63b155d
ZK
314with device-mapper, it will automatically invoke the equivalent LVM1
315version of the tool. Note that for LVM1 tools to
316manipulate physical volumes and volume groups created by LVM2 you
65b0b42f
AK
317must use \fB--metadataformat lvm1\fP when creating them.
318.IP
319\fBlibrary_dir\fP \(em A directory searched for LVM2's shared libraries
320ahead of the places \fBdlopen\fP (3) searches.
321.IP
322\fBformat_libraries\fP \(em A list of shared libraries to load that contain
323code to process different formats of metadata. For example, liblvm2formatpool.so
324is needed to read GFS pool metadata if LVM2 was configured \fB--with-pool=shared\fP.
325.IP
326\fBlocking_type\fP \(em What type of locking to use.
3271 is the default, which use flocks on files in \fBlocking_dir\fP
328(see below) to
329avoid conflicting LVM2 commands running concurrently on a single
330machine. 0 disables locking and risks corrupting your metadata.
331If set to 2, the tools will load the external \fBlocking_library\fP
332(see below).
c63b155d 333If the tools were configured \fB--with-cluster=internal\fP
65b0b42f 334(the default) then 3 means to use built-in cluster-wide locking.
663bf8f7
AK
335Type 4 enforces read-only metadata and forbids any operations that
336might want to modify Volume Group metadata.
65b0b42f
AK
337All changes to logical volumes and their states are communicated
338using locks.
339.IP
1cc59fa4
AK
340\fBwait_for_locks\fP \(em When set to 1, the default, the tools
341wait if a lock request cannot be satisfied immediately.
342When set to 0, the operation is aborted instead.
343.IP
65b0b42f
AK
344\fBlocking_dir\fP \(em The directory LVM2 places its file locks
345if \fBlocking_type\fP is set to 1. The default is \fB/var/lock/lvm\fP.
346.IP
347\fBlocking_library\fP \(em The name of the external locking
348library to load if \fBlocking_type\fP is set to 2.
1c792fad 349The default is \fBliblvm2clusterlock.so\fP. If you need to write
65b0b42f
AK
350such a library, look at the lib/locking source code directory.
351.TP
352\fBtags\fP \(em Host tag settings
353.IP
354\fBhosttags\fP \(em If set to 1, create a host tag with the machine name.
355Setting this to 0 does nothing, neither creating nor destroying any tag.
356The machine name used is the nodename as returned by \fBuname\fP (2).
357.IP
c63b155d 358Additional host tags to be set can be listed here as subsections.
65b0b42f 359The @ prefix for tags is optional.
c63b155d
ZK
360Each of these host tag subsections can contain a \fBhost_list\fP
361array of host names. If any one of these entries matches the machine
362name exactly then the host tag gets defined on this particular host,
65b0b42f
AK
363otherwise it doesn't.
364.IP
365After lvm.conf has been processed, LVM2 works through each host
366tag that has been defined in turn, and if there is a configuration
367file called lvm_\fB<host_tag>\fP.conf it attempts to load it.
368Any settings read in override settings found in earlier files.
369Any additional host tags defined get appended to the search list,
370so in turn they can lead to further configuration files being processed.
371Use \fBlvm dumpconfig\fP to check the result of config
372file processing.
373.IP
374The following example always sets host tags \fBtag1\fP and
375sets \fBtag2\fP on machines fs1 and fs2:
376.IP
377tags { tag1 { } tag2 { host_list = [ "fs1", "fs2" ] } }
378.IP
379These options are useful if you are replicating configuration files
380around a cluster. Use of \fBhosttags = 1\fP means every machine
c63b155d 381can have static and identical local configuration files yet use
65b0b42f 382different settings and activate different logical volumes by
c63b155d 383default. See also \fBvolume_list\fP below and \fB--addtag\fP
65b0b42f
AK
384in \fBlvm\fP (8).
385.TP
386\fBactivation\fP \(em Settings affecting device-mapper activation
387.IP
8c5bcdab
AK
388\fBmissing_stripe_filler\fP \(em When activating an incomplete logical
389volume in partial mode, this option dictates how the missing data is
390replaced. A value of "error" will cause activation to create error
391mappings for the missing data, meaning that read access to missing
392portions of the volume will result in I/O errors. You can instead also
393use a device path, and in that case this device will be used in place of
394missing stripes. However, note that using anything other than
395"error" with mirrored or snapshotted volumes is likely to result in data
396corruption. For instructions on how to create a device that always
397returns zeros, see \fBlvcreate\fP (8).
65b0b42f
AK
398.IP
399\fBmirror_region_size\fP \(em Unit size in KB for copy operations
400when mirroring.
401.IP
c63b155d 402\fBreadahead\fP \(em Used when there is no readahead value stored
b4068515
AK
403in the volume group metadata. Set to \fBnone\fP to disable
404readahead in these circumstances or \fBauto\fP to use the default
405value chosen by the kernel.
406.IP
c63b155d
ZK
407\fBreserved_memory\fP, \fBreserved_stack\fP \(em How many KB to reserve
408for LVM2 to use while logical volumes are suspended. If insufficient
65b0b42f
AK
409memory is reserved before suspension, there is a risk of machine deadlock.
410.IP
411\fBprocess_priority\fP \(em The nice value to use while devices are
412suspended. This is set to a high priority so that logical volumes
413are suspended (with I/O generated by other processes to those
414logical volumes getting queued) for the shortest possible time.
415.IP
416\fBvolume_list\fP \(em This acts as a filter through which
417all requests to activate a logical volume on this machine
418are passed. A logical volume is only activated if it matches
419an item in the list. Tags must be preceded by @ and are checked
c63b155d 420against all tags defined in the logical volume and volume group
65b0b42f
AK
421metadata for a match.
422@* is short-hand to check every tag set on the host machine (see
423\fBtags\fP above).
424Logical volume and volume groups can also be included in the list
425by name e.g. vg00, vg00/lvol1.
b5ca3d1e
AK
426.IP
427\fBread_only_volume_list\fP \(em This acts as a filter through
428which all requests to activate a logical volume on this machine
429are passed. A logical volume is activated in read-only mode (instead
430of read-write) if it matches an item in the list. Volumes must first
431pass the \fBvolume_list\fP filter, if present. Tags must be preceded
432by @ and are checked against all tags defined in the logical volume
433and volume group metadata for a match.
434@* is short-hand to check every tag set on the host machine (see
435\fBtags\fP above).
436Logical volume and volume groups can also be included in the list
437by name e.g. vg00, vg00/lvol1.
65b0b42f
AK
438.TP
439\fBmetadata\fP \(em Advanced metadata settings
440.IP
441\fBpvmetadatacopies\fP \(em When creating a physical volume using the
442LVM2 metadata format, this is the default number of copies of metadata
c63b155d
ZK
443to store on each physical volume.
444Currently it can be set to 0, 1 or 2. The default is 1.
65b0b42f
AK
445If set to 2, one copy is placed at the beginning of the disk
446and the other is placed at the end.
8c013d78
DW
447It can be overridden on the command line with \fB--pvmetadatacopies\fP
448(see \fBpvcreate\fP).
65b0b42f
AK
449If creating a volume group with just one physical volume, it's a
450good idea to have 2 copies. If creating a large volume group with
451many physical volumes, you may decide that 3 copies of the metadata
452is sufficient, i.e. setting it to 1 on three of the physical volumes,
c63b155d 453and 0 on the rest. Every volume group must contain at least one
65b0b42f
AK
454physical volume with at least 1 copy of the metadata (unless using
455the text files described below). The disadvantage of having lots
456of copies is that every time the tools access the volume group, every
457copy of the metadata has to be accessed, and this slows down the
458tools.
459.IP
460\fBpvmetadatasize\fP \(em Approximate number of sectors to set aside
461for each copy of the metadata. Volume groups with large numbers of
c63b155d 462physical or logical volumes, or volumes groups containing complex
65b0b42f
AK
463logical volume structures will need additional space for their metadata.
464The metadata areas are treated as circular buffers, so
465unused space becomes filled with an archive of the most recent
466previous versions of the metadata.
467.IP
7985f80c
DW
468\fBpvmetadataignore\fP When creating a physical volume using the LVM2
469metadata format, this states whether metadata areas should be ignored.
470The default is "n". If metadata areas on a physical volume are ignored,
471LVM will not not store metadata in the metadata areas present on newly
472created Physical Volumes. The option can be overridden on the command
8c013d78
DW
473line with \fB--metadataignore\fP (See \fBpvcreate\fP and \fBpvchange\fP).
474Metadata areas cannot be created or extended after Logical Volumes have
475been allocated on the device.
7985f80c
DW
476If you do not want to store metadata on this device, it is still wise
477always to allocate a metadata area (use a non-zero value for
1c0c6cc8 478\fB--pvmetadatacopies\fP) in case you need it in the future and to use
7985f80c
DW
479this option to instruct LVM2 to ignore it.
480.IP
9e111ef6
DW
481\fBvgmetadatacopies\fP \(em When creating a volume group using the
482LVM2 metadata format, this is the default number of copies of metadata
483desired across all the physical volumes in the volume group. If set to
484a non-zero value, LVM will automatically set or clear the metadataignore
8c013d78
DW
485flag on the physical volumes (see \fBpvcreate\fP and \fBpvchange\fP
486\fB--metadataignore\fP) in order to achieve the desired number of metadata
487copies. An LVM command that adds or removes physical volumes (for example,
488\fBvgextend\fP, \fBvgreduce\fP, \fBvgsplit\fP, or \fBvgmerge\fP), may cause
489LVM to automatically set or clear the metadataignore flags. Also, if
490physical volumes go missing or reappear, or a new number of copies is
491explicitly set (see \fBvgchange --vgmetadatacopies\fP), LVM may adjust
492the metadataignore flags.
9e111ef6
DW
493Set \fBvgmetadatacopies\fP to 0 instructs LVM not to set or clear the
494metadataignore flags automatically. You may set a value larger than the
495sum of all metadata areas on all physical volumes. The value can
496be overridden on the command line with \fB--vgmetadatacopies\fP for various
497commands (for example, \fBvgcreate\fP and \fBvgchange\fP), and can be
498queryied with the \fBvg_mda_copies\fP field of \fBvgs\fP. This option
499is useful for volume groups containing large numbers of physical volumes
500with metadata as it may be used to minimize metadata read and write overhead.
501.IP
65b0b42f
AK
502\fBdirs\fP \(em List of directories holding live copies of LVM2
503metadata as text files. These directories must not be on logical
504volumes. It is possible to use LVM2 with a couple of directories
505here, preferably on different (non-logical-volume) filesystems
506and with no other on-disk metadata, \fBpvmetadatacopies = 0\fP.
507Alternatively these directories can be in addition to the
508on-disk metadata areas. This feature was created during the
509development of the LVM2 metadata before the new on-disk metadata
c63b155d
ZK
510areas were designed and no longer gets tested.
511It is not supported under low-memory conditions, and it is
512important never to edit these metadata files unless you fully
513understand how things work: to make changes you should always use
65b0b42f 514the tools as normal, or else vgcfgbackup, edit backup, vgcfgrestore.
ef91884b 515.SH FILES
3399ae32 516.I #DEFAULT_SYS_DIR#/lvm.conf
c63b155d 517.br
3399ae32 518.I #DEFAULT_ARCHIVE_DIR#
c63b155d 519.br
3399ae32 520.I #DEFAULT_BACKUP_DIR#
c63b155d 521.br
3399ae32 522.I #DEFAULT_CACHE_DIR#/.cache
c63b155d 523.br
3399ae32 524.I #DEFAULT_LOCK_DIR#
ef91884b 525.SH SEE ALSO
65b0b42f
AK
526.BR lvm (8),
527.BR umask (2),
528.BR uname (2),
529.BR dlopen (3),
530.BR syslog (3),
682c0fef 531.BR syslog.conf (5)
This page took 0.14609 seconds and 5 git commands to generate.