1VGCHANGE(8) System Manager's Manual VGCHANGE(8)
2
3
4
6 vgchange - Change volume group attributes
7
9 vgchange option_args position_args
10 [ option_args ]
11 [ position_args ]
12
13 -a|--activate y|n|ay
14 --activationmode partial|degraded|complete
15 --addtag Tag
16 --alloc contiguous|cling|cling_by_tags|normal|anywhere|inherit
17 -A|--autobackup y|n
18 -c|--clustered y|n
19 --commandprofile String
20 --config String
21 -d|--debug
22 --deltag Tag
23 --detachprofile
24 --driverloaded y|n
25 -f|--force
26 -h|--help
27 -K|--ignoreactivationskip
28 --ignorelockingfailure
29 --ignoremonitoring
30 --ignoreskippedcluster
31 --lockopt String
32 --lockstart
33 --lockstop
34 --locktype sanlock|dlm|none
35 -l|--logicalvolume Number
36 --longhelp
37 -p|--maxphysicalvolumes Number
38 --metadataprofile String
39 --monitor y|n
40 --noudevsync
41 -P|--partial
42 -s|--physicalextentsize Size[m|UNIT]
43 --poll y|n
44 --profile String
45 --pvmetadatacopies 0|1|2
46 -q|--quiet
47 --refresh
48 --reportformat basic|json
49 -x|--resizeable y|n
50 -S|--select String
51 --sysinit
52 --systemid String
53 -t|--test
54 -u|--uuid
55 -v|--verbose
56 --version
57 --[vg]metadatacopies all|unmanaged|Number
58 -y|--yes
59
61 vgchange changes VG attributes, changes LV activation in the kernel,
62 and includes other utilities for VG maintenance.
63
65 Change a general VG attribute.
66 For options listed in parentheses, any one is
67 required, after which the others are optional.
68
69 vgchange
70 ( -l|--logicalvolume Number,
71 -p|--maxphysicalvolumes Number,
72 -u|--uuid,
73 -c|--clustered y|n,
74 -s|--physicalextentsize Size[m|UNIT],
75 -x|--resizeable y|n,
76 --addtag Tag,
77 --deltag Tag,
78 --alloc contiguous|cling|cling_by_tags|normal|any‐
79 where|inherit,
80 --pvmetadatacopies 0|1|2,
81 --[vg]metadatacopies all|unmanaged|Number,
82 --profile String,
83 --detachprofile,
84 --metadataprofile String )
85 [ -A|--autobackup y|n ]
86 [ -S|--select String ]
87 [ -f|--force ]
88 [ --poll y|n ]
89 [ --ignoremonitoring ]
90 [ --ignoreskippedcluster ]
91 [ --noudevsync ]
92 [ --reportformat basic|json ]
93 [ COMMON_OPTIONS ]
94 [ VG|Tag|Select ... ]
95 -
96
97 Start or stop monitoring LVs from dmeventd.
98
99 vgchange --monitor y|n
100 [ -A|--autobackup y|n ]
101 [ -S|--select String ]
102 [ -f|--force ]
103 [ --sysinit ]
104 [ --ignorelockingfailure ]
105 [ --poll y|n ]
106 [ --ignoremonitoring ]
107 [ --ignoreskippedcluster ]
108 [ --noudevsync ]
109 [ --reportformat basic|json ]
110 [ COMMON_OPTIONS ]
111 [ VG|Tag|Select ... ]
112 -
113
114 Start or stop processing LV conversions.
115
116 vgchange --poll y|n
117 [ -A|--autobackup y|n ]
118 [ -S|--select String ]
119 [ -f|--force ]
120 [ --ignorelockingfailure ]
121 [ --ignoremonitoring ]
122 [ --ignoreskippedcluster ]
123 [ --noudevsync ]
124 [ --reportformat basic|json ]
125 [ COMMON_OPTIONS ]
126 [ VG|Tag|Select ... ]
127 -
128
129 Activate or deactivate LVs.
130
131 vgchange -a|--activate y|n|ay
132 [ -K|--ignoreactivationskip ]
133 [ -P|--partial ]
134 [ -A|--autobackup y|n ]
135 [ -S|--select String ]
136 [ -f|--force ]
137 [ --activationmode partial|degraded|complete ]
138 [ --sysinit ]
139 [ --ignorelockingfailure ]
140 [ --monitor y|n ]
141 [ --poll y|n ]
142 [ --ignoremonitoring ]
143 [ --ignoreskippedcluster ]
144 [ --noudevsync ]
145 [ --reportformat basic|json ]
146 [ COMMON_OPTIONS ]
147 [ VG|Tag|Select ... ]
148 -
149
150 Reactivate LVs using the latest metadata.
151
152 vgchange --refresh
153 [ -A|--autobackup y|n ]
154 [ -S|--select String ]
155 [ -f|--force ]
156 [ --sysinit ]
157 [ --ignorelockingfailure ]
158 [ --poll y|n ]
159 [ --ignoremonitoring ]
160 [ --ignoreskippedcluster ]
161 [ --noudevsync ]
162 [ --reportformat basic|json ]
163 [ COMMON_OPTIONS ]
164 [ VG|Tag|Select ... ]
165 -
166
167 Change the system ID of a VG.
168
169 vgchange --systemid String VG
170 [ COMMON_OPTIONS ]
171 -
172
173 Start the lockspace of a shared VG in lvmlockd.
174
175 vgchange --lockstart
176 [ -S|--select String ]
177 [ COMMON_OPTIONS ]
178 [ VG|Tag|Select ... ]
179 -
180
181 Stop the lockspace of a shared VG in lvmlockd.
182
183 vgchange --lockstop
184 [ -S|--select String ]
185 [ COMMON_OPTIONS ]
186 [ VG|Tag|Select ... ]
187 -
188
189 Change the lock type for a shared VG.
190
191 vgchange --locktype sanlock|dlm|none VG
192 [ COMMON_OPTIONS ]
193 -
194
195 Common options for command:
196
197 Common options for lvm:
198 [ -d|--debug ]
199 [ -h|--help ]
200 [ -q|--quiet ]
201 [ -t|--test ]
202 [ -v|--verbose ]
203 [ -y|--yes ]
204 [ --commandprofile String ]
205 [ --config String ]
206 [ --driverloaded y|n ]
207 [ --lockopt String ]
208 [ --longhelp ]
209 [ --profile String ]
210 [ --version ]
211
213 -a|--activate y|n|ay
214 Change the active state of LVs. An active LV can be used
215 through a block device, allowing data on the LV to be accessed.
216 y makes LVs active, or available. n makes LVs inactive, or
217 unavailable. The block device for the LV is added or removed
218 from the system using device-mapper in the kernel. A symbolic
219 link /dev/VGName/LVName pointing to the device node is also
220 added/removed. All software and scripts should access the
221 device through the symbolic link and present this as the name of
222 the device. The location and name of the underlying device node
223 may depend on the distribution, configuration (e.g. udev), or
224 release version. ay specifies autoactivation, in which case an
225 LV is activated only if it matches an item in lvm.conf activa‐
226 tion/auto_activation_volume_list. If the list is not set, all
227 LVs are considered to match, and if if the list is set but
228 empty, no LVs match. Autoactivation should be used during sys‐
229 tem boot to make it possible to select which LVs should be auto‐
230 matically activated by the system. See lvmlockd(8) for more
231 information about activation options ey and sy for shared VGs.
232 See clvmd(8) for more information about activation options ey,
233 sy, ly and ln for clustered VGs.
234
235 --activationmode partial|degraded|complete
236 Determines if LV activation is allowed when PVs are missing,
237 e.g. because of a device failure. complete only allows LVs with
238 no missing PVs to be activated, and is the most restrictive
239 mode. degraded allows RAID LVs with missing PVs to be acti‐
240 vated. (This does not include the "mirror" type, see "raid1"
241 instead.) partial allows any LV with missing PVs to be acti‐
242 vated, and should only be used for recovery or repair. For
243 default, see lvm.conf/activation_mode. See lvmraid(7) for more
244 information.
245
246 --addtag Tag
247 Adds a tag to a PV, VG or LV. This option can be repeated to add
248 multiple tags at once. See lvm(8) for information about tags.
249
250 --alloc contiguous|cling|cling_by_tags|normal|anywhere|inherit
251 Determines the allocation policy when a command needs to allo‐
252 cate Physical Extents (PEs) from the VG. Each VG and LV has an
253 allocation policy which can be changed with vgchange/lvchange,
254 or overriden on the command line. normal applies common sense
255 rules such as not placing parallel stripes on the same PV.
256 inherit applies the VG policy to an LV. contiguous requires new
257 PEs be placed adjacent to existing PEs. cling places new PEs on
258 the same PV as existing PEs in the same stripe of the LV. If
259 there are sufficient PEs for an allocation, but normal does not
260 use them, anywhere will use them even if it reduces performance,
261 e.g. by placing two stripes on the same PV. Optional positional
262 PV args on the command line can also be used to limit which PVs
263 the command will use for allocation. See lvm(8) for more infor‐
264 mation about allocation.
265
266 -A|--autobackup y|n
267 Specifies if metadata should be backed up automatically after a
268 change. Enabling this is strongly advised! See vgcfgbackup(8)
269 for more information.
270
271 -c|--clustered y|n
272 Change the clustered property of a VG using clvmd. See clvmd(8)
273 for more information about clustered VGs.
274
275 --commandprofile String
276 The command profile to use for command configuration. See
277 lvm.conf(5) for more information about profiles.
278
279 --config String
280 Config settings for the command. These override lvm.conf set‐
281 tings. The String arg uses the same format as lvm.conf, or may
282 use section/field syntax. See lvm.conf(5) for more information
283 about config.
284
285 -d|--debug ...
286 Set debug level. Repeat from 1 to 6 times to increase the detail
287 of messages sent to the log file and/or syslog (if configured).
288
289 --deltag Tag
290 Deletes a tag from a PV, VG or LV. This option can be repeated
291 to delete multiple tags at once. See lvm(8) for information
292 about tags.
293
294 --detachprofile
295 Detaches a metadata profile from a VG or LV. See lvm.conf(5)
296 for more information about profiles.
297
298 --driverloaded y|n
299 If set to no, the command will not attempt to use device-mapper.
300 For testing and debugging.
301
302 -f|--force ...
303 Override various checks, confirmations and protections. Use
304 with extreme caution.
305
306 -h|--help
307 Display help text.
308
309 -K|--ignoreactivationskip
310 Ignore the "activation skip" LV flag during activation to allow
311 LVs with the flag set to be activated.
312
313 --ignorelockingfailure
314 Allows a command to continue with read-only metadata operations
315 after locking failures.
316
317 --ignoremonitoring
318 Do not interact with dmeventd unless --monitor is specified. Do
319 not use this if dmeventd is already monitoring a device.
320
321 --ignoreskippedcluster
322 Use to avoid exiting with an non-zero status code if the command
323 is run without clustered locking and clustered VGs are skipped.
324
325 --lockopt String
326 Used to pass options for special cases to lvmlockd. See lvm‐
327 lockd(8) for more information.
328
329 --lockstart
330 Start the lockspace of a shared VG in lvmlockd. lvmlockd locks
331 becomes available for the VG, allowing LVM to use the VG. See
332 lvmlockd(8) for more information.
333
334 --lockstop
335 Stop the lockspace of a shared VG in lvmlockd. lvmlockd locks
336 become unavailable for the VG, preventing LVM from using the VG.
337 See lvmlockd(8) for more information.
338
339 --locktype sanlock|dlm|none
340 Change the VG lock type to or from a shared lock type used with
341 lvmlockd. See lvmlockd(8) for more information.
342
343 -l|--logicalvolume Number
344 Sets the maximum number of LVs allowed in a VG.
345
346 --longhelp
347 Display long help text.
348
349 -p|--maxphysicalvolumes Number
350 Sets the maximum number of PVs that can belong to the VG. The
351 value 0 removes any limitation. For large numbers of PVs, also
352 see options --pvmetadatacopies, and --vgmetadatacopies for
353 improving performance.
354
355 --metadataprofile String
356 The metadata profile to use for command configuration. See
357 lvm.conf(5) for more information about profiles.
358
359 --monitor y|n
360 Start (yes) or stop (no) monitoring an LV with dmeventd.
361 dmeventd monitors kernel events for an LV, and performs auto‐
362 mated maintenance for the LV in reponse to specific events. See
363 dmeventd(8) for more information.
364
365 --noudevsync
366 Disables udev synchronisation. The process will not wait for
367 notification from udev. It will continue irrespective of any
368 possible udev processing in the background. Only use this if
369 udev is not running or has rules that ignore the devices LVM
370 creates.
371
372 -P|--partial
373 Commands will do their best to activate LVs with missing PV
374 extents. Missing extents may be replaced with error or zero
375 segments according to the lvm.conf missing_stripe_filler set‐
376 ting. Metadata may not be changed with this option.
377
378 -s|--physicalextentsize Size[m|UNIT]
379 Sets the physical extent size of PVs in the VG. The value must
380 be either a power of 2 of at least 1 sector (where the sector
381 size is the largest sector size of the PVs currently used in the
382 VG), or at least 128KiB. Once this value has been set, it is
383 difficult to change without recreating the VG, unless no extents
384 need moving. Before increasing the physical extent size, you
385 might need to use lvresize, pvresize and/or pvmove so that
386 everything fits. For example, every contiguous range of extents
387 used in a LV must start and end on an extent boundary.
388
389 --poll y|n
390 When yes, start the background transformation of an LV. An
391 incomplete transformation, e.g. pvmove or lvconvert interrupted
392 by reboot or crash, can be restarted from the last checkpoint
393 with --poll y. When no, background transformation of an LV will
394 not occur, and the transformation will not complete. It may not
395 be appropriate to immediately poll an LV after activation, in
396 which case --poll n can be used to defer polling until a later
397 --poll y command.
398
399 --profile String
400 An alias for --commandprofile or --metadataprofile, depending on
401 the command.
402
403 --pvmetadatacopies 0|1|2
404 The number of metadata areas to set aside on a PV for storing VG
405 metadata. When 2, one copy of the VG metadata is stored at the
406 front of the PV and a second copy is stored at the end. When 1,
407 one copy of the VG metadata is stored at the front of the PV
408 (starting in the 5th sector). When 0, no copies of the VG meta‐
409 data are stored on the given PV. This may be useful in VGs con‐
410 taining many PVs (this places limitations on the ability to use
411 vgsplit later.)
412
413 -q|--quiet ...
414 Suppress output and log messages. Overrides --debug and --ver‐
415 bose. Repeat once to also suppress any prompts with answer
416 'no'.
417
418 --refresh
419 If the LV is active, reload its metadata. This is not necessary
420 in normal operation, but may be useful if something has gone
421 wrong, or if some form of manual LV sharing is being used.
422
423 --reportformat basic|json
424 Overrides current output format for reports which is defined
425 globally by the report/output_format setting in lvm.conf. basic
426 is the original format with columns and rows. If there is more
427 than one report per command, each report is prefixed with the
428 report name for identification. json produces report output in
429 JSON format. See lvmreport(7) for more information.
430
431 -x|--resizeable y|n
432 Enables or disables the addition or removal of PVs to/from a VG
433 (by vgextend/vgreduce).
434
435 -S|--select String
436 Select objects for processing and reporting based on specified
437 criteria. The criteria syntax is described by --select help and
438 lvmreport(7). For reporting commands, one row is displayed for
439 each object matching the criteria. See --options help for
440 selectable object fields. Rows can be displayed with an addi‐
441 tional "selected" field (-o selected) showing 1 if the row
442 matches the selection and 0 otherwise. For non-reporting com‐
443 mands which process LVM entities, the selection is used to
444 choose items to process.
445
446 --sysinit
447 Indicates that vgchange/lvchange is being invoked from early
448 system initialisation scripts (e.g. rc.sysinit or an initrd),
449 before writable filesystems are available. As such, some func‐
450 tionality needs to be disabled and this option acts as a short‐
451 cut which selects an appropriate set of options. Currently, this
452 is equivalent to using --ignorelockingfailure, --ignoremonitor‐
453 ing, --poll n, and setting env var LVM_SUPPRESS_LOCKING_FAIL‐
454 URE_MESSAGES. When used in conjunction with lvmetad enabled and
455 running, vgchange/lvchange skip autoactivation, and defer to
456 pvscan autoactivation.
457
458 --systemid String
459 Changes the system ID of the VG. Using this option requires
460 caution because the VG may become foreign to the host running
461 the command, leaving the host unable to access it. See lvmsys‐
462 temid(7) for more information.
463
464 -t|--test
465 Run in test mode. Commands will not update metadata. This is
466 implemented by disabling all metadata writing but nevertheless
467 returning success to the calling function. This may lead to
468 unusual error messages in multi-stage operations if a tool
469 relies on reading back metadata it believes has changed but
470 hasn't.
471
472 -u|--uuid
473 Generate new random UUID for specified VGs.
474
475 -v|--verbose ...
476 Set verbose level. Repeat from 1 to 4 times to increase the
477 detail of messages sent to stdout and stderr.
478
479 --version
480 Display version information.
481
482 --[vg]metadatacopies all|unmanaged|Number
483 Number of copies of the VG metadata that are kept. VG metadata
484 is kept in VG metadata areas on PVs in the VG, i.e. reserved
485 space at the start and/or end of the PVs. Keeping a copy of the
486 VG metadata on every PV can reduce performance in VGs containing
487 a large number of PVs. When this number is set to a non-zero
488 value, LVM will automatically choose PVs on which to store meta‐
489 data, using the metadataignore flags on PVs to achieve the spec‐
490 ified number. The number can also be replaced with special
491 string values: unmanaged causes LVM to not automatically manage
492 the PV metadataignore flags. all causes LVM to first clear the
493 metadataignore flags on all PVs, and then to become unmanaged.
494
495 -y|--yes
496 Do not prompt for confirmation interactively but always assume
497 the answer yes. Use with extreme caution. (For automatic no,
498 see -qq.)
499
501 VG
502 Volume Group name. See lvm(8) for valid names.
503
504 Tag
505 Tag name. See lvm(8) for information about tag names and using
506 tags in place of a VG, LV or PV.
507
508 Select
509 Select indicates that a required positional parameter can be
510 omitted if the --select option is used. No arg appears in this
511 position.
512
513 String
514 See the option description for information about the string con‐
515 tent.
516
517 Size[UNIT]
518 Size is an input number that accepts an optional unit. Input
519 units are always treated as base two values, regardless of capi‐
520 talization, e.g. 'k' and 'K' both refer to 1024. The default
521 input unit is specified by letter, followed by |UNIT. UNIT rep‐
522 resents other possible input units: bBsSkKmMgGtTpPeE. b|B is
523 bytes, s|S is sectors of 512 bytes, k|K is kilobytes, m|M is
524 megabytes, g|G is gigabytes, t|T is terabytes, p|P is petabytes,
525 e|E is exabytes. (This should not be confused with the output
526 control --units, where capital letters mean multiple of 1000.)
527
529 See lvm(8) for information about environment variables used by lvm.
530 For example, LVM_VG_NAME can generally be substituted for a required VG
531 parameter.
532
534 If vgchange recognizes COW snapshot LVs that were dropped because they
535 ran out of space, it displays a message informing the administrator
536 that the snapshots should be removed.
537
539 Activate all LVs in all VGs on all existing devices.
540 vgchange -a y
541
542 Change the maximum number of LVs for an inactive VG.
543 vgchange -l 128 vg00
544
546 lvm(8) lvm.conf(5) lvmconfig(8)
547
548 pvchange(8) pvck(8) pvcreate(8) pvdisplay(8) pvmove(8) pvremove(8)
549 pvresize(8) pvs(8) pvscan(8)
550
551 vgcfgbackup(8) vgcfgrestore(8) vgchange(8) vgck(8) vgcreate(8) vgcon‐
552 vert(8) vgdisplay(8) vgexport(8) vgextend(8) vgimport(8) vgimport‐
553 clone(8) vgmerge(8) vgmknodes(8) vgreduce(8) vgremove(8) vgrename(8)
554 vgs(8) vgscan(8) vgsplit(8)
555
556 lvcreate(8) lvchange(8) lvconvert(8) lvdisplay(8) lvextend(8) lvre‐
557 duce(8) lvremove(8) lvrename(8) lvresize(8) lvs(8) lvscan(8)
558
559 lvm-fullreport(8) lvm-lvpoll(8) lvm2-activation-generator(8) blkdeacti‐
560 vate(8) lvmdump(8)
561
562 dmeventd(8) lvmetad(8) lvmpolld(8) lvmlockd(8) lvmlockctl(8) clvmd(8)
563 cmirrord(8) lvmdbusd(8)
564
565 lvmsystemid(7) lvmreport(7) lvmraid(7) lvmthin(7) lvmcache(7)
566
567
568
569Red Hat, Inc. LVM TOOLS 2.02.183(2) (2018-12-07) VGCHANGE(8)