mklv command
Purpose
Creates a logical volume.
Syntax
mklv [-mirror] [-lv LogicalVolume | -prefix Prefix] [-type Type] VolumeGroup Size [PhysicalVolume ... ]
Description
The mklv command creates a new logical volume within the VolumeGroup. If you specify one or more physical volumes with the PhysicalVolume parameter, only those physical volumes are available for allocating physical partitions; otherwise, all the physical volumes within the volume group are available.
The allocation policy is to use a minimum number of physical volumes.
The type parameter specifies the logical volume type. The standard types are jfs (journaled file systems), jfslog (journaled file system logs), jfs2 (enhanced journaled file system), jfs2log (enhanced journaled file system logs), and paging (paging spaces). You can define other logical volume types with this flag. You cannot create a striped logical volume of type boot. The default is jfs.
| Size | Minimum logical volume size |
|---|---|
| ###M/m | ### MB |
| ###G/g | ### GB |
Flags
| Flag name | Description |
|---|---|
| -lv | Specifies the logical volume name to use instead of using a system-generated name. Logical volume names must be unique system wide name, and can range from 1 to 15 characters. |
| -mirror | Activates mirroring for this logical volume. |
| -prefix | Specifies the Prefix to use instead of the prefix in a system-generated name for the new logical volume. The prefix must be less than or equal to 13 characters. The name cannot begin with a prefix already defined in the PdDv class in the Device Configuration Database for other devices, nor be a name already used by another device. |
| -type | Sets the logical volume type. |
Exit Status
Examples
- To make a logical volume in volume group vg02 with a minimum
size of 1 Mb , type the following command:
mklv vg02 1M - To make a logical volume in volume group vg03 with 1GB
chosen from physical volumes hdisk5, hdisk6, and hdisk9,
type the following command:
mklv vg03 1G hdisk5 hdisk6 hdisk9 - To request a logical volume with a minimum size of 10MB, type
the following command:
where VGNAME is the name of your logical volume.mklv VGNAME 10m - To make a logical volume in volume group vg04 with a minimum
size of 10 Mb whose type is paging, type the following command:
The system displays output as follows:mklv -lv lv01 -type paging vg04 10Mlv01