mkvg command
Purpose
Creates a volume group.
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 activates the new volume group using the activatevg command.
Note:
- 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 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 the user must be cautious when using the override function.
- 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.
- 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).
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 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. |
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