lslv command

Purpose

Displays information about a logical volume.

Syntax

lslv [ -map | -pv ] LogicalVolume [ -field FieldName ] [ -fmt Delimiter ]

lslv -free [ -field Fieldname ] [ -fmt Delimiter ]

Description

The lslv command displays the characteristics and status of the LogicalVolume or lists the logical volume allocation map for the physical partitions on the PhysicalVolume in which the logical volume is located. The logical volume can be a name or identifier.

If no flags are specified, the following status is displayed:

Flag name Description
Logical volume Name of the logical volume. Logical volume names must be unique systemwide and can range from 1 to 15 characters.
Volume group Name of the volume group. Volume group names must be unique systemwide and can range from 1 to 15 characters.
Logical volume identifier Identifier of the logical volume.
Permission Access permission; read-only or read-write.
Volume group state State of the volume group. If the volume group is activated with the activatevg command, the state is either active/complete (indicating all physical volumes are active) or active/partial (indicating all physical volumes are not active). If the volume group is not activated with the activatevg command, the state is inactive.
Logical volume state State of the logical volume. The Opened/stale status indicates the logical volume is open but contains physical partitions that are not current. Opened/syncd indicates the logical volume is open and synchronized. Closed indicates the logical volume has not been opened.
Type Logical volume type.
Write verify Write verify state of On or Off.
Mirror write consistency Mirror write consistency state of Yes or No.
Max LPs Maximum number of logical partitions the logical volume can hold.
PP size Size of each physical partition.
Copies Number of physical partitions created for each logical partition when allocating.
Schedule policy Sequential or parallel scheduling policy.
LPs Number of logical partitions currently in the logical volume.
PPs Number of physical partitions currently in the logical volume.
Stale partitions Number of physical partitions in the logical volume that are not current.
Bad blocks Bad block relocation policy.
Inter-policy Inter-physical allocation policy.
Strictness Current state of allocation. Possible values are strict, nonstrict, or superstrict. A strict allocation states that no copies for a logical partition are allocated on the same physical volume. If the allocation does not follow the strict criteria, is called nonstrict. A nonstrict allocation states that at least one occurrence of two physical partitions belong to the same logical partition. A superstrict allocation states that no partition from one mirror copy may reside the same disk as another mirror copy.
Intra-policy Intra-physical allocation policy.
Upper bound If the logical volume is super strict, upper bound is the maximum number of disks in a mirror copy.
Relocatable Indicates whether the partitions can be relocated if a reorganization of partition allocation takes place.
Mount point File system mount point for the logical volume, if applicable.
Label Specifies the label field for the logical volume.
PV distribution The distribution of the logical volume within the volume group. The physical volumes used, the number of logical partitions on each physical volume, and the number of physical partitions on each physical volume are shown.
striping width The number of physical volumes being striped across.
strip size The number of bytes per stripe.

The -free flag displays logical volumes that are available to be used as backing devices for virtual storage.

Full scripting support is available by using the -field FieldNames and -fmt Delimiter flags. The -field flag will allow the user to select which output fields to display and in what order, while the -fmt flag provides scriptable output. The output fields will be displayed in the order they appear on the command line.

Flags

Flag name Description
-free Lists only logical volumes that are available for use as a backing device for virtual SCSI.
-field Specifies the list of fields to display. The following fields are supported if no flags are specified:
lvname
Name of the logical volume. Logical volume names must be unique systemwide and can range from 1 to 15 characters.
vgname
Name of the volume group. Volume group names must be unique systemwide and can range from 1 to 15 characters.
lvid
Identifier of the logical volume.
access
Access permission: read-only or read-write.
vgstate
State of the volume group. If the volume group is activated with the activatevg command, the state is either active/complete (indicating all physical volumes are active) or active/partial (indicating all physical volumes are not active). If the volume group is not activated with the deactivatevg command, the state is inactive.
 
lvstate
State of the logical volume. The opened/stale status indicates the logical volume is open but contains physical partitions that are not current. Opened/syncd indicates the logical volume is open and synchronized. Closed indicates the logical volume has not been opened.
type
Logical volume type.
wverify
Write verify state of on or off.
 
mwc
Mirror write consistency state of on or off.
maxlps
Maximum number of logical partitions the logical volume can hold.
ppsize
Size of each physical partition.
 
copies
Number of physical partitions created for each logical partition when allocating.
spolicy
Sequential or parallel scheduling policy.
lps
Number of logical partitions currently in the logical volume.
 
pps
Number of physical partitions currently in the logical volume.
stale
Number of physical partitions in the logical volume that are not current.
bbpolicy
Bad block relocation policy.
 
inter
Inter-physical allocation policy.
intra
Intra-physical allocation policy.
ubound
If the logical volume is super strict, upper bound is the maximum number of disks in a mirror copy.
 
relocatable
Indicates whether the partitions can be relocated if a reorganization of partition allocation takes place.
mount
File system mount point for the logical volume, if applicable.
label
Specifies the label field for the logical volume.
 
separatepv
The strictness value. Current state of allocation, strict, nonstrict, or superstrict. A strict allocation states that no copies for a logical partition are allocated on the same physical volume. If the allocation does not follow the strict criteria, it is called nonstrict. A nonstrict allocation states that at least one occurrence of two physical partitions belong to the same logical partition. A superstrict allocation states that no partition from one mirror copy may reside the same disk as another mirror copy.
serialio
Serialization of overlapping IOs state of yes or no. If serialization is turned on (yes), then overlapping IOs are not allowed on a block range, and only a single IO in a block range is processed at any one time. Most applications, such as file systems and databases, perform serialization; therefore, serialization should be turned off (no). The default setting for new logical volumes is no.
 
The following fields are supported if the -pv flag is specified:
pvname
Physical volume disk name
copies
The following three fields:
  • The number of logical partitions containing at least one physical partition (no copies) on the physical volume
  • The number of logical partitions containing at least two physical partitions (one copy) on the physical volume
  • The number of logical partitions containing three physical partitions (two copies) on the physical volume
inband
The percentage of physical partitions on the physical volume that belong to the logical volume and were allocated within the physical volume region specified by Intra-physical allocation policy.
dist
The number of physical partitions allocated within each section of the physical volume: outer edge, outer middle, center, inner middle, and inner edge of the physical volume.
 
The following fields are supported if the -map flag is specified:
lpnum
Logical partition number.
pvname1
Physical volume name where the logical partition's first physical partition is located.
ppnum1
First physical partition number allocated to the logical partition.
pvname2
Physical volume name where the logical partition's second physical partition (first copy) is located.
ppnum2
Second physical partition number allocated to the logical partition.
 
The following fields are supported if the -free flag is specified:
lvname
Logical partition number.
size
Physical volume name where the logical partition's first physical partition is located.
vgname
Name of the volume group. Volume group names must be unique systemwide and can range from 1 to 15 characters.
-fmt Specifies a delimiter character to separate output fields.
-map Lists the following fields for each logical partition:
LPs
Logical partition number.
PV1
Physical volume name where the logical partition's first physical partition is located.
PP1
First physical partition number allocated to the logical partition.
PV2
Physical volume name where the logical partition's second physical partition (first copy) is located.
PP2
Second physical partition number allocated to the logical partition.
-pv Lists the following fields for each physical volume in the logical volume:
PV
Physical volume name.
Copies
The following three fields:
  • The number of logical partitions containing at least one physical partition (no copies) on the physical volume
  • The number of logical partitions containing at least two physical partitions (one copy) on the physical volume
  • The number of logical partitions containing three physical partitions (two copies) on the physical volume
In band
The percentage of physical partitions on the physical volume that belong to the logical volume and were allocated within the physical volume region specified by Intra-physical allocation policy.
Distribution
The number of physical partitions allocated within each section of the physical volume: outer edge, outer middle, center, inner middle, and inner edge of the physical volume.

Examples

  1. To display information about logical volume lv03, type:
    lslv lv03
    Information about logical volume lv03, its logical and physical partitions, and the volume group to which it belongs is displayed.
  2. To display information about logical volume lv03 by physical volume, type:
    lslv -pv lv03
    The characteristics and status of lv03 are displayed, with the output arranged by physical volume.
  3. To display a list of logical volumes that can be used as backing devices, type:
    lslv -free

    The system displays the following message:

    LV NAME         SIZE(megabytes) VOLUME GROUP
    lv00            64              rootvg
    lv01            64              rootvg 
  4. To display only the type and volume group of logical volume hd6 and separate the data by a : (colon) , type:
    lslv hd6 -field type vgname -fmt :

    The system displays the following message:

    paging:rootvg



Last updated: Wed, November 18, 2020