mkvg [ -d MaximumPhysicalVolumes ] [ -B ] [ -G ] [ -f ] [ -i ] [ -c ] [ -x ] [ -m MaxPvSize ] [ -n ] [ -s Size ] [ -t factor ] [ -V MajorNumber ] [ -y VolumeGroup ] 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 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:
- 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.
- To use this command, you must either have root user authority or be a member of the system group.
- 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.
- 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.
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)
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.