subscribe iconSubscribe to this information
POWER7 information

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.

The Size parameter specifies the minimum size the logical volume should be. When specifying Size the following conventions must be used:
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

See Exit status for Virtual I/O Server commands.

Examples

  1. To make a logical volume in volume group vg02 with a minimum size of 1 Mb , type the following command:
    mklv vg02 1M
  2. 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
  3. To request a logical volume with a minimum size of 10MB, type the following command:
    mklv VGNAME 10m
    where VGNAME is the name of your logical volume.
  4. To make a logical volume in volume group vg04 with a minimum size of 10 Mb whose type is paging, type the following command:
    mklv -lv lv01 -type paging vg04 10M
    The system displays output as follows:
    lv01


Send feedback Rate this page

Last updated: Wed, June 03, 2015