mkvg command
Purpose
Creates a volume group.
Syntax
Description
The mkvg command creates a new volume group by using the physical volumes that are represented by the PhysicalVolume parameter. After creating the volume group, the mkvg command automatically activates the new volume group by using the activatevg command.
Notes:
- The physical volume is checked to verify that it is not already in another volume group. If the system believes that the physical volume belongs to a volume group that is active, it exits. But if the system detects a description area from a volume group that is not active, it prompts the user for confirmation in continuing with the command. The previous contents of the physical volume are lost, so you must be cautious when you use the override function.
- This command fails to add a disk to the volume group if the disk indicates that it is managed by a third-party volume manager.
- The physical volume that you specify cannot be assigned to a shared memory pool (to be used as a paging space device by a shared memory partition).
- Except for Serial-attached SCSI (SAS) disks, the physical volumes are changed by the mkvg command to set the algorithm attribute value to fail_over and the reserve_policy attribute value to single_path to ensure that physical volumes are not used by another logical partition.
Flags
| Flag name | Description |
|---|---|
| -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. |
| -vg VolumeGroup | Specifies the volume group name rather than having the name generated
automatically. Volume group names must be unique system wide and can range in the range 1 - 15
characters. The name cannot begin with a prefix that is 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 contain only 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. |
Exit Status
Examples
- To create a volume group that contains physical disks hdisk3, hdisk5,
and hdisk6, type:
mkvg hdisk3 hdisk5 hdisk6The volume group is created with an automatically generated name, which is displayed.
- To create the volume group newvg with one physical partition,
type:
mkvg -vg newvg hdisk1