Creates a volume group.
mkvg [ -B ] [ -t factor ] [ -S [ -v logicalvolumes ] [ -P partitions ] ] [ -C ] [ -G ] [ -f ] [ -i ] [ -I ][ -c ] [ -x ] [-X none | SSD] [ -L ltgsize ] [ -n ] [ -s size ] [ -V majornumber ] [ -y volumegroup ] [ -M y|s ] [ -p mirrorpool ] [ -O y | n ] [-N o|n]physicalvolume ...
The mkvg command creates a new volume group, using the physical volumes represented by the physicalvolume parameter. After creating the volume group, the mkvg command automatically varies on the new volume group using the varyonvg command. The exception to this fact is when the volume group is created with the -C flag. When the volume group is successfully created, the volume group will not be varied on automatically. Instead, the user must manually varyon the volume group.
The mkvg command by default creates a volume group that can accommodate 255 logical volumes and 32 physical volumes (disks). These limits can be extended by specifying either the -B or -S flag.
The mkvg command will attempt to determine a proper partition size (-s) and factor (-t) if none is specified on the command line.
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) might take considerably longer to run.
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 mkvg fast path to run this command.
See the section "Administering a PowerHA® cluster" in the PowerHA SystemMirror Administration Guide, 7.1 or later, for a discussion of the behavior of this command in a PowerHA cluster.
Item | Description |
---|---|
-B | Creates a Big-type volume group. This can accommodate
up to 128 physical volumes and 512 logical volumes. Note: 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.
|
-c | Same as -C flag. On AIX 5.2 and later only Enhanced Concurrent Capable volume groups will be created. |
-C | Creates an Enhanced Concurrent Capable volume group. Only use
the -C flag with the HACMP™ ES.
It is not usable on volume groups and systems not using the HACMP ES product. Use this flag to create an Enhanced Concurrent Capable volume group. Note:
|
-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 | Same as -B flag. |
-i | Reads the PhysicalVolume parameter from standard input. |
-I | Creates a volume group that 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. If the 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 (a strip size multiplied by the number of disks in an array equals the stripe size), then attempting to import the volume group back to AIX 5.1 or AIX 5.2 is not supported. |
-L ltgsize | For volume groups created on AIX 5.3 without the -I flag,
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 on AIX 5.3 with the -I flag or for volume groups created prior to AIX 5.3, the logical track group size is set to the ltgsize, which must be 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 ltgsize is 128 kilobytes. |
-M y|s | Enables mirror pool strictness for the volume group.
|
-N o|n |
|
-n | Specifies that the volume group is not automatically available during a system restart. The default value activates the volume group automatically. |
-O y / n | Enables the infinite retry option of the logical
volume.
Note: The infinite retry option is not supported in
the Geographic Logical Volume Manager (GLVM) environment.
|
-p mirrorpool | Assigns each of the physical volumes being added to the specified mirror pool. After mirror pools are enabled in a volume group, the volume group can no longer be imported into a version of AIX that does not support mirror pools. |
-P partitions | Total number of partitions in the volume group, where the Partitions variable is represented in units of 1024 partitions. Valid values are 32, 64, 128, 256, 512 768, 1024 and 2048. The default is 32 k (32768 partitions). The chvg command can be used to increase the number of partitions up to the maximum of 2048 k (2097152 partitions). This option is only valid with the -S option. |
-S | Creates a Scalable-type volume group. By default,
this volume group can accommodate up to 1024 physical volumes, 256
logical volumes and 32768 physical partitions. To increase the number
of logical volumes, use the -v option. To increase the number
of physical partitions, use the -P option. Note: Increasing maxlvs and maxpps beyond
the default values for a scalable volume group can significantly increase
the size of the VGDA proportionately. The maxlvs and maxpps values
should only be increased as needed because they cannot be decreased.
Meanwhile, as the VGDA space increases all VGDA update operations
(creating a logical volume, changing a logical volume, adding a physical
volume, and so on) can take longer and longer to run.
|
-s Size | Sets the number of megabytes in each physical partition, where the Size variable is expressed in units of megabytes from 1 (1 MB) through 131072 (128 GB). The Size variable must be equal to a power of 2 (example 1, 2, 4, 8). The default value for 32 and 128 PV volume groups will be the lowest value to remain within the limitation of 1016 physical partitions per PV. The default value for scalable volume groups will be the lowest value to accommodate 2040 physical partitions per PV. |
-t factor | Changes the limit of the number of physical partitions per physical volume, specified by factor. The factor should be between 1 and 16 for 32 PV volume groups and 1 and 64 for 128 PV volume groups. The maximum number of physical partitions per physical volume for this volume group changes to factor x 1016. The default will be the lowest value to remain within the physical partition limit of factor x 1016. The maximum number of PVs that can be included in the volume group is MaxPVs/factor. The -t option is ignored with the -S option. |
-V majornumber | Specifies the major number of the volume group that is created. |
-v | Number of logical volumes that can be created. Valid values are 256, 512, 1024, 2048 and 4096. The default is 256. The chvg command can be used to increase the number of logical volumes up to the maximum of 4096. This option is only valid with the -S option. The last logical volume is reserved for metadata. |
-x | This flag is ignored. On AIX 5.2 and later only Enhanced Concurrent Capable volume groups will be created. |
-Xnone|SSD | Enables PV type restriction for the volume group.
This option allows a volume group to be created with a specific restriction
based on the PV type. "none" is the default value. "SSD" requires
that all PVs in the volume group be SSD media type PVs. When the PV
restriction is turned on, the mkvg command will verify that
all PVs meet this condition. Once a PV restriction is turned on, the
volume group can no longer be imported on a version of AIX that does not support PV type restrictions.
|
-y volumegroup | Specifies the volume group name rather than having the name
generated automatically. Volume group names must be unique system
wide and can range from 1 to 15 characters. The name cannot begin
with a prefix already defined in the PdDv class in the Device
Configuration database for other devices. The volume group name created
is sent to standard output. The volume group name can only contain the following characters: "A" through "Z," "a" through "z," "0" through "9," or "_" (the underscore), "-" (the minus sign), or "." (the period). All other characters are considered invalid. |
mkvg -s 1 hdisk3 hdisk5 hdisk6
The volume group is created with an automatically generated name, which is displayed and available at system restart time.mkvg -s 2 -t 2 -y newvg hdisk1
The volume group newvg is created with a physical partition size of 2MB and maximum number of physical partitions per physical volume of 2032. The above configuration means that the size of hdisk1 could not be larger than 4064MB (2032*2)
mkvg -S -v 2048 hdisk6
Item | Description |
---|---|
/usr/sbin | Directory where the mkvg command resides. |
/tmp | Directory where the temporary files are stored while the command is running. |
/dev | Directory where the character device entry for the volume group is created. |