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|any‐
78           where|inherit,
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
213              unavailable.  The block device for the LV is added or removed
214              from the system using device-mapper in the kernel.  A symbolic
215              link /dev/VGName/LVName pointing to the device node is also
216              added/removed.  All software and scripts should access the
217              device through the symbolic link and present this as the name of
218              the device.  The location and name of the underlying device node
219              may depend on the distribution, configuration (e.g. udev), or
220              release version.  ay specifies autoactivation, in which case an
221              LV 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
227              information 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
237              default, 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.
250              inherit 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
339              improving 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
356              notification from udev. It will continue irrespective of any
357              possible udev processing in the background. Only use this if
358              udev is not running or has rules that ignore the devices LVM
359              creates.
360
361       -P|--partial
362              Commands will do their best to activate LVs with missing PV
363              extents.  Missing extents may be replaced with error or zero
364              segments according to the lvm.conf missing_stripe_filler set‐
365              ting.  Metadata may not be changed with this option.
366
367       -s|--physicalextentsize Size[m|UNIT]
368              Sets the physical extent size of PVs in the VG.  The value must
369              be either a power of 2 of at least 1 sector (where the sector
370              size is the largest sector size of the PVs currently used in the
371              VG), or at least 128KiB.  Once this value has been set, it is
372              difficult to change without recreating the VG, unless no extents
373              need moving.  Before increasing the physical extent size, you
374              might need to use lvresize, pvresize and/or pvmove so that
375              everything fits. For example, every contiguous range of extents
376              used in a LV must start and end on an extent boundary.
377
378       --poll y|n
379              When yes, start the background transformation of an LV.  An
380              incomplete transformation, e.g. pvmove or lvconvert interrupted
381              by reboot or crash, can be restarted from the last checkpoint
382              with --poll y.  When no, background transformation of an LV will
383              not occur, and the transformation will not complete. It may not
384              be appropriate to immediately poll an LV after activation, in
385              which case --poll n can be used to defer polling until a later
386              --poll y command.
387
388       --profile String
389              An alias for --commandprofile or --metadataprofile, depending on
390              the command.
391
392       --pvmetadatacopies 0|1|2
393              The number of metadata areas to set aside on a PV for storing VG
394              metadata.  When 2, one copy of the VG metadata is stored at the
395              front of the PV and a second copy is stored at the end.  When 1,
396              one copy of the VG metadata is stored at the front of the PV.
397              When 0, no copies of the VG metadata are stored on the given PV.
398              This may be useful in VGs containing many PVs (this places limi‐
399              tations on the ability to use vgsplit later.)
400
401       -q|--quiet ...
402              Suppress output and log messages. Overrides --debug and --ver‐
403              bose.  Repeat once to also suppress any prompts with answer
404              'no'.
405
406       --readonly
407              Run the command in a special read-only mode which will read on-
408              disk metadata without needing to take any locks. This can be
409              used to peek inside metadata used by a virtual machine image
410              while the virtual machine is running. No attempt will be made to
411              communicate with the device-mapper kernel driver, so this option
412              is unable to report whether or not LVs are actually in use.
413
414       --refresh
415              If the LV is active, reload its metadata.  This is not necessary
416              in normal operation, but may be useful if something has gone
417              wrong, or if some form of manual LV sharing is being used.
418
419       --reportformat basic|json
420              Overrides current output format for reports which is defined
421              globally by the report/output_format setting in lvm.conf.  basic
422              is the original format with columns and rows.  If there is more
423              than one report per command, each report is prefixed with the
424              report name for identification. json produces report output in
425              JSON format. See lvmreport(7) for more information.
426
427       -x|--resizeable y|n
428              Enables or disables the addition or removal of PVs to/from a VG
429              (by vgextend/vgreduce).
430
431       -S|--select String
432              Select objects for processing and reporting based on specified
433              criteria.  The criteria syntax is described by --select help and
434              lvmreport(7).  For reporting commands, one row is displayed for
435              each object matching the criteria.  See --options help for
436              selectable object fields.  Rows can be displayed with an addi‐
437              tional "selected" field (-o selected) showing 1 if the row
438              matches the selection and 0 otherwise.  For non-reporting com‐
439              mands which process LVM entities, the selection is used to
440              choose items to process.
441
442       --sysinit
443              Indicates that vgchange/lvchange is being invoked from early
444              system initialisation scripts (e.g. rc.sysinit or an initrd),
445              before writable filesystems are available. As such, some func‐
446              tionality needs to be disabled and this option acts as a short‐
447              cut which selects an appropriate set of options. Currently, this
448              is equivalent to using --ignorelockingfailure, --ignoremonitor‐
449              ing, --poll n, and setting env var LVM_SUPPRESS_LOCKING_FAIL‐
450              URE_MESSAGES.  vgchange/lvchange skip autoactivation, and defer
451              to pvscan autoactivation.
452
453       --systemid String
454              Changes the system ID of the VG.  Using this option requires
455              caution because the VG may become foreign to the host running
456              the command, leaving the host unable to access it.  See lvmsys‐
457              temid(7) for more information.
458
459       -t|--test
460              Run in test mode. Commands will not update metadata.  This is
461              implemented by disabling all metadata writing but nevertheless
462              returning success to the calling function. This may lead to
463              unusual error messages in multi-stage operations if a tool
464              relies on reading back metadata it believes has changed but
465              hasn't.
466
467       -u|--uuid
468              Generate new random UUID for specified VGs.
469
470       -v|--verbose ...
471              Set verbose level. Repeat from 1 to 4 times to increase the
472              detail of messages sent to stdout and stderr.
473
474       --version
475              Display version information.
476
477       --[vg]metadatacopies all|unmanaged|Number
478              Number of copies of the VG metadata that are kept.  VG metadata
479              is kept in VG metadata areas on PVs in the VG, i.e. reserved
480              space at the start and/or end of the PVs.  Keeping a copy of the
481              VG metadata on every PV can reduce performance in VGs containing
482              a large number of PVs.  When this number is set to a non-zero
483              value, LVM will automatically choose PVs on which to store meta‐
484              data, using the metadataignore flags on PVs to achieve the spec‐
485              ified number.  The number can also be replaced with special
486              string values: unmanaged causes LVM to not automatically manage
487              the PV metadataignore flags.  all causes LVM to first clear the
488              metadataignore flags on all PVs, and then to become unmanaged.
489
490       -y|--yes
491              Do not prompt for confirmation interactively but always assume
492              the answer yes. Use with extreme caution.  (For automatic no,
493              see -qq.)
494

VARIABLES

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

ENVIRONMENT VARIABLES

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

NOTES

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

EXAMPLES

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

SEE ALSO

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