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

Notes:
  1. Only the -a, -R, -S, -u, and -h options are allowed on the VG that has a snapshot VG.
  2. Only the -a, -R, -S, and -u options are allowed on the snapshot VG.
  3. 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.
  4. 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:
y
The VG is automatically activated during the system startup.
n
The VG is not automatically activated during the system startup.
-b Sets the bad block relocation policy of a VG. The default value is y.
y
Turns on the bad block relocation policy of a VG.
n
Turns off the bad block relocation policy of a VG.
-B Changes the VG to Big VG format that accommodates up to 128 physical volumes and 512 logical volumes.
Notes:
  1. The -B flag cannot be used if there are any stale physical partitions.
  2. Once the VG is converted, it cannot be imported into AIX Version 6.1 or previous versions.
  3. The -B flag cannot be used if the VG is varied on in concurrent mode.
  4. There must be enough free partitions available on each physical volume for the volume group descriptor area (VGDA) expansion for the operation to be successful.
  5. Since the VGDA resides on the edge of the disk and it requires contiguous space for expansion, the free partitions are required on the edge of the disk. If those partitions are allocated for user usage, they are migrated to other free partitions on the same disk. The rest of the physical partitions are renumbered to reflect the loss of the partitions for VG descriptor area (VGDA) usage. This changes the mappings of the logical to physical partitions in all the physical volumes of this VG. If the mappings of the logical volumes are saved for a potential recovery operation, you must generate the maps again after the completion of the conversion operation. Also, if the backup of the VG is taken with the map option and you plan to restore by using those maps, the restore operation might fail since the partition number might no longer exist (due to reduction). It is recommended that backup is taken before the conversion, and right after the conversion if the map option is used.
  6. Since the VGDA space is increased substantially, every VGDA update operation (creating and changing a logical volume, adding a physical volume, and so on) might take longer to run.
-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:
  1. Enhanced Concurrent VGs use Group Services. Group Services ships with HACMP ES and must be configured before activating a VG in this mode.
  2. Only Enhanced Concurrent Capable VGs are supported when running with a 64-bit kernel. Concurrent Capable VGs are not supported when running with a 64-bit kernel.
  3. Enhanced Concurrent Capable VGs always have multinode varyon protection enabled. For more information about multinode varyon protection, see the -N flag.
-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.
y
Enables the Critical PVs option of the VG. If write request failures occur in the mirrored logical volume, the physical volume is marked as missing and it stops sending I/O requests to the failed mirrored logical volume. If the Critical PVs option is enabled in a VG, you can import only the VG into IBM AIX 7.2 with TL 1, or later.
n
The Critical PVs option is not used. This is the default value.
-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:
  1. The -G flag cannot be used if there are any stale physical partitions.
  2. Once the VG is converted, it cannot be imported into AIX Version 6.1 or lower versions.
  3. The -G flag can only be used if the VG is varied on.
  4. There must be enough free partitions available on each physical volume for the VGDA expansion for this operation to be successful.
  5. Since the VGDA resides on the edge of the disk and it requires contiguous space for expansion, the free partitions are required on the edge of the disk. If those partitions are allocated for user usage, they are migrated to other free partitions on the same disk. The rest of the physical partitions are renumbered to reflect the loss of the partitions for VGDA usage. This changes the mappings of the logical to physical partitions in all the physical volumes of this VG. If you have saved the mappings of the logical volumes for a potential recovery operation, you must generate the maps again after the completion of the conversion operation. Also, if the backup of the VG is taken with the map option and you plan to restore by using those maps, the restore operation might fail since the partition number might no longer exist (due to reduction). It is recommended that backup is taken before the conversion, and right after the conversion if the map option is used.
  6. Since the VGDA space is increased substantially, every VGDA update operation (creating a logical volume, changing a logical volume, adding a physical volume, and so on) might take considerably longer to run.
  7. Changing an existing VG to Scalable VG format changes the device subtype (reported by the IOCINFO ioctl() call) for all associated logical volumes to DS_LVZ, regardless of the previous subtype. This alteration does not change any behavior of the logical volumes beyond the reported subtype.
-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.
y
Enhances the automatic migration of the failed disks by permitting one for one migration of partitions from one failed disk to one spare disk. The smallest disk in the VG spare pool that is large enough for one to one migration is used.
Y
Permits the automatic migration of the failed disks and allows migration to the entire pool of spare disks, as opposed to a one for one migration of partitions to a spare.
n
Prohibits the automatic migration of a failed disk. This is the default value for a VG.
r
Removes all disks from the Hotspare pool for the VG.
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:
y
Resynchronizes the blocks that are allocated only by the JFS2.
n
Resynchronizes all the blocks regardless of the JFS2 block allocations. This is the default value.
-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:
y
Changes the data encryption option in the VG. If the data encryption option is enabled in a VG, you can import the VG into an AIX logical partition (LPAR) that is running IBM AIX 7.2 with Technology Level 5, or later.
n
Disables the data encryption option in the VG.
Notes:
  • The -k flag cannot be used on rootvg.
  • Each physical volume must have sufficient free partitions for the encryption metadata for a successful completion of this operation.
  • The encryption metadata resides at the end of the disk sectors and requires contiguous space for expansion. Therefore, free partitions are required at the end of the disk sectors. If the partitions are in use or allocated to a logical volume, the logical partitions are migrated to other free partitions on the same disk. The remaining physical partitions on the physical volume are renumbered after the loss of the partitions for encryption metadata usage. This renumbering might change the mappings of the logical partition to physical partitions in all the physical volumes of the VG. If you had saved the mappings of the logical volumes for a recovery operation, you must re-create the maps after the data encryption option is modified. Also, if a backup of the VG is saved with the map option, and you plan to restore the VG by using those maps, the restore operation might fail as the partition number might not exist due to the renumbering of the physical partitions. As a best practice, you must back up the VG before and after you change the data encryption option if the map option is used.

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 0, 128, 256, 512, or 1024. In addition, it must be less than or equal to the maximum transfer size of all disks in the VG. The default size is 128 kilobytes. An LTGSize of 0 causes the next varyonvg to set the logical track group size to the common max transfer size of the disks.

-M Changes the mirror pool strictness for the VG.
y
Each logical volume copy that is created in the VG must be assigned to a mirror pool.
n
No restrictions are placed on the user of the mirror pool. This is the default value.
s
Super-strict mirror pools are enforced on the VG.
Notes:
  1. Local and remote physical volumes cannot belong to the same mirror pool.
  2. A maximum of three mirror pools can be in a VG.
  3. Each mirror pool must contain at least one copy of each logical volume in the VG.
-N o | n
o
Changes the VG that is allowed to varyon in the nonconcurrent mode in more than one node at the same time.
n
Changes the VG that is not allowed to varyon in nonconcurrent mode in more than one node at the same time.
Notes:
  • This VG can no longer be imported on a version of AIX that does not support this flag.
  • This option is not available for VGs varied on in the concurrent mode.
-O y | n Changes the infinite retry option of the VG.
y
Enables the infinite retry option of the VG. The failed I/O request is retried until it is successful.
n
Disables the infinite retry option of the VG. The failing I/O on the VG is not retried. It does not affect the logical volume infinite retry option.
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.
n
The VG stays active until it loses all of its physical volumes.
y
The VG is automatically varied off after losing its quorum of physical volumes. This value is the default value.
-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.
none
Removes a physical volume type restriction on the VG. This flag has no effect if the VG was not previously physical volume restricted.
SSD
Places a physical volume type restriction on the VG if all the underlying disks are of type SSD. Displays an error message if one or more of the existing physical volumes in the VG does not meet the restriction.
-r y | n Changes the critical VG option of the VG.
n
Disables the critical VG option of the VG.
y
Enables the critical VG option of the VG. If the VG is set to the critical VG, any I/O request failure starts the LVM metadata write operation to check the state of the disk before returning the I/O failure. If the critical VG option is set to rootvg and if the VG losses access to the quorum set of disks (or all disks if quorum is disabled), instead of moving the VG to an offline state, the node is crashed and a message is displayed on the console.
Notes:
  • The critical VG can no longer be imported into a version of AIX that does not support the -r flag.
  • The critical VG option is not available for the VGs that are varied on in concurrent mode.
-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.
y
Attempts to automatically synchronize stale partitions.
n
Prohibits automatic synchronization of stale partitions. This option is the default for a VG.
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:
  1. This option is ignored for Scalable-type VGs.
  2. The value of factor cannot be changed if there are any stale physical partitions in the VG.
  3. This flag cannot be used if the VG is varied on in concurrent mode.
  4. The maximum number of physical volumes that can be included in this VG is reduced to the value obtained by maximum number of physical volumes (MAXPVS) divided by the specified value of the factor variable.
  5. Changing an existing VG to Scalable VG format changes the device subtype (reported by the IOCINFO ioctl() call) for all associated logical volumes to DS_LVZ, regardless of the previous subtype. This alteration does not change any behavior of the logical volumes beyond the reported subtype.
-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.
y
Autovaryon the VG in concurrent mode.
n
Autovaryon the VG in nonconcurrent mode.
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:
rc_clvmv:2:wait:/usr/sbin/clvm_cfg 2>&1
Attention: This entry must be added after the entry used to initiate srcmstr.

Examples

  1. To cause VG vg03 to be automatically activated during system startup, enter the following command:
    chvg -a y vg03
  2. 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
  3. 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.