chvg Command

Purpose

Sets the characteristics of a volume group.

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 }] VolumeGroup

Description

The chvg command changes the characteristics of a volume group.

You could also use the System Management Interface Tool (SMIT) smit chvg fast path to run this command.

Flags

Note:
  1. Only the -a, -R, -S, -u, and -h options are allowed on the volume group that has a snapshot volume group.
  2. Only the -a, -R, -S, and -u options are allowed on the snapshot volume group.
  3. Changing a VG to a Big VG format (-B flag) or to a Scalable VG format (-G flag) cannot be combined with any other change operation.
  4. Bad block relocation policy is not supported on a volume group that is created with 4 KB block physical volumes.
Item Description
-a AutoOn Determines if the volume group is automatically activated during system startup. The AutoOn variable can be either of the following:
y
The volume group is automatically activated during system startup.
n
The volume group is not automatically activated during system startup.
-b Sets the bad-block relocation policy of a volume group. The default value is yes.
y
Will turn on the bad-block relocation policy of a volume group.
n
Turns off the bad block relocation policy of a volume group.
-B Changes the volume group to Big VG format. This can accommodate up to 128 physical volumes and 512 logical volumes.
Note:
  1. The -B flag cannot be used if there are any stale physical partitions.
  2. Once the volume group is converted, it cannot be imported into AIX® 4.3.1 or lower versions.
  3. The -B flag cannot be used if the volume group is varied on in concurrent mode.
  4. There must be enough free partitions available on each physical volume for the VGDA expansion for this operation to be successful.
  5. Because 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 will be migrated to other free partitions on the same disk. The rest of the physical partitions will be renumbered to reflect the loss of the partitions for VGDA usage. This will change the mappings of the logical to physical partitions in all the PVs of this VG. If you have saved the mappings of the LVs for a potential recovery operation, you should 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 using those maps, the restore operation may fail since the partition number may 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 utilized.
  6. Because the VGDA space has been increased substantially, every VGDA update operation (creating a logical volume, changing a logical volume, adding a physical volume, and so on) may take considerably longer to run.
-c Same as -C flag. In AIX 5.2 and later only Enhanced Concurrent Capable volume groups will be created.
-C Changes the volume group into an Enhanced Concurrent Capable volume group. Changes the volume group varied on in non-concurrent mode to Enhanced Concurrent Capable. This requires that the volume group be re-imported on all other nodes prior to activation in Enhanced Concurrent mode. Changes the volume group varied on in Concurrent mode to an Enhanced Concurrent mode volume group. Only use the -C flag with the PowerHA® SystemMirror® ES. It has no effect on volume groups and systems not using the HACMP ES product.

Enhanced Concurrent volume groups use Group Services. Group Services ships with PowerHA SystemMirror ES and must be configured prior to activating a volume group in this mode.

Use this flag to change a volume group into an Enhanced Concurrent Capable volume group.
Note:
  1. Enhanced Concurrent volume groups use Group Services. Group Services ships with HACMP ES and must be configured prior to activating a volume group in this mode.
  2. Only Enhanced Concurrent Capable volume groups are supported when running with a 64-bit kernel. Concurrent Capable volume groups are not supported when running with a 64-bit kernel.
  3. Enhanced Concurrent Capable volume groups always have multinode varyon protection enabled. See the -N flag for details about multinode varyon protection.
-f Forces the volume group to be created on the specified physical volume unless the physical volume is part of another volume group in the Device Configuration Database or a volume group that is active.
-g Will examine all the disks in the volume group to see if they have grown in size. If any disks have grown in size attempt to add additional PPs to PV. If necessary will determine proper 1016 multiplier and conversion to big vg.
Note: The user might be required to execute varyoffvg and then varyonvg on the volume group for LVM to see the size change on the disks.
-G Changes the volume group 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 volume group is converted, it cannot be imported into AIX 5.2 or lower versions.
  3. The -G flag cannot be used if the volume group 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 will be migrated to other free partitions on the same disk. The rest of the physical partitions will be renumbered to reflect the loss of the partitions for VGDA usage. This will change the mappings of the logical to physical partitions in all the PVs of this VG. If you have saved the mappings of the LVs for a potential recovery operation, you should 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 using those maps, the restore operation may fail since the partition number may 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 utilized.
  6. Because the VGDA space has been increased substantially, every VGDA update operation (creating a logical volume, changing a log ical volume, adding a physical volume, and so on) may take considerably longer to run.
  7. Changing an existing volume group to Scalable VG format will change the device subtype (reported by the IOCINFO ioctl() call) for all associated LVs to DS_LVZ, regardless of the previous subtype. This alteration does not change any behavior of the LV's beyond the reported subtype.
-h Hotspare Sets the sparing characteristics for the volume group specified by the VolumeGroup parameter. Either allows (y) the automatic migration of failed disks, or prohibits (n) the automatic migration of failed disks. This flag has no meaning for non-mirrored logical volumes
y
Enhances the automatic migration of failed disks by permitting one for one migration of partitions from one failed disk to one spare disk. The smallest disk in the volume group spare pool that is big enough for one to one migration will be used.
Y
Permits the automatic migration of 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 volume group.
r
Removes all disks from the Hotspare pool for the volume group.
Note: This flag is not supported for the concurrent capable volume groups.
-I Modifies the volume group so that it can be imported to AIX 5.1 and AIX 5.2. The LTGSize will behave as if the volume group had been created prior to AIX 5.3. This operation might fail if the volume group contains striped logical volumes whose strip size (a strip size multiplied by the number of disks in an array equals the stripe size) is larger than the supported strip size on AIX 5.1 or AIX 5.2. If logical volumes are later created with a strip size that is larger than the supported strip size on AIX 5.1 or AIX 5.2, then attempting to import the volume group back to AIX 5.1 or AIX 5.2 is not supported.
-j y | n If the Enhanced Journaled File System (JFS2) is mounted, the resync operation of the logical volume manager (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 of the blocks regardless of the JFS2 block allocations. This is the default value.
-l Changes the volume group into a Non-Concurrent Capable volume group. The volume group must be varied on in non-concurrent mode for this command to take effect.
-L For volume groups created on AIX 5.3, the -L flag is ignored. When the volume group is varied on, the logical track group size will be set to the common max transfer size of the disks.

For volume groups created prior to AIX 5.3, the -L flag changes the logical track group size, in number of kilobytes, of the volume group. The value of the LTGSize parameter must be 0, 128, 256, 512, or 1024. In addition, it should be less than or equal to the maximum transfer size of all disks in the volume group. The default size is 128 kilobytes. An LTGSize of 0 will cause 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 volume group.
y
Each logical volume copy created in the volume group must be assigned to a mirror pool.
n
No restrictions are placed on the user of mirror pool. This is the default value.
s
Super-strict mirror pools are enforced on the volume group.
Note:
  1. Local and remote physical volumes cannot belong to the same mirror pool.
  2. A maximum of three mirror pools can be in a volume group.
  3. Each mirror pool must contain at least one copy of each logical volume in the volume group.
-N o|n
o
Changes the volume group that is allowed to varyon in the non-concurrent mode in more than one node at the same time.
n
Changes the VG that is not allowed to varyon in non-concurrent mode in more than one node at the same time.
Note:
  • This VG can no longer be imported on a version of AIX that does not support this flag.
  • This option is not available for volume groups varied on in the concurrent mode.
-O y | n Changes the infinite retry option of the volume group.
y
Enables the infinite retry option of the volume group. The failed I/O request is retried until it is successful.
n
Disables the infinite retry option of the volume group. The failing I/O on the volume group is not retried. It does not affect the logical volume infinite retry option.
Note: Infinite retry is not supported in a GLVM environment.
-P PhysicalPartitions Increases the number of physical partitions a volume group can accommodate. Where the PhysicalPartitions variable is represented in units of 1024 partitions. Valid values are 64, 128, 256, 512 768, 1024 and 2048. The value should be larger than the current value or no action is taken. This option is only valid with Scalable-type volume groups.
-Q Determines if the volume group is automatically varied off after losing its quorum of physical volumes. The default value is yes. The change becomes effective immediately.
n
The volume group stays active until it loses all of its physical volumes.
y
The volume group is automatically varied off after losing its quorum of physical volumes.
-X none | SSD Sets or changes a PV type restriction on the VG. Once a PV restriction is turned on, the VG can no longer be imported on a version of AIX that does not support PV type restrictions. The use of the -I flag on a PV restricted VG is prohibited.
none
Removes a PV type restriction on the VG. This flag has no effect if the VG was not previously PV restricted.
SSD
Places a PV 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 PV's in the VG does not meet the restriction.
-r y | n Changes the critical volume group (VG) option of the volume group.
n
Disables the critical VG option of the volume group.
y
Enables the critical VG option of the volume group. If the volume group is set to the critical VG, any I/O request failure starts the Logical Volume Manager (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 volume group losses access to 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 volume groups that are varied on in concurrent mode.
-R Resumes normal I/O operations for a volume group.
-s Sync Sets the synchronization characteristics for the volume group 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 will only be attempted after the LVM device driver logs LVM_SA_STALEPP in the errpt. A partition that becomes stale through any other path (for example, mklvcopy) will not be automatically resynced.
y
Attempts to automatically synchronize stale partitions.
n
Prohibits automatic synchronization of stale partitions. This is the default for a volume group.
Note: This flag is not supported for the concurrent capable volume groups.
-S Drains I/O's for this volume group and suspends future I/O's.
-t [factor] Changes the limit of the number of physical partitions per physical volume, specified by factor. factor should be between 1 and 16 for 32 disk volume groups and 1 and 64 for 128 disk volume groups.

If factor is not supplied, it is set to the lowest value such that the number of physical partitions of the largest disk in volume group is less than factor x 1016.

If factor is specified, the maximum number of physical partitions per physical volume for this volume group changes to factor x 1016.

Note:
  1. This option is ignored for Scalable-type volume groups.
  2. factor cannot be changed if there are any stale physical partitions in the volume group.
  3. This flag cannot be used if the volume group is varied on in concurrent mode.
  4. The maximum number of physical volumes that can be included in this volume group will be reduced to (MAXPVS/factor).
  5. Changing an existing volume group to Scalable VG format will change the device subtype (reported by the IOCINFO ioctl() call) for all associated LVs to DS_LVZ, regardless of the previous subtype. This alteration does not change any behavior of the LV's beyond the reported subtype.
-u Unlocks the volume group. This option is provided if the volume group 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 volume group is not being 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 should be larger than the current value or no action is taken. This option is only valid with Scalable-type volume groups.
-x Changes the mode which the Concurrent Capable volume group is varied on. The volume group must be varied on in non-concurrent mode for this command to take effect.
Note: There is no auto on support for Enhanced Concurrent Capable volume groups. On AIX 5.2 and later only Enhanced Concurrent Capable volume groups will be created.
y
autovaryon the volume group in concurrent mode.
n
autovaryon the volume group in non-concurrent mode.
Note: If the volume group is not created Concurrent Capable, this command has no effect on the volume group.

In order for this auto-varyon into concurrency of the volume group 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 volume group vg03 to be automatically activated during system startup, type:
    chvg  -a y vg03
  2. To change the volume group vg03 to a supported state if it is in violation of 1016 physical partitions per physical volume limit, type:
    chvg  -t vg03
  3. To change the maximum number of physical partitions per physical volume to 2032 and maximum number of physical volumes in volume group vg03 to 16, type:
    chvg  -t 2 vg03

Files

Item Description
/usr/sbin Directory where the chvg command resides.