1VGCHANGE(8)                 System Manager's Manual                VGCHANGE(8)
2
3
4

NAME

6       vgchange - Change volume group attributes
7

SYNOPSIS

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           --commandprofile String
19           --config String
20        -d|--debug
21           --deltag Tag
22           --detachprofile
23           --driverloaded y|n
24        -f|--force
25        -h|--help
26        -K|--ignoreactivationskip
27           --ignorelockingfailure
28           --ignoremonitoring
29           --lockopt String
30           --lockstart
31           --lockstop
32           --locktype sanlock|dlm|none
33        -l|--logicalvolume Number
34           --longhelp
35        -p|--maxphysicalvolumes Number
36           --metadataprofile String
37           --monitor y|n
38           --nolocking
39           --noudevsync
40        -P|--partial
41        -s|--physicalextentsize Size[m|UNIT]
42           --poll y|n
43           --profile String
44           --pvmetadatacopies 0|1|2
45        -q|--quiet
46           --readonly
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

DESCRIPTION

61       vgchange  changes  VG  attributes, changes LV activation in the kernel,
62       and includes other utilities for VG maintenance.
63

USAGE

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             -s|--physicalextentsize Size[m|UNIT],
74             -x|--resizeable y|n,
75                --addtag Tag,
76                --deltag Tag,
77                --alloc contiguous|cling|cling_by_tags|normal|anywhere|in‐
78           herit,
79                --pvmetadatacopies 0|1|2,
80                --[vg]metadatacopies all|unmanaged|Number,
81                --profile String,
82                --detachprofile,
83                --metadataprofile String )
84           [ -A|--autobackup y|n ]
85           [ -S|--select String ]
86           [ -f|--force ]
87           [    --poll y|n ]
88           [    --ignoremonitoring ]
89           [    --noudevsync ]
90           [    --reportformat basic|json ]
91           [ COMMON_OPTIONS ]
92           [ VG|Tag|Select ... ]
93       -
94
95       Start or stop monitoring LVs from dmeventd.
96
97       vgchange --monitor y|n
98           [ -A|--autobackup y|n ]
99           [ -S|--select String ]
100           [ -f|--force ]
101           [    --sysinit ]
102           [    --ignorelockingfailure ]
103           [    --poll y|n ]
104           [    --ignoremonitoring ]
105           [    --noudevsync ]
106           [    --reportformat basic|json ]
107           [ COMMON_OPTIONS ]
108           [ VG|Tag|Select ... ]
109       -
110
111       Start or stop processing LV conversions.
112
113       vgchange --poll y|n
114           [ -A|--autobackup y|n ]
115           [ -S|--select String ]
116           [ -f|--force ]
117           [    --ignorelockingfailure ]
118           [    --ignoremonitoring ]
119           [    --noudevsync ]
120           [    --reportformat basic|json ]
121           [ COMMON_OPTIONS ]
122           [ VG|Tag|Select ... ]
123       -
124
125       Activate or deactivate LVs.
126
127       vgchange -a|--activate y|n|ay
128           [ -K|--ignoreactivationskip ]
129           [ -P|--partial ]
130           [ -A|--autobackup y|n ]
131           [ -S|--select String ]
132           [ -f|--force ]
133           [    --activationmode partial|degraded|complete ]
134           [    --sysinit ]
135           [    --readonly ]
136           [    --ignorelockingfailure ]
137           [    --monitor y|n ]
138           [    --poll y|n ]
139           [    --ignoremonitoring ]
140           [    --noudevsync ]
141           [    --reportformat basic|json ]
142           [ COMMON_OPTIONS ]
143           [ VG|Tag|Select ... ]
144       -
145
146       Reactivate LVs using the latest metadata.
147
148       vgchange --refresh
149           [ -A|--autobackup y|n ]
150           [ -S|--select String ]
151           [ -f|--force ]
152           [    --sysinit ]
153           [    --ignorelockingfailure ]
154           [    --poll y|n ]
155           [    --ignoremonitoring ]
156           [    --noudevsync ]
157           [    --reportformat basic|json ]
158           [ COMMON_OPTIONS ]
159           [ VG|Tag|Select ... ]
160       -
161
162       Change the system ID of a VG.
163
164       vgchange --systemid String VG
165           [ COMMON_OPTIONS ]
166       -
167
168       Start the lockspace of a shared VG in lvmlockd.
169
170       vgchange --lockstart
171           [ -S|--select String ]
172           [ COMMON_OPTIONS ]
173           [ VG|Tag|Select ... ]
174       -
175
176       Stop the lockspace of a shared VG in lvmlockd.
177
178       vgchange --lockstop
179           [ -S|--select String ]
180           [ COMMON_OPTIONS ]
181           [ VG|Tag|Select ... ]
182       -
183
184       Change the lock type for a shared VG.
185
186       vgchange --locktype sanlock|dlm|none VG
187           [ COMMON_OPTIONS ]
188       -
189
190       Common options for command:
191
192       Common options for lvm:
193           [ -d|--debug ]
194           [ -h|--help ]
195           [ -q|--quiet ]
196           [ -t|--test ]
197           [ -v|--verbose ]
198           [ -y|--yes ]
199           [    --commandprofile String ]
200           [    --config String ]
201           [    --driverloaded y|n ]
202           [    --lockopt String ]
203           [    --longhelp ]
204           [    --nolocking ]
205           [    --profile String ]
206           [    --version ]
207

OPTIONS

209       -a|--activate y|n|ay
210              Change the active state of LVs.  An active LV can be used
211              through a block device, allowing data on the LV to be accessed.
212              y makes LVs active, or available.  n makes LVs inactive, or un‐
213              available.  The block device for the LV is added or removed from
214              the system using device-mapper in the kernel.  A symbolic link
215              /dev/VGName/LVName pointing to the device node is also added/re‐
216              moved.  All software and scripts should access the device
217              through the symbolic link and present this as the name of the
218              device.  The location and name of the underlying device node may
219              depend on the distribution, configuration (e.g. udev), or re‐
220              lease version.  ay specifies autoactivation, in which case an LV
221              is activated only if it matches an item in lvm.conf activa‐
222              tion/auto_activation_volume_list.  If the list is not set, all
223              LVs are considered to match, and if if the list is set but
224              empty, no LVs match.  Autoactivation should be used during sys‐
225              tem boot to make it possible to select which LVs should be auto‐
226              matically activated by the system.  See lvmlockd(8) for more in‐
227              formation about activation options ey and sy for shared VGs.
228
229       --activationmode partial|degraded|complete
230              Determines if LV activation is allowed when PVs are missing,
231              e.g. because of a device failure.  complete only allows LVs with
232              no missing PVs to be activated, and is the most restrictive
233              mode.  degraded allows RAID LVs with missing PVs to be acti‐
234              vated.  (This does not include the "mirror" type, see "raid1"
235              instead.)  partial allows any LV with missing PVs to be acti‐
236              vated, and should only be used for recovery or repair.  For de‐
237              fault, see lvm.conf/activation_mode.  See lvmraid(7) for more
238              information.
239
240       --addtag Tag
241              Adds a tag to a PV, VG or LV. This option can be repeated to add
242              multiple tags at once. See lvm(8) for information about tags.
243
244       --alloc contiguous|cling|cling_by_tags|normal|anywhere|inherit
245              Determines the allocation policy when a command needs to allo‐
246              cate Physical Extents (PEs) from the VG. Each VG and LV has an
247              allocation policy which can be changed with vgchange/lvchange,
248              or overriden on the command line.  normal applies common sense
249              rules such as not placing parallel stripes on the same PV.  in‐
250              herit applies the VG policy to an LV.  contiguous requires new
251              PEs be placed adjacent to existing PEs.  cling places new PEs on
252              the same PV as existing PEs in the same stripe of the LV.  If
253              there are sufficient PEs for an allocation, but normal does not
254              use them, anywhere will use them even if it reduces performance,
255              e.g. by placing two stripes on the same PV.  Optional positional
256              PV args on the command line can also be used to limit which PVs
257              the command will use for allocation.  See lvm(8) for more infor‐
258              mation about allocation.
259
260       -A|--autobackup y|n
261              Specifies if metadata should be backed up automatically after a
262              change.  Enabling this is strongly advised! See vgcfgbackup(8)
263              for more information.
264
265       --commandprofile String
266              The command profile to use for command configuration.  See
267              lvm.conf(5) for more information about profiles.
268
269       --config String
270              Config settings for the command. These override lvm.conf set‐
271              tings.  The String arg uses the same format as lvm.conf, or may
272              use section/field syntax.  See lvm.conf(5) for more information
273              about config.
274
275       -d|--debug ...
276              Set debug level. Repeat from 1 to 6 times to increase the detail
277              of messages sent to the log file and/or syslog (if configured).
278
279       --deltag Tag
280              Deletes a tag from a PV, VG or LV. This option can be repeated
281              to delete multiple tags at once. See lvm(8) for information
282              about tags.
283
284       --detachprofile
285              Detaches a metadata profile from a VG or LV.  See lvm.conf(5)
286              for more information about profiles.
287
288       --driverloaded y|n
289              If set to no, the command will not attempt to use device-mapper.
290              For testing and debugging.
291
292       -f|--force ...
293              Override various checks, confirmations and protections.  Use
294              with extreme caution.
295
296       -h|--help
297              Display help text.
298
299       -K|--ignoreactivationskip
300              Ignore the "activation skip" LV flag during activation to allow
301              LVs with the flag set to be activated.
302
303       --ignorelockingfailure
304              Allows a command to continue with read-only metadata operations
305              after locking failures.
306
307       --ignoremonitoring
308              Do not interact with dmeventd unless --monitor is specified.  Do
309              not use this if dmeventd is already monitoring a device.
310
311       --lockopt String
312              Used to pass options for special cases to lvmlockd.  See lvm‐
313              lockd(8) for more information.
314
315       --lockstart
316              Start the lockspace of a shared VG in lvmlockd.  lvmlockd locks
317              becomes available for the VG, allowing LVM to use the VG.  See
318              lvmlockd(8) for more information.
319
320       --lockstop
321              Stop the lockspace of a shared VG in lvmlockd.  lvmlockd locks
322              become unavailable for the VG, preventing LVM from using the VG.
323              See lvmlockd(8) for more information.
324
325       --locktype sanlock|dlm|none
326              Change the VG lock type to or from a shared lock type used with
327              lvmlockd.  See lvmlockd(8) for more information.
328
329       -l|--logicalvolume Number
330              Sets the maximum number of LVs allowed in a VG.
331
332       --longhelp
333              Display long help text.
334
335       -p|--maxphysicalvolumes Number
336              Sets the maximum number of PVs that can belong to the VG.  The
337              value 0 removes any limitation.  For large numbers of PVs, also
338              see options --pvmetadatacopies, and --vgmetadatacopies for im‐
339              proving performance.
340
341       --metadataprofile String
342              The metadata profile to use for command configuration.  See
343              lvm.conf(5) for more information about profiles.
344
345       --monitor y|n
346              Start (yes) or stop (no) monitoring an LV with dmeventd.
347              dmeventd monitors kernel events for an LV, and performs auto‐
348              mated maintenance for the LV in reponse to specific events.  See
349              dmeventd(8) for more information.
350
351       --nolocking
352              Disable locking.
353
354       --noudevsync
355              Disables udev synchronisation. The process will not wait for no‐
356              tification from udev. It will continue irrespective of any pos‐
357              sible udev processing in the background. Only use this if udev
358              is not running or has rules that ignore the devices LVM creates.
359
360       -P|--partial
361              Commands will do their best to activate LVs with missing PV ex‐
362              tents.  Missing extents may be replaced with error or zero seg‐
363              ments according to the lvm.conf missing_stripe_filler setting.
364              Metadata may not be changed with this option.
365
366       -s|--physicalextentsize Size[m|UNIT]
367              Sets the physical extent size of PVs in the VG.  The value must
368              be either a power of 2 of at least 1 sector (where the sector
369              size is the largest sector size of the PVs currently used in the
370              VG), or at least 128KiB.  Once this value has been set, it is
371              difficult to change without recreating the VG, unless no extents
372              need moving.  Before increasing the physical extent size, you
373              might need to use lvresize, pvresize and/or pvmove so that ev‐
374              erything fits. For example, every contiguous range of extents
375              used in a LV must start and end on an extent boundary.
376
377       --poll y|n
378              When yes, start the background transformation of an LV.  An in‐
379              complete transformation, e.g. pvmove or lvconvert interrupted by
380              reboot or crash, can be restarted from the last checkpoint with
381              --poll y.  When no, background transformation of an LV will not
382              occur, and the transformation will not complete. It may not be
383              appropriate to immediately poll an LV after activation, in which
384              case --poll n can be used to defer polling until a later --poll
385              y command.
386
387       --profile String
388              An alias for --commandprofile or --metadataprofile, depending on
389              the command.
390
391       --pvmetadatacopies 0|1|2
392              The number of metadata areas to set aside on a PV for storing VG
393              metadata.  When 2, one copy of the VG metadata is stored at the
394              front of the PV and a second copy is stored at the end.  When 1,
395              one copy of the VG metadata is stored at the front of the PV.
396              When 0, no copies of the VG metadata are stored on the given PV.
397              This may be useful in VGs containing many PVs (this places limi‐
398              tations on the ability to use vgsplit later.)
399
400       -q|--quiet ...
401              Suppress output and log messages. Overrides --debug and --ver‐
402              bose.  Repeat once to also suppress any prompts with answer
403              'no'.
404
405       --readonly
406              Run the command in a special read-only mode which will read on-
407              disk metadata without needing to take any locks. This can be
408              used to peek inside metadata used by a virtual machine image
409              while the virtual machine is running. No attempt will be made to
410              communicate with the device-mapper kernel driver, so this option
411              is unable to report whether or not LVs are actually in use.
412
413       --refresh
414              If the LV is active, reload its metadata.  This is not necessary
415              in normal operation, but may be useful if something has gone
416              wrong, or if some form of manual LV sharing is being used.
417
418       --reportformat basic|json
419              Overrides current output format for reports which is defined
420              globally by the report/output_format setting in lvm.conf.  basic
421              is the original format with columns and rows.  If there is more
422              than one report per command, each report is prefixed with the
423              report name for identification. json produces report output in
424              JSON format. See lvmreport(7) for more information.
425
426       -x|--resizeable y|n
427              Enables or disables the addition or removal of PVs to/from a VG
428              (by vgextend/vgreduce).
429
430       -S|--select String
431              Select objects for processing and reporting based on specified
432              criteria.  The criteria syntax is described by --select help and
433              lvmreport(7).  For reporting commands, one row is displayed for
434              each object matching the criteria.  See --options help for se‐
435              lectable object fields.  Rows can be displayed with an addi‐
436              tional "selected" field (-o selected) showing 1 if the row
437              matches the selection and 0 otherwise.  For non-reporting com‐
438              mands which process LVM entities, the selection is used to
439              choose items to process.
440
441       --sysinit
442              Indicates that vgchange/lvchange is being invoked from early
443              system initialisation scripts (e.g. rc.sysinit or an initrd),
444              before writable filesystems are available. As such, some func‐
445              tionality needs to be disabled and this option acts as a short‐
446              cut which selects an appropriate set of options. Currently, this
447              is equivalent to using --ignorelockingfailure, --ignoremonitor‐
448              ing, --poll n, and setting env var LVM_SUPPRESS_LOCKING_FAIL‐
449              URE_MESSAGES.  vgchange/lvchange skip autoactivation, and defer
450              to pvscan autoactivation.
451
452       --systemid String
453              Changes the system ID of the VG.  Using this option requires
454              caution because the VG may become foreign to the host running
455              the command, leaving the host unable to access it.  See lvmsys‐
456              temid(7) for more information.
457
458       -t|--test
459              Run in test mode. Commands will not update metadata.  This is
460              implemented by disabling all metadata writing but nevertheless
461              returning success to the calling function. This may lead to un‐
462              usual error messages in multi-stage operations if a tool relies
463              on reading back metadata it believes has changed but hasn't.
464
465       -u|--uuid
466              Generate new random UUID for specified VGs.
467
468       -v|--verbose ...
469              Set verbose level. Repeat from 1 to 4 times to increase the de‐
470              tail of messages sent to stdout and stderr.
471
472       --version
473              Display version information.
474
475       --[vg]metadatacopies all|unmanaged|Number
476              Number of copies of the VG metadata that are kept.  VG metadata
477              is kept in VG metadata areas on PVs in the VG, i.e. reserved
478              space at the start and/or end of the PVs.  Keeping a copy of the
479              VG metadata on every PV can reduce performance in VGs containing
480              a large number of PVs.  When this number is set to a non-zero
481              value, LVM will automatically choose PVs on which to store meta‐
482              data, using the metadataignore flags on PVs to achieve the spec‐
483              ified number.  The number can also be replaced with special
484              string values: unmanaged causes LVM to not automatically manage
485              the PV metadataignore flags.  all causes LVM to first clear the
486              metadataignore flags on all PVs, and then to become unmanaged.
487
488       -y|--yes
489              Do not prompt for confirmation interactively but always assume
490              the answer yes. Use with extreme caution.  (For automatic no,
491              see -qq.)
492

VARIABLES

494       VG
495              Volume Group name.  See lvm(8) for valid names.
496
497       Tag
498              Tag  name.  See lvm(8) for information about tag names and using
499              tags in place of a VG, LV or PV.
500
501       Select
502              Select indicates that a required  positional  parameter  can  be
503              omitted  if the --select option is used.  No arg appears in this
504              position.
505
506       String
507              See the option description for information about the string con‐
508              tent.
509
510       Size[UNIT]
511              Size  is  an  input number that accepts an optional unit.  Input
512              units are always treated as base two values, regardless of capi‐
513              talization,  e.g.  'k'  and 'K' both refer to 1024.  The default
514              input unit is specified by letter, followed by |UNIT.  UNIT rep‐
515              resents  other  possible  input units: bBsSkKmMgGtTpPeE.  b|B is
516              bytes, s|S is sectors of 512 bytes, k|K is KiB, m|M is MiB,  g|G
517              is GiB, t|T is TiB, p|P is PiB, e|E is EiB.  (This should not be
518              confused with the output control --units, where capital  letters
519              mean multiple of 1000.)
520

ENVIRONMENT VARIABLES

522       See  lvm(8)  for  information  about environment variables used by lvm.
523       For example, LVM_VG_NAME can generally be substituted for a required VG
524       parameter.
525

NOTES

527       If  vgchange recognizes COW snapshot LVs that were dropped because they
528       ran out of space, it displays a  message  informing  the  administrator
529       that the snapshots should be removed.
530

EXAMPLES

532       Activate all LVs in all VGs on all existing devices.
533       vgchange -a y
534
535       Change the maximum number of LVs for an inactive VG.
536       vgchange -l 128 vg00
537

SEE ALSO

539       lvm(8) lvm.conf(5) lvmconfig(8)
540
541       pvchange(8)  pvck(8)  pvcreate(8)  pvdisplay(8)  pvmove(8)  pvremove(8)
542       pvresize(8) pvs(8) pvscan(8)
543
544       vgcfgbackup(8) vgcfgrestore(8) vgchange(8) vgck(8)  vgcreate(8)  vgcon‐
545       vert(8)  vgdisplay(8)  vgexport(8)  vgextend(8)  vgimport(8)  vgimport‐
546       clone(8) vgmerge(8) vgmknodes(8)  vgreduce(8)  vgremove(8)  vgrename(8)
547       vgs(8) vgscan(8) vgsplit(8)
548
549       lvcreate(8)  lvchange(8)  lvconvert(8)  lvdisplay(8)  lvextend(8) lvre‐
550       duce(8) lvremove(8) lvrename(8) lvresize(8) lvs(8) lvscan(8)
551
552       lvm-fullreport(8) lvm-lvpoll(8) lvm2-activation-generator(8) blkdeacti‐
553       vate(8) lvmdump(8)
554
555       dmeventd(8)  lvmpolld(8)  lvmlockd(8)  lvmlockctl(8)  cmirrord(8) lvmd‐
556       busd(8)
557
558       lvmsystemid(7) lvmreport(7) lvmraid(7) lvmthin(7) lvmcache(7)
559
560
561
562Red Hat, Inc.          LVM TOOLS 2.03.11(2) (2021-01-08)           VGCHANGE(8)
Impressum