lspv Command

Purpose

Displays information about a physical volume within a volume group.

Syntax

lspv

OR

lspv [ -L ] [ -P ] [ -l | -p | -M ] [ -n descriptorphysicalvolume] [ -v volumegroupid] physicalvolume

Description

The lspv command displays the information about the physical volume if the specific physical volume name is specified. If you do not add flags to the lspv command, by default all the available physical volumes are printed along with the following information:
  • Physical disk name.
  • Physical volume identifiers (PVIDs).
  • The volume group, if any, that the physical volume belongs to or the label, if any, locked with the lkdev command.
  • The state of the volume group.
    Active
    When the volume group is varied on.
    Concurrent
    When the volume group is varied on in the concurrent mode.
    Locked
    When the physical volume is locked with the lkdev command.
Note: If the lspv command cannot find the information for a field in the Device Configuration Database, it will insert a question mark (?) in the value field. As an example, if there is no information for the PP RANGE field, the following value might be displayed:
PP RANGE: ?

The lspv command attempts to obtain as much information as possible from the description area when it is given a logical volume identifier.

When the physicalvolume parameter is used, the following characteristics of the specified physical volume are displayed:

Item Description
Physical volume The name of the physical volume.
Volume group The name of volume group. Volume group names must be unique systemwide names and can be from 1 to 15 characters long.
PV Identifier The physical volume identifier for this physical disk.
VG Identifier The volume group identifier of which this physical disk is a member.
PVstate The state of the physical volume. If the volume group that contains the physical volume is varied on with the varyonvg command, the state is active, missing, or removed. If the physical volume is varied off with the varyoffvg command, the state is varied off.
Allocatable The allocation permission for this physical volume.
Logical volumes The number of logical volumes using the physical volume.
Stale PPs The number of physical partitions on the physical volume that are not current.
VG descriptors The number of volume group descriptors on the physical volume.
PP size The size of physical partitions on the volume.
Total PPs The total number of physical partitions on the physical volume.
Free PPs The number of free physical partitions on the physical volume.
Used PPs The number of used physical partitions on the physical volume.
Max Request The max transfer size of the physical volume.
Free distribution The number of free partitions available in each intra-physical volume section.
Used distribution The number of used partitions in each intra-physical volume section.
Mirror Pool The mirror pool that the physical volume has been assigned to.

You can use the Volumes application in Web-based System Manager (wsm) to change volume characteristics. You could also use the System Management Interface Tool (SMIT) smit lspv fast path to run this command.

Flags

Item Description
-L Specifies no waiting to obtain a lock on the Volume group.
Note: If the volume group is being changed, using the -L flag gives unreliable date.
-l Lists the following fields for each logical volume on the physical volume:
LVname
Name of the logical volume to which the physical partitions are allocated.
LPs
The number of logical partitions within the logical volume that are contained on this physical volume.
PPs
The number of physical partitions within the logical volume that are contained on this physical volume.
Distribution
The number of physical partitions, belonging to the logical volume, that are allocated within each of the following sections of the physical volume: outer edge, outer middle, center, inner middle and inner edge of the physical volume.
Mount Point
File system mount point for the logical volume, if applicable.
-M Lists the following fields for each logical volume on the physical volume:
PVname:PPnum [LVname: LPnum [:Copynum] [PPstate]]

Where:

PVname
Name of the physical volume as specified by the system.
PPnum
Physical partition number.
LVname
Name of the logical volume to which the physical partitions are allocated. Logical volume names must be system-wide unique names, and can range from 1 to 64 characters.
LPnum
Logical partition number. Logical partition numbers can range from 1 to 64,000.
Copynum
Mirror number.
PPstate
Only the physical partitions on the physical volume that are not current are shown as stale.
-n descriptorphysicalvolume Accesses information from the variable descriptor area specified by the descriptorphysicalvolume variable. The information may not be current, since the information accessed with the -n flag has not been validated for the logical volumes. If you do not use the -n flag, the descriptor area from the physical volume that holds the validated information is accessed, and therefore the information displayed is current. The volume group need not be active when you use this flag.
-p Lists the following fields for each physical partition on the physical volume:
Range
A range of consecutive physical partitions contained on a single region of the physical volume.
State
The current state of the physical partitions: free, used, stale, or vgda.
Note: If a volume group is converted to a big vg format, it may be necessary to use some data partitions for volume group descriptor area. These partitions will be marked vgda.
Region
The intra-physical volume region in which the partitions are located.
LVname
The name of the logical volume to which the physical partitions are allocated.
Type
The type of the logical volume to which the partitions are allocated.
Mount point
File system mount point for the logical volume, if applicable.
-P Lists the mirror pool that each physical volume belongs to.
-u Lists all the physical volumes in the system along with the following information:
  • Physical disk name.
  • Physical volume identifiers (PVIDs).
  • The volume group (if any), or label (if any), that the physical volume belongs to and that is locked with the lkdev command.
  • The state of the volume group.
    Active
    When the volume group is varied on.
    Concurrent
    When the volume group is varied on in the concurrent mode.
    Locked
    When the physical volume is locked with the lkdev command.
  • Unique device identifier (UDID).
  • Universally Unique Identifier (UUID).
-v volumegroupid Accesses information based on the volumegroupid variable. This flag is needed only when the lspv command does not function due to incorrect information in the Device Configuration Database. The volumegroupid variable is the hexadecimal representation of the volume group identifier, which is generated by the mkvg command.

Examples

  1. To display the status and characteristics of physical volume hdisk3, enter the following command:
    lspv hdisk3 
  2. To display the status and characteristics of physical volume hdisk5 by physical partition number, enter the following command:

    lspv  -p hdisk5

Files

Item Description
/usr/sbin Contains the lspv command.