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