[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Commands Reference, Volume 3

mkvg Command

Purpose

Creates a volume group.

Syntax

mkvg [ -d MaximumPhysicalVolumes ] [ -B ] [ -G ] [ -f ] [ -i ] [ -c ] [ -x ] [ -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 option. 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 which 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.

MAXPVS 32 (128 if -B flag is used)

Warning: 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 Partion 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 partions (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 16M would be needed to create a volume group with a 10G disk. Or with at factor size of 2, a smaller partition size of 8Meg 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 Version 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.

You can use the Web-based System Manager Volumes application (wsm lvm fast path) to run this command. 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.
-c Creates a Concurrent Capable volume group. Only use the -c flag with the HACMP. It has no effect on volume groups and systems not using the HACMP product. This flag only applies to AIX Version 4.2 or later.
-d MaximumPhysicalVolumes Estimates the maximum number of physical volumes contained in the volume group. The default is 32; a smaller number reduces physical volume space overhead.
-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.
-m MaxPvSize Specifies the maximum size of the physical volume. When this flag is used, the number of physical partitions is calculated based on the size of the physical volume. If this flag is not specified, then 1016 physical partitions are assumed.
-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 is 4 megabytes.
-t factor Specifies the maximum number of physical partitions per physical volume for this volume group to be set to (1016 x factor).
-V MajorNumber Specifies the major number of the volume group that is created.
-x Specifies to varyon automatically in Concurrent mode a Concurrent Capable volume group set to varyon automatically during a system restart. This flag has no meaning on systems which do not have the HACMP product installed. This flag only applies to AIX Version 4.2 or later.

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.
-y VolumeGroup Specifies the volume group name rather than having the name generated automatically. Volume group names must be unique systemwide 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, enter:

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 2Meg 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 4064Meg (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 Version 4.3 System Management Guide: Operating System and Devices.

Setting up and running Web-based System Management in AIX Version 4.3 System Management Guide: Operating System and Devices.

The System Management Interface Tool (SMIT) Overview in AIX Version 4.3 System Management Guide: Operating System and Devices.

AIX HACMP/6000 Concepts and Facilities.


[ Previous | Next | Contents | Glossary | Home | Search ]