2008-10-08 16:50:13 +04:00
.TH VGCHANGE 8 "LVM TOOLS #VERSION#" "Sistina Software UK" \" -*- nroff -*-
2002-01-04 23:35:19 +03:00
.SH NAME
vgchange \- change attributes of a volume group
.SH SYNOPSIS
.B vgchange
2004-11-16 21:09:32 +03:00
.RB [ \- \- addtag
2004-03-22 18:08:50 +03:00
.IR Tag ]
2004-11-16 21:09:32 +03:00
.RB [ \- \- alloc
.IR AllocationPolicy ]
2012-04-11 16:42:10 +04:00
.RB [ \- A | \- \- autobackup
.RI { y | n }]
2012-06-27 15:48:31 +04:00
.RB [ \- a | \- \- activate
2012-06-29 14:40:26 +04:00
.RI [ a | e | l ]
2012-04-11 16:42:10 +04:00
.RI { y | n }]
2013-07-11 14:44:36 +04:00
.RB [ \- K | \- \- ignoreactivationskip ]
2012-04-11 16:42:10 +04:00
.RB [ \- \- monitor
.RI { y | n }]
.RB [ \- \- poll
.RI { y | n }]
.RB [ \- c | \- \- clustered
.RI { y | n }]
2008-01-04 14:48:40 +03:00
.RB [ \- u | \- \- uuid ]
2012-04-11 16:42:10 +04:00
.RB [ \- d | \- \- debug ]
2004-11-16 21:09:32 +03:00
.RB [ \- \- deltag
2004-03-22 18:08:50 +03:00
.IR Tag ]
2013-07-03 18:45:27 +04:00
.RB [ \- \- profile
.IR ProfileName ]
.RB [ \- \- detachprofile ]
2012-04-11 16:42:10 +04:00
.RB [ \- h | \- \- help ]
.RB [ \- \- ignorelockingfailure ]
.RB [ \- \- ignoremonitoring ]
2013-10-02 00:20:10 +04:00
.RB [ \- \- ignoreskippedcluster ]
2012-04-11 16:42:10 +04:00
.RB [ \- \- sysinit ]
2009-08-04 12:09:52 +04:00
.RB [ \- \- noudevsync ]
2004-11-16 21:09:32 +03:00
.RB [ \- l | \- \- logicalvolume
2002-01-04 23:35:19 +03:00
.IR MaxLogicalVolumes ]
2006-08-16 18:41:42 +04:00
.RB [ -p | \- \- maxphysicalvolumes
.IR MaxPhysicalVolumes ]
2012-04-11 16:42:10 +04:00
.RB [ \- \- [ vg ] metadatacopies ]
.IR NumberOfCopies | unmanaged | all ]
.RB [ \- P | \- \- partial ]
2006-04-07 01:15:14 +04:00
.RB [ \- s | \- \- physicalextentsize
2012-04-11 16:42:10 +04:00
.IR PhysicalExtentSize [ bBsSkKmMgGtTpPeE ]]
.RB [ \- \- refresh ]
.RB [ -t | \- \- test ]
.RB [ \- v | \- \- verbose ]
2004-11-16 21:09:32 +03:00
.RB [ \- \- version ]
2012-04-11 16:42:10 +04:00
.RB [ \- x | \- \- resizeable
.RI { y | n }]
2002-01-04 23:35:19 +03:00
.RI [ VolumeGroupName ...]
.SH DESCRIPTION
2012-04-11 16:42:10 +04:00
vgchange allows you to change the attributes of one or more
volume groups. Its main purpose is to activate and deactivate
2002-01-04 23:35:19 +03:00
.IR VolumeGroupName ,
or all volume groups if none is specified. Only active volume groups
are subject to changes and allow access to their logical volumes.
2002-11-18 17:04:08 +03:00
[Not yet implemented: During volume group activation, if
2002-01-04 23:35:19 +03:00
.B vgchange
recognizes snapshot logical volumes which were dropped because they ran
out of space, it displays a message informing the administrator that such
snapshots should be removed (see
.BR lvremove (8)).
2002-11-18 17:04:08 +03:00
]
2002-01-04 23:35:19 +03:00
.SH OPTIONS
2012-04-11 16:42:10 +04:00
See \fB lvm\fP (8) for common options.
2002-01-04 23:35:19 +03:00
.TP
2012-04-11 16:42:10 +04:00
.BR \- A ", " \- \- autobackup " {" \fI y | \fI n }
2002-01-04 23:35:19 +03:00
Controls automatic backup of metadata after the change. See
2012-04-11 16:42:10 +04:00
.BR vgcfgbackup (8).
2002-01-04 23:35:19 +03:00
Default is yes.
.TP
2012-06-29 14:40:26 +04:00
.BR \- a ", " \- \- activate " [" \fI a | \fI e | \fI l ]{ \fI y | \fI n }
2012-04-11 16:42:10 +04:00
Controls the availability of the logical volumes in the volume
2004-11-12 18:59:09 +03:00
group for input/output.
In other words, makes the logical volumes known/unknown to the kernel.
2012-06-29 14:40:26 +04:00
If autoactivation option is used (\- aay), each logical volume in
the volume group is activated only if it matches an item in the
2013-06-14 11:36:56 +04:00
activation/auto_activation_volume_list set in lvm.conf. If this
2014-02-11 16:48:04 +04:00
list is not set, then all volumes are considered for activation.
The \- aay option should be also used during system boot so it's
possible to select which volumes to activate using the
activation/auto_activation_volume_list settting.
2004-11-12 18:59:09 +03:00
.IP
If clustered locking is enabled, add 'e' to activate/deactivate
exclusively on one node or 'l' to activate/deactivate only
2012-04-11 16:42:10 +04:00
on the local node.
2004-11-12 18:59:09 +03:00
Logical volumes with single-host snapshots are always activated
exclusively because they can only be used on one node at once.
2002-01-04 23:35:19 +03:00
.TP
2013-07-11 14:44:36 +04:00
.BR \- K ", " \- \- ignoreactivationskip
Ignore the flag to skip Logical Volumes during activation.
.TP
2012-04-11 16:42:10 +04:00
.BR \- c ", " \- \- clustered " {" \fI y | \fI n }
2007-01-23 16:08:34 +03:00
If clustered locking is enabled, this indicates whether this
Volume Group is shared with other nodes in the cluster or whether
it contains only local disks that are not visible on the other nodes.
If the cluster infrastructure is unavailable on a particular node at a
particular time, you may still be able to use Volume Groups that
are not marked as clustered.
.TP
2013-07-03 18:45:27 +04:00
.BR \- \- detachprofile
Detach any configuration profiles attached to given Volume Groups.
See also \fB lvm\fP (8) and \fB lvm.conf\fP (5) for more
information about configuration profiles.
.TP
2008-01-04 14:48:40 +03:00
.BR \- u ", " \- \- uuid
Generate new random UUID for specified Volume Groups.
.TP
2012-04-11 16:42:10 +04:00
.BR \- \- monitor " {" \fI y | \fI n }
2010-03-24 01:30:18 +03:00
Start or stop monitoring a mirrored or snapshot logical volume with
2006-08-19 02:27:01 +04:00
dmeventd, if it is installed.
If a device used by a monitored mirror reports an I/O error,
2012-04-11 16:42:10 +04:00
the failure is handled according to
.B mirror_image_fault_policy
and
.B mirror_log_fault_policy
set in
2006-08-19 02:35:59 +04:00
.BR lvm.conf (5).
2006-08-19 01:49:19 +04:00
.TP
2012-04-11 16:42:10 +04:00
.BR \- \- poll " {" \fI y | \fI n }
2010-01-06 22:08:58 +03:00
Without polling a logical volume's backgrounded transformation process
will never complete. If there is an incomplete pvmove or lvconvert (for
2012-04-11 16:42:10 +04:00
example, on rebooting after a crash), use \fB \- \- poll y\fP to restart the
2010-01-06 22:08:58 +03:00
process from its last checkpoint. However, it may not be appropriate to
2012-04-11 16:42:10 +04:00
immediately poll a logical volume when it is activated, use
\fB \- \- poll n\fP to defer and then \fB \- \- poll y\fP to restart the process.
2010-01-05 23:56:51 +03:00
.TP
2010-05-06 15:15:55 +04:00
.BR \- \- sysinit
Indicates that vgchange(8) is being invoked from early system initialisation
scripts (e.g. rc.sysinit or an initrd), before writeable filesystems are
available. As such, some functionality needs to be disabled and this option
acts as a shortcut which selects an appropriate set of options. Currently
2012-04-11 16:42:10 +04:00
this is equivalent to using
.BR \- \- ignorelockingfailure ,
.BR \- \- ignoremonitoring ,
.B \- \- poll n
and setting \fB LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES\fP
2010-05-06 15:15:55 +04:00
environment variable.
2012-07-10 15:49:46 +04:00
If \fB \- \- sysinit\fP is used in conjunction with lvmetad(8) enabled and running,
autoactivation is preferred over manual activation via direct vgchange call.
Logical volumes are autoactivated according to auto_activation_volume_list
set in lvm.conf(5).
2010-05-06 15:15:55 +04:00
.TP
2009-08-04 12:09:52 +04:00
.BR \- \- noudevsync
Disable udev synchronisation. The
process will not wait for notification from udev.
It will continue irrespective of any possible udev processing
in the background. You should only use this if udev is not running
or has rules that ignore the devices LVM2 creates.
.TP
2007-06-18 18:14:33 +04:00
.BR \- \- ignoremonitoring
2012-04-11 16:42:10 +04:00
Make no attempt to interact with dmeventd unless
2007-06-18 18:14:33 +04:00
.BR \- \- monitor
is specified.
Do not use this if dmeventd is already monitoring a device.
.TP
2012-04-11 16:42:10 +04:00
.BR \- l ", " \- \- logicalvolume " " \fI MaxLogicalVolumes
2002-01-04 23:35:19 +03:00
Changes the maximum logical volume number of an existing inactive
volume group.
.TP
2012-04-11 16:42:10 +04:00
.BR \- p ", " \- \- maxphysicalvolumes " " \fI MaxPhysicalVolumes
2006-08-16 18:41:42 +04:00
Changes the maximum number of physical volumes that can belong
to this volume group.
For volume groups with metadata in lvm1 format, the limit is 255.
2010-06-29 00:36:18 +04:00
If the metadata uses lvm2 format, the value 0 removes this restriction:
there is then no limit. If you have a large number of physical volumes in
a volume group with metadata in lvm2 format, for tool performance reasons,
you should consider some use of \fB --pvmetadatacopies 0\fP as described in
\fB pvcreate(8)\fP , and/or use \fB --vgmetadatacopies\fP .
.TP
2012-04-11 16:42:10 +04:00
.BR \- \- [ vg ] metadatacopies " " \fI NumberOfCopies | \fI unmanaged | \fI all
2010-06-29 00:36:18 +04:00
Sets the desired number of metadata copies in the volume group. If set to
a non-zero value, LVM will automatically manage the 'metadataignore'
2010-07-13 19:04:23 +04:00
flags on the physical volumes (see \fB pvchange\fP or \fB pvcreate --metadataignore\fP ) in order
2010-06-29 00:36:18 +04:00
to achieve \fI NumberOfCopies\fP copies of metadata. If set to \fI unmanaged\fP ,
LVM will not automatically manage the 'metadataignore' flags. If set to
\fI all\fP , LVM will first clear all of the 'metadataignore' flags on all
metadata areas in the volume group, then set the value to \fI unmanaged\fP .
The \fB vgmetadatacopies\fP option is useful for volume groups containing
large numbers of physical volumes with metadata as it may be used to
minimize metadata read and write overhead.
2006-08-16 18:41:42 +04:00
.TP
2012-04-11 16:42:10 +04:00
.BR \- s ", " \- \- physicalextentsize " " \fI PhysicalExtentSize [ \fI BbBsSkKmMgGtTpPeE ]
2006-04-07 01:15:14 +04:00
Changes the physical extent size on physical volumes of this volume group.
A size suffix (k for kilobytes up to t for terabytes) is optional, megabytes
2013-12-12 14:26:35 +04:00
is the default if no suffix is present. The value must be at least 1 sector
for LVM2 format (where the sector size is the largest sector size of the
PVs currently used in the VG) or 8KiB for LVM1 format and it must be a
power of 2. The default is 4 MiB.
2012-04-11 16:42:10 +04:00
2006-04-07 01:15:14 +04:00
Before increasing the physical extent size, you might need to use lvresize,
pvresize and/or pvmove so that everything fits. For example, every
2012-04-11 16:42:10 +04:00
contiguous range of extents used in a logical volume must start and
2006-04-07 01:15:14 +04:00
end on an extent boundary.
2012-04-11 16:42:10 +04:00
2006-04-07 01:15:14 +04:00
If the volume group metadata uses lvm1 format, extents can vary in size from
2012-04-11 16:42:10 +04:00
8KiB to 16GiB and there is a limit of 65534 extents in each logical volume.
The default of 4 MiB leads to a maximum logical volume size of around 256GiB.
2006-04-07 01:15:14 +04:00
If the volume group metadata uses lvm2 format those restrictions do not apply,
but having a large number of extents will slow down the tools but have no
2012-04-11 16:42:10 +04:00
impact on I/O performance to the logical volume. The smallest PE is 1KiB.
The 2.4 kernel has a limitation of 2TiB per block device.
2006-04-07 01:15:14 +04:00
.TP
2009-02-25 16:17:40 +03:00
.BR \- \- refresh
If any logical volume in the volume group is active, reload its metadata.
This is not necessary in normal operation, but may be useful
if something has gone wrong or if you're doing clustering
manually without a clustered lock manager.
.TP
2012-04-11 16:42:10 +04:00
.BR \- x ", " \- \- resizeable " {" \fI y | \fI n }
2002-01-04 23:35:19 +03:00
Enables or disables the extension/reduction of this volume group
with/by physical volumes.
2012-04-11 16:42:10 +04:00
.SH Examples
2002-01-04 23:35:19 +03:00
To activate all known volume groups in the system:
2012-04-11 16:42:10 +04:00
.sp
.B vgchange -a y
2002-01-04 23:35:19 +03:00
To change the maximum number of logical volumes of inactive volume group
2012-04-11 16:42:10 +04:00
vg00 to 128.
.sp
.B vgchange -l 128 /dev/vg00
2002-01-04 23:35:19 +03:00
.SH SEE ALSO
2004-11-12 18:59:09 +03:00
.BR lvchange (8),
2002-01-04 23:35:19 +03:00
.BR lvm (8),
.BR vgcreate (8)