[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 3

mkvg Command

Purpose

Creates a volume group.

Syntax

mkvg [ -d MaximumPhysicalVolumes ] [ -B ] [ -C ] [ -G ] [ -f ] [ -i ] [ -c ] [ -x ] [ -L LTGSize ] [ -m MaxPvSize ] [ -n ] [ -s Size ] [ -t factor ] [ -V MajorNumber ] [ -y VolumeGroup ] PhysicalVolume ...

Description

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 to 512 logical volumes and 128 physical volumes by specifying the -B flag.

The mkvg command will attempt to determine a proper partition size if none is specified on the command line.

MAXPVS 32 (128 if -B flag is used)

Attention: If a big volume is created with the -B option, it cannot be imported into AIX 4.3.1 or lower versions.
Notes:
  1. The physical volume is checked to verify that it is not already in another volume group. If the system believes the physical volume belongs to a volume group that is varied on, it exits. But if the system detects a description area from a volume group that is not varied on, it prompts the user for confirmation in continuing with the command. The previous contents of the physical volume are lost, so the user must be cautious when using the override function.
  2. To use this command, you must either have root user authority or be a member of the system group.
  3. For disks greater that 4GB, make sure that the Physical Partition Size (-s) is set to a large enough value so that 1016 physical partitions per PV limit is not violated. The default value, 4MB, along with the default maximum number of physical partitions (1016), a disk up to 4GB can only be accommodated. Or use large enough factor value (-t) such that (factor x 1016) is greater than the number of partitions that would need to be created with given partition size and disk size. For example, a partition size of at least 16MB would be needed to create a volume group with a 10GB disk. Or with at factor size of 2, a smaller partition size of 8MB can be used. However, this limits the total number of disks that can be added to the volume group. If a factor value is used, a maximum of MAXPVS/factor disks can be included in the volume group.
  4. After AIX 4.1, whenever you create a volume group, the operating system automatically does a varyon. However if you create a volume group with the -C flag, the system will not autovaryon the volume group at the end of the Concurrent Capable volume group creation. Instead, the mkvg command notifies you to manually varyonvg the volume group in either non-concurrent or concurrent mode.
  5. This command will fail to add a disk to the volume group if the disk indicates that it is managed by a third party volume manager. To override and clear the disk of the third party volume manger use chpv -C HDiskName.
  6. On AIX 5.2 and later only Enhanced Concurrent Capable volume groups will be created when the -c or -C flags are specified.

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.

Flags

-B Creates a big vg format volume group. This can accommodate up to 128 physical volumes and 512 logical volumes.
Note
The VGDA space for a big vg format group that has been substantially increased causes every VGDA update operation (such as creating an LV, changing an LV or adding a PV) to take longer to execute than on a regular format group.
-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 containing Serial DASD or SSA disks.

Notes:
  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.
-d MaximumPhysicalVolumes This flag is ignored
-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 Similar to -B flag except that disk space that can accommodate up to 1024 physical volumes will be reserved at the beginning of the disk. Use this flag if this volume group may ever need be expanded to include more than 128 physical volumes.
-i Reads the PhysicalVolume parameter from standard input.
-L LTGSize Sets the logical track group size, in number of kilobytes, of the volume group. The value of the LTGSize parameter 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 size is 128 kilobytes.
-m MaxPvSize This flag is ignored.
-n Specifies that the volume group is not automatically available during a system restart. The default value activates the volume group automatically.
-s Size Sets the number of megabytes in each physical partition, where the Size variable is expressed in units of megabytes from 1 through 1024. The Size variable must be equal to a power of 2 (example 1, 2, 4, 8). The default value will be the lowest value to remain within the limit of 1016 physical partitions.
-t factor Changes the limit of the number of physical partitions per physical volume, specified by factor. Thefactor should be between 1 and 16 for 32 disk volume groups and 1 and 64 for 128 disk 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.
-V MajorNumber Specifies the major number of the volume group that is created.
-x This flag is ignored. On AIX 5.2 and later only Enhanced Concurrent Capable volume groups will be created.
-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.

Examples

To create a volume group that contains three physical volumes with partition size set to 1 megabyte, type:


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)

Files

/etc 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.

Related Information

The chvg command, lsvg command, varyonvg command.

The Logical Volume Storage Overview in AIX 5L Version 5.2 System Management Concepts: Operating System and Devices.

For information on installing the Web-based System Manager, see Chapter 2: Installation and System Requirements in AIX 5L Version 5.2 Web-based System Manager Administration Guide.

The System Management Interface Tool (SMIT) in AIX 5L Version 5.2 System Management Concepts: Operating System and Devices.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]