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