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           --autoactivation String
18        -A|--autobackup y|n
19           --commandprofile String
20           --config String
21        -d|--debug
22           --deltag Tag
23           --detachprofile
24           --devices PV
25           --devicesfile String
26           --driverloaded y|n
27        -f|--force
28        -h|--help
29        -K|--ignoreactivationskip
30           --ignorelockingfailure
31           --ignoremonitoring
32           --journal String
33           --lockopt String
34           --lockstart
35           --lockstop
36           --locktype sanlock|dlm|none
37        -l|--logicalvolume Number
38           --longhelp
39        -p|--maxphysicalvolumes Number
40           --metadataprofile String
41           --monitor y|n
42           --nohints
43           --nolocking
44           --noudevsync
45        -P|--partial
46        -s|--physicalextentsize Size[m|UNIT]
47           --poll y|n
48           --profile String
49           --pvmetadatacopies 0|1|2
50        -q|--quiet
51           --readonly
52           --refresh
53           --reportformat basic|json|json_std
54        -x|--resizeable y|n
55        -S|--select String
56           --setautoactivation y|n
57           --sysinit
58           --systemid String
59        -t|--test
60        -u|--uuid
61        -v|--verbose
62           --version
63           --[vg]metadatacopies all|unmanaged|Number
64        -y|--yes
65

DESCRIPTION

67       vgchange  changes  VG  attributes, changes LV activation in the kernel,
68       and includes other utilities for VG maintenance.
69

USAGE

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

OPTIONS

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

VARIABLES

564       VG     Volume Group name.  See lvm(8) for valid names.
565
566       Tag    Tag  name.  See lvm(8) for information about tag names and using
567              tags in place of a VG, LV or PV.
568
569       Select Select indicates that a required  positional  parameter  can  be
570              omitted  if the --select option is used.  No arg appears in this
571              position.
572
573       String See the option description for information about the string con‐
574              tent.
575
576       Size[UNIT]
577              Size  is  an  input number that accepts an optional unit.  Input
578              units are always treated as base two values, regardless of capi‐
579              talization,  e.g.  'k'  and 'K' both refer to 1024.  The default
580              input unit is specified by letter, followed by |UNIT.  UNIT rep‐
581              resents other possible input units: b|B is bytes, s|S is sectors
582              of 512 bytes, k|K is KiB, m|M is MiB, g|G is GiB,  t|T  is  TiB,
583              p|P  is  PiB, e|E is EiB.  (This should not be confused with the
584              output control --units, where capital letters mean  multiple  of
585              1000.)
586

ENVIRONMENT VARIABLES

588       See  lvm(8)  for  information  about environment variables used by lvm.
589       For example, LVM_VG_NAME can generally be substituted for a required VG
590       parameter.
591

NOTES

593       If  vgchange recognizes COW snapshot LVs that were dropped because they
594       ran out of space, it displays a  message  informing  the  administrator
595       that the snapshots should be removed.
596

EXAMPLES

598       Activate all LVs in all VGs on all existing devices.
599       vgchange -a y
600
601       Change the maximum number of LVs for an inactive VG.
602       vgchange -l 128 vg00
603

SEE ALSO

605       lvm(8), lvm.conf(5), lvmconfig(8), lvmdevices(8),
606
607       pvchange(8), pvck(8), pvcreate(8), pvdisplay(8), pvmove(8),
608       pvremove(8), pvresize(8), pvs(8), pvscan(8),
609
610       vgcfgbackup(8), vgcfgrestore(8), vgchange(8), vgck(8), vgcreate(8),
611       vgconvert(8), vgdisplay(8), vgexport(8), vgextend(8), vgimport(8),
612       vgimportclone(8), vgimportdevices(8), vgmerge(8), vgmknodes(8),
613       vgreduce(8), vgremove(8), vgrename(8), vgs(8), vgscan(8), vgsplit(8),
614
615       lvcreate(8), lvchange(8), lvconvert(8), lvdisplay(8), lvextend(8),
616       lvreduce(8), lvremove(8), lvrename(8), lvresize(8), lvs(8), lvscan(8),
617
618       lvm-fullreport(8), lvm-lvpoll(8), blkdeactivate(8), lvmdump(8),
619
620       dmeventd(8), lvmpolld(8), lvmlockd(8), lvmlockctl(8), cmirrord(8),
621       lvmdbusd(8), fsadm(8),
622
623       lvmsystemid(7), lvmreport(7), lvmraid(7), lvmthin(7), lvmcache(7)
624
625
626
627Red Hat, Inc.        LVM TOOLS 2.03.18(2)-git (2022-11-10)         VGCHANGE(8)
Impressum