chvg Command
Purpose
Sets the characteristics of a volume group (VG).
Syntax
chvg [-s
Sync {y|n}][-h
Hotspare
{y|Y|n|r}][-a
AutoOn {y|n}][-c|-l] [-L
LTGSize][-Q
{y|n}][-X {none|SSD}][-u][-r {y|n}][-x
{y|n}][-S|-R][-t
[factor]][-B|-G][-P][-v][-C][-f][-g][-b {y|n}][-I][-O {y|n}][-M
{y|n|s}][-N
o|n][-j {y|n}][-e
y|n][-k
y|n]
VolumeGroup
Description
The chvg command changes the characteristics of a VG. You can also use the System Management Interface Tool (SMIT) smit chvg fast path to run this command.
Flags
- Only the -a, -R, -S, -u, and -h options are allowed on the VG that has a snapshot VG.
- Only the -a, -R, -S, and -u options are allowed on the snapshot VG.
- Changing a VG to a Big VG format (-B flag) or to a Scalable VG format (-G flag) and specifying the data encryption option (-k flag) cannot be combined with any other change operation.
- Bad block relocation policy is not supported on a VG that is created with 4 KB block physical volumes.
Item | Description |
---|---|
-a AutoOn | Determines whether the VG is automatically activated during system startup. The following
values are the valid values for the AutoOn variable:
|
-b | Sets the bad block relocation policy of a VG. The default value is
y .
|
-B | Changes the VG to Big VG format that accommodates up to 128 physical volumes and 512 logical
volumes. Notes:
|
-c | Same as -C flag. In AIX Version 6.1 and later only Enhanced Concurrent Capable VGs are created. |
-C | Changes the VG into an Enhanced Concurrent Capable VG. Changes the VG varied on in
nonconcurrent mode to Enhanced Concurrent Capable. This requires that the VG be re-imported on all
other nodes prior to activation in Enhanced Concurrent mode. Changes the VG varied on in Concurrent
mode to an Enhanced Concurrent mode VG. Only use the -C flag with the PowerHA SystemMirror ES. It has no effect on VGs and
systems that do not use the HACMP ES product. Enhanced Concurrent VGs use Group Services. Group Services ships with PowerHA SystemMirror ES and must be configured before activating a VG in this mode. Use this flag to change a VG into an Enhanced Concurrent Capable
VG.
Notes:
|
-e y | n | Enables the Critical PVs option of the VG. This flag is available in IBM®
AIX® 7.2 with Technology Level (TL) 1, or later.
|
-f | Forces the VG to be created on the specified physical volume unless the physical volume is a part of another VG in the Device Configuration Database or a VG that is active. |
-g | Examines all the disks in the VG to see whether they have grown in size. If
any disks have grown in size, the VG attempts to add additional physical partitions to the physical
volume. If necessary, determines proper 1016 multiplier and conversion to Big VG. Note: You might
need to execute
varyoffvg command and then varyonvg command on the
VG for logical volume manager (LVM) to see the size change on the disks. |
-G | Changes the VG to Scalable VG format. This can accommodate up to 1024 physical
volumes and 4096 logical volumes. Notes:
|
-h Hotspare | Sets the sparing characteristics for the VG specified by the VolumeGroup
parameter. Either allows (y) the automatic migration of the failed disks, or
prohibits (n) the automatic migration of the failed disks. This flag has no
meaning for non-mirrored logical volumes.
Note: This flag is not supported for the concurrent capable VGs.
|
-I | Modifies the VG so that it can be imported to AIX Version 6.1. The LTGSize behaves as if the VG is created before AIX Version 6.1. This operation might fail if the VG contains striped logical volumes whose strip size (a strip size multiplied by the number of disks in an array equals the strip size) is larger than the supported strip size on AIX Version 6.1. If logical volumes are later created with a strip size that is larger than the supported strip size on AIX Version 6.1, then attempting to import the VG back to AIX Version 6.1 is not supported. |
-j y | n | If the Enhanced Journaled File System (JFS2) is mounted, the resync operation of the LVM
resynchronizes the blocks that are allocated only by the JFS2. You can specify the following values
for this flag:
|
-k y | n | Changes the data encryption option in the VG. The -k flag is available
in IBM AIX 7.2 with Technology Level 5, or later. You can specify
the following values for this flag:
Notes:
When you enable data encryption in a VG, some disk space is reserved at the end sector of the disk. Reclaim some physical partitions at the end sector of the disks to have sufficient free space for the encryption metadata. If the required physical partitions are in use, the chvg command returns an error. When you disable data encryption in a VG, the validity of the operation is checked. If the VG contains any encrypted logical volumes, the chvg command returns an error. |
-l | Changes the VG into a Non-Concurrent Capable VG. The VG must be varied on in nonconcurrent mode for this command to take effect. |
-L | For VGs that are created on AIX Version 6.1,
the -L flag is ignored. When the VG is varied on, the logical track group size
is set to the common max transfer size of the disks. For VGs that are created before AIX Version 6.1, the -L flag changes
the logical track group size, in number of kilobytes, of the VG. The value of the
LTGSize parameter must be |
-M | Changes the mirror pool strictness for the VG.
|
-N o | n |
Notes:
|
-O y | n | Changes the infinite retry option of the VG.
Note: Infinite retry is not supported in a Geographic Logical Volume Manager (GLVM)
environment.
|
-P PhysicalPartitions | Increases the number of physical partitions a VG can accommodate. The valid values for the PhysicalPartitions variable are 64k, 128k, 256k, 512k, 768k, 1024k, and 2048k. The value can be expressed in various forms such as 64k, 64K, 64, or 65536. The value must be larger than the current number of physical partitions a VG can accommodate or no action is taken. This option is valid with only Scalable-type VGs. |
-Q | Determines whether the VG is automatically varied off after losing its quorum of physical
volumes. The change becomes effective immediately.
|
-X none | SSD | Sets or changes a physical volume type restriction on the VG. Once a physical volume
restriction is turned on, the VG can no longer be imported on a version of AIX that does not support physical volume type restrictions. The use of the
-I flag on a physical volume restricted VG is prohibited.
|
-r y | n | Changes the critical VG option of the VG.
Notes:
|
-R | Resumes normal I/O operations for a VG. |
-s Sync | Sets the synchronization characteristics for the VG specified by the
VolumeGroup parameter. Either permits (y) the automatic
synchronization of stale partitions or prohibits (n) the automatic
synchronization of stale partitions. This flag has no meaning for non-mirrored logical volumes.
Automatic synchronization is a recovery mechanism that is attempted only after the LVM device driver
logs LVM_SA_STALEPP in the errpt . A partition that becomes stale
through any other path (for example, mklvcopy ) is not automatically resynced.
Note: This flag is not supported for the concurrent capable VGs.
|
-S | Drains I/O's for this VG and suspends future I/O's. |
-t [factor] | Changes the limit of the number of physical partitions per physical volume, which is
specified by the factor variable. The value of factor must be
between 1 and 16 for 32 disk VGs and 1 and 64 for 128 disk VGs. If factor is not supplied, it is set to the lowest value such that the number of physical partitions of the largest disk in VG is less than the product of factor and 1016. If factor is specified, the maximum number of physical partitions per physical volume for this VG changes to the product of factor and 1016. Notes:
|
-u | Unlocks the VG. This option is provided if the VG is left in a locked state by abnormal
termination of another LVM operation (such as the command core dumping, or the system crashing).
Note: Before using the -u flag, make sure that the VG is not used by another
LVM command.
|
-v LogicalVolumes | Increases the number of logical volumes that can be created. Valid values are 512, 1024, 2048 and 4096. The value must be larger than the current value or no action is taken. This option is only valid with Scalable-type VGs. |
-x | Changes the mode in which the Concurrent Capable VG is varied on. The VG must be varied on in
nonconcurrent mode for this command to take effect. Note: There is no auto on support for Enhanced
Concurrent Capable VGs. On AIX Version 6.1 and later
only Enhanced Concurrent Capable VGs are created.
Note: If the VG is not created Concurrent Capable, this command has no effect on
the VG.
For this auto-varyon into concurrency of the VG to take
effect, you must enter the following line into the /etc/inittab
file:
Attention: This entry must be added after the entry used to initiate
srcmstr . |
Examples
- To cause VG
vg03
to be automatically activated during system startup, enter the following command:chvg -a y vg03
- To change the VG
vg03
to a supported state if it is in violation of 1016 physical partitions per physical volume limit, enter the following command:chvg -t vg03
- To change the maximum number of physical partitions per physical volume to 2032 and the maximum
number of physical volumes in VG
vg03
to 16, enter the following command:chvg -t 2 vg03
Files
Item | Description |
---|---|
/usr/sbin | Directory where the chvg command resides. |