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

Description

The chvg command changes the characteristics of a volume group.

You can use the Volumes application in Web-based System Manager to change volume characteristics. You could also use the System Management Interface Tool (SMIT) smit chvg fast path to run this command.

Note: On AIX® 5.2 and later only Enhanced Concurrent Capable volume groups will be created when the -c or -C flags are specified.

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.
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 HACMP™ 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 HACMP 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.
-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.
Note:
  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.
-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 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. If the volume group is created in AIX 4.1.2 in violation of 1016 physical partitions per physical volume limit, this flag can be used to convert the volume group to a supported state. This will ensure proper stale/fresh marking of partitions.
  3. factor cannot be changed if there are any stale physical partitions in the volume group.
  4. Once volume group is converted, it cannot be imported into AIX43 or lower versions.
  5. This flag cannot be used if the volume group is varied on in concurrent mode.
  6. The maximum number of physical volumes that can be included in this volume group will be reduced to (MAXPVS/factor).
-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.