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

NAME

6       vgchange — change attributes of a volume group
7

SYNOPSIS

9       vgchange  [--addtag  Tag]  [--alloc  AllocationPolicy] [-A|--autobackup
10       {y|n}]  [-a|--activate   [a|e|s|l]   {y|n}]   [--activationmode   {com‐
11       plete|degraded|partial}]  [-K|--ignoreactivationskip] [--monitor {y|n}]
12       [--poll {y|n}]  [-c|--clustered  {y|n}]  [-u|--uuid]  [--commandprofile
13       ProfileName]  [-d|--debug] [--deltag Tag] [--detachprofile] [-h|--help]
14       [--ignorelockingfailure] [--ignoremonitoring]  [--ignoreskippedcluster]
15       [--sysinit]  [--noudevsync]  [--lock-start]  [--lock-stop] [--lock-type
16       LockType] [-l|--logicalvolume MaxLogicalVolumes]  [-p|--maxphysicalvol‐
17       umes  MaxPhysicalVolumes]  [--metadataprofile ProfileName] [--[vg]meta‐
18       datacopies] NumberOfCopies|unmanaged|all]  [-P|--partial]  [-s|--physi‐
19       calextentsize PhysicalExtentSize[bBsSkKmMgGtTpPeE]] [-S|--select Selec‐
20       tion]  [--systemid  SystemID]  [--refresh]  [-t|--test]  [-v|--verbose]
21       [--version] [-x|--resizeable {y|n}] [VolumeGroupName...]
22

DESCRIPTION

24       vgchange  allows  you  to  change  the attributes of one or more volume
25       groups. Its main purpose is to activate and deactivate VolumeGroupName,
26       or  all  volume groups if none is specified.  Only active volume groups
27       are subject to changes and allow access to their logical volumes.  [Not
28       yet implemented: During volume group activation, if vgchange recognizes
29       snapshot logical volumes which were dropped because  they  ran  out  of
30       space,  it  displays  a  message  informing the administrator that such
31       snapshots should be removed (see lvremove(8)).  ]
32

OPTIONS

34       See lvm(8) for common options.
35
36       -A, --autobackup {y|n}
37              Controls automatic backup of metadata  after  the  change.   See
38              vgcfgbackup(8).  Default is yes.
39
40       -a, --activate [a|e|s|l]{y|n}
41              Controls  the  availability of the logical volumes in the volume
42              group for input/output.  In other words, makes the logical  vol‐
43              umes  known/unknown  to the kernel.  If autoactivation option is
44              used (-aay), each logical volume in the volume  group  is  acti‐
45              vated  only if it matches an item in the activation/auto_activa‐
46              tion_volume_list set in lvm.conf. If this list is not set,  then
47              all  volumes  are  considered  for  activation.  The -aay option
48              should be also used during  system  boot  so  it's  possible  to
49              select which volumes to activate using the activation/auto_acti‐
50              vation_volume_list settting.
51
52              Activation of a logical volume creates a symbolic link /dev/Vol‐
53              umeGroupName/LogicalVolumeName  pointing  to  the  device  node.
54              This link is removed on deactivation.  All software and  scripts
55              should  access the device through this symbolic link and present
56              this as the name of the device.  The location and  name  of  the
57              underlying  device  node may depend on the distribution and con‐
58              figuration (e.g. udev) and might change from release to release.
59
60              In a clustered VG, clvmd is used for activation, and the follow‐
61              ing options are possible:
62
63              With  -aey,  clvmd  activates  the LV in exclusive mode (with an
64              exclusive lock), allowing a single node to activate the LV.
65
66              With -asy, clvmd activates the LV in shared mode (with a  shared
67              lock),  allowing multiple nodes to activate the LV concurrently.
68              If the LV type prohibits shared access, such as  an  LV  with  a
69              snapshot,  the  's'  option  is ignored and an exclusive lock is
70              used.
71
72              With -ay (no mode specified), clvmd activates the LV  in  shared
73              mode  if  the LV type allows concurrent access, such as a linear
74              LV.  Otherwise, clvmd activates the LV in exclusive mode.
75
76              With -aey, -asy, and -ay, clvmd attempts to activate the  LV  on
77              all  nodes.   If  exclusive  mode  is used, then only one of the
78              nodes will be successful.
79
80              With -an, clvmd attempts to deactivate the LV on all nodes.
81
82              With -aly, clvmd activates the LV only on the  local  node,  and
83              -aln  deactivates only on the local node.  If the LV type allows
84              concurrent access, then shared mode is  used,  otherwise  exclu‐
85              sive.
86
87              LVs with snapshots are always activated exclusively because they
88              can only be used on one node at once.
89
90              For local VGs, -ay, -aey, and -asy are all equivalent.
91
92              In a shared VG, lvmlockd is used for locking if LVM is  compiled
93              with lockd support, and the following options are possible:
94
95              With  -aey,  the  command  activates  the  LV in exclusive mode,
96              allowing a single host to activate the LV (the host running  the
97              command).   Before  activating the LV, the command uses lvmlockd
98              to acquire an exclusive lock on the LV.  If the lock  cannot  be
99              acquired,  the  LV  is  not  activated and an error is reported.
100              This would happen if the LV is active on another host.
101
102              With -asy, the command activates the LV in shared mode, allowing
103              multiple hosts to activate the LV concurrently.  Before activat‐
104              ing the LV, the command uses lvmlockd to acquire a  shared  lock
105              on  the LV.  If the lock cannot be acquired, the LV is not acti‐
106              vated and an error is reported.  This would happen if the LV  is
107              active  exclusively  on  another host.  If the LV type prohibits
108              shared access, such as a snapshot, the command  will  report  an
109              error and fail.
110
111              With -an, the command deactivates the LV on the host running the
112              command.  After deactivating the LV, the command  uses  lvmlockd
113              to release the current lock on the LV.
114
115              With  lvmlockd,  an  unspecified  mode  is always exclusive, -ay
116              defaults to -aey.
117
118
119       --activationmode {complete|degraded|partial}
120              The activation  mode  determines  whether  logical  volumes  are
121              allowed  to  activate  when  there  are physical volumes missing
122              (e.g. due to a device failure).  complete is the  most  restric‐
123              tive;  allowing  only those logical volumes to be activated that
124              are not affected by the missing PVs.  degraded allows RAID logi‐
125              cal  volumes  to  be  activated  even  if they have PVs missing.
126              (Note that the "mirror" segment type is not  considered  a  RAID
127              logical  volume.   The  "raid1"  segment  type  should  be  used
128              instead.)  Finally, partial allows  any  logical  volume  to  be
129              activated  even  if  portions  are  missing  due to a missing or
130              failed PV.  This last option should only be used when performing
131              recovery  or  repair  operations.  degraded is the default mode.
132              To change it, modify activation_mode in lvm.conf(5).
133
134       -K, --ignoreactivationskip
135              Ignore the flag to skip Logical Volumes during activation.
136
137       -c, --clustered {y|n}
138              If clustered locking is enabled,  this  indicates  whether  this
139              Volume  Group  is  shared  with  other  nodes  in the cluster or
140              whether it contains only local disks that are not visible on the
141              other  nodes.  If the cluster infrastructure is unavailable on a
142              particular node at a particular time, you may still be  able  to
143              use Volume Groups that are not marked as clustered.
144
145       --detachprofile
146              Detach  any  metadata  configuration  profiles attached to given
147              Volume Groups. See lvm.conf(5) for more information about  meta‐
148              data profiles.
149
150       -u, --uuid
151              Generate new random UUID for specified Volume Groups.
152
153       --monitor {y|n}
154              Start  or  stop monitoring a mirrored or snapshot logical volume
155              with dmeventd, if it is installed.  If a device used by a  moni‐
156              tored  mirror  reports  an  I/O  error,  the  failure is handled
157              according to mirror_image_fault_policy and mirror_log_fault_pol‐
158              icy set in lvm.conf(5).
159
160       --poll {y|n}
161              Without  polling  a logical volume's backgrounded transformation
162              process will never complete.  If there is an  incomplete  pvmove
163              or  lvconvert  (for  example,  on  rebooting after a crash), use
164              --poll y to restart the process from its last checkpoint.   How‐
165              ever,  it  may  not be appropriate to immediately poll a logical
166              volume when it is activated, use --poll  n  to  defer  and  then
167              --poll y to restart the process.
168
169       --sysinit
170              Indicates  that  vgchange(8)  is being invoked from early system
171              initialisation scripts (e.g. rc.sysinit or  an  initrd),  before
172              writeable filesystems are available. As such, some functionality
173              needs to be disabled and this option acts as  a  shortcut  which
174              selects an appropriate set of options. Currently this is equiva‐
175              lent to using --ignorelockingfailure, --ignoremonitoring, --poll
176              n  and setting LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES environment
177              variable.
178
179              If --sysinit is used in conjunction with lvmetad(8) enabled  and
180              running,  autoactivation is preferred over manual activation via
181              direct vgchange call.  Logical volumes are autoactivated accord‐
182              ing to auto_activation_volume_list set in lvm.conf(5).
183
184       --noudevsync
185              Disable  udev  synchronisation.  The  process  will not wait for
186              notification from udev.  It will continue  irrespective  of  any
187              possible udev processing in the background.  You should only use
188              this if udev is not running or has rules that ignore the devices
189              LVM2 creates.
190
191       --ignoremonitoring
192              Make  no  attempt  to interact with dmeventd unless --monitor is
193              specified.  Do not use this if dmeventd is already monitoring  a
194              device.
195
196       --lock-start
197              Start  the lockspace of a shared VG in lvmlockd.  lvmlockd locks
198              becomes available for the VG, allowing LVM to use the  VG.   See
199              lvmlockd(8).
200
201       --lock-stop
202              Stop  the  lockspace of a shared VG in lvmlockd.  lvmlockd locks
203              become unavailable for the VG, preventing LVM from using the VG.
204              See lvmlockd(8).
205
206       --lock-type LockType
207              Change  the VG lock type to or from a shared lock type used with
208              lvmlockd.  See lvmlockd(8).
209
210       -l, --logicalvolume MaxLogicalVolumes
211              Changes the maximum logical volume number of an  existing  inac‐
212              tive volume group.
213
214       -p, --maxphysicalvolumes MaxPhysicalVolumes
215              Changes  the  maximum number of physical volumes that can belong
216              to this volume group.  For volume groups with metadata  in  lvm1
217              format, the limit is 255.  If the metadata uses lvm2 format, the
218              value 0 removes this restriction: there is then  no  limit.   If
219              you  have  a  large number of physical volumes in a volume group
220              with metadata in lvm2 format, for tool performance reasons,  you
221              should consider some use of --pvmetadatacopies 0 as described in
222              pvcreate(8), and/or use --vgmetadatacopies.
223
224       --metadataprofile ProfileName
225              Uses and attaches ProfileName configuration profile to the  vol‐
226              ume  group metadata. Whenever the volume group is processed next
227              time, the profile  is  automatically  applied.  The  profile  is
228              inherited  by all logical volumes in the volume group unless the
229              logical  volume  itself  has  its  own  profile  attached.   See
230              lvm.conf(5) for more information about metadata profiles.
231
232       --[vg]metadatacopies NumberOfCopies|unmanaged|all
233              Sets  the desired number of metadata copies in the volume group.
234              If set to a non-zero value, LVM will  automatically  manage  the
235              'metadataignore'  flags on the physical volumes (see pvchange or
236              pvcreate --metadataignore) in order  to  achieve  NumberOfCopies
237              copies of metadata.  If set to unmanaged, LVM will not automati‐
238              cally manage the 'metadataignore' flags.  If  set  to  all,  LVM
239              will  first clear all of the 'metadataignore' flags on all meta‐
240              data areas in the volume group, then set the value to unmanaged.
241              The vgmetadatacopies option is useful for volume groups contain‐
242              ing large numbers of physical volumes with metadata as it may be
243              used to minimize metadata read and write overhead.
244
245       -s, --physicalextentsize PhysicalExtentSize[BbBsSkKmMgGtTpPeE]
246              Changes  the  physical  extent  size on physical volumes of this
247              volume group.  A size suffix (k for kilobytes up to t  for  ter‐
248              abytes)  is  optional,  megabytes is the default if no suffix is
249              present.  For LVM2 format, the value must be a power of 2 of  at
250              least 1 sector (where the sector size is the largest sector size
251              of the PVs currently used in the VG) or, if not a power of 2, at
252              least  128KiB.  For the older LVM1 format, it must be a power of
253              2 of at least 8KiB.  The default is 4 MiB.
254
255              Before increasing the physical extent size, you  might  need  to
256              use  lvresize,  pvresize  and/or pvmove so that everything fits.
257              For example, every contiguous range of extents used in a logical
258              volume must start and end on an extent boundary.
259
260              If  the volume group metadata uses lvm1 format, extents can vary
261              in size from 8KiB to 16GiB and there is a limit of 65534 extents
262              in each logical volume.  The default of 4 MiB leads to a maximum
263              logical volume size of around 256GiB.
264
265              If the volume group metadata uses lvm2 format those restrictions
266              do  not  apply,  but  having a large number of extents will slow
267              down the tools but have no impact on I/O performance to the log‐
268              ical volume.  The smallest PE is 1KiB.
269
270              The 2.4 kernel has a limitation of 2TiB per block device.
271
272       --systemid SystemID
273              Changes  the  system  ID  of the VG.  Using this option requires
274              caution because the VG may become foreign to  the  host  running
275              the  command, leaving the host unable to access it.  See lvmsys‐
276              temid(7).
277
278       --refresh
279              If any logical volume in the volume group is active, reload  its
280              metadata.  This is not necessary in normal operation, but may be
281              useful if something has gone wrong or if you're doing clustering
282              manually without a clustered lock manager.
283
284       -x, --resizeable {y|n}
285              Enables or disables the extension/reduction of this volume group
286              with/by physical volumes.
287

Examples

289       To activate all known volume groups in the system:
290
291       vgchange -a y
292
293       To change the maximum number of  logical  volumes  of  inactive  volume
294       group vg00 to 128.
295
296       vgchange -l 128 /dev/vg00
297
298
299

SEE ALSO

301       lvchange(8), lvm(8), vgcreate(8)
302
303
304
305Sistina Software UKLVM TOOLS 2.02.143(2)-RHEL6 (2016-12-13)        VGCHANGE(8)
Impressum