lspv command

Purpose

Displays information about a physical volume within a volume group or a cluster.

Syntax

lspv [ -avail | -free [-include UsageType] | -size ][ -field FieldName... ] [ -fmt Delimiter ]

lspv [ -map | -lv | -pv | -size] PhysicalVolume

lspv [ -map | -lv | -pv] PhysicalVolume [-field FieldName ] [ -fmt Delimiter ]

To list the physical volumes in the shared storage pool:

lspv -clustername ClusterName -sp StoragePool [-state]

To list all the physical volumes that are capable of being in a shared storage pool:

lspv -clustername ClusterName -capable

Description

The lspv command displays information about the physical volume if the specific physical volume name is given. If the lspv command is run without any arguments, the default is to print every known physical volume in the system along with its physical disk name, physical volume identifiers (PVIDs), to which volume group, if any, the physical volume belongs, and the state if the volume group is active.

When the PhysicalVolume parameter is used, the following characteristics of the specified physical volume are displayed:
Parameter Description
Physical volume Name of the physical volume
Volume group 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 State of the physical volume. If the volume group that contains the physical volume is activated with the activatevg command, the state is active, missing, or removed. If the physical volume is deactivated with the deactivatevg command, the state is varied off.
Allocatable Allocation permission for this physical volume.
Logical volumes Number of logical volumes using the physical volume.
Stale PPs Number of physical partitions on the physical volume that are not current.
VG descriptors Number of volume group descriptors on the physical volume.
PP size Size of physical partitions on the volume.
Total PPs Total number of physical partitions on the physical volume.
Free PPs Number of free physical partitions on the physical volume.
Used PPs Number of used physical partitions on the physical volume.
Free distribution Number of free partitions available in each intra-physical volume section.
Used distribution Number of used partitions in each intra-physical volume section.

Flags

Flag name Description
-avail Lists only physical volumes that are available for use as a backing device for virtual SCSI. If the physical volume is assigned to a shared memory pool (to be used as a paging space device by a shared memory partition), it is not available and is not listed.
-capable Lists only physical volumes those are shared storage pool capable.
-clustername Specifies the cluster name.
-free Lists physical volumes that can be used as a backing device. The physical volume is unavailable and it does not appear in the list in any of the following cases:
  • The physical volume is already used as a backing device.
  • The physical volume is assigned to a shared memory pool that can be used as a paging space device by a shared memory partition.
  • The physical volume is a part of a volume group that has a Logical Volume Manager (LVM) signature on the disk.
-field FieldNames Specifies the list of fields to display. The following fields are supported if no physical volume is specified:
pvname
Physical volume disk name
pvid
Physical volume identifier
vgname
Volume group the physical volume is in
pvstate
Physical volume state (active, missing, removed, varied off)
  The following fields are supported if a physical volume is specified:
pvname
Physical volume disk name
vgname
Volume group the physical volume is in
 
pvid
Physical volume identifier
vgid
Volume group identifier
pvstate
Physical volume state (active, missing, removed, varied off)
 
allocatable
Allocation permission for this physical volume.
stale
Number of stale partitions on the disk
ppsize
Physical partition size
 
numlv
Number of logical volumes
size
Number of physical partitions and total disk size
vgds
Number of volume group descriptor areas within the volume group.
 
free
Number of free partitions and free space
pvused
Number of used partitions and used space
maxreq
Maximum transfer size of physical volume
 
freedist
Number of free partitions available in each intra-physical volume section.
usedist
Number of used partitions in each intra-physical volume section
hotspare
-field FieldNames (continued)
The following fields are supported if the pv flag is specified:
range
A range of consecutive physical partitions contained on a single region of the physical volume.
ppstate
The current state of the physical partitions: free, used, stale, or 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
File system mount point for the logical volume, if applicable.
 
The following fields are supported if the map flag is specified:
physical
Physical volume name and physical partition number.
logical
Logical volume name and logical partition number. If mirrored the mirror number is also shown. If the partition is stale this is also shown.
 
The following fields are supported if the free or avail flag is specified:
pvname
Physical volume disk name.
pvid
Physical volume identifier
size
Size of the physical volume.
 
The following fields are supported if the size flag and a physical volume are specified:
pvname
Physical volume disk name.
pvid
Physical volume identifier
size
Size of the physical volume.
-fmt Delimiter Specifies a delimiter character to separate output fields.
-include Lists the physical volume that has the specified usage along with the unused physical volume, provided these physical volumes are not actively used in the VIOS system. The supported usage types are:
ALL
Disks used as any of the usage types.
AMS
Used as Active Memory Sharing disk.
CLPOOL
Used as Shared Storage Pool disk
CLREPO
Used as cluster repository disk
VG
Used as volume group disk.
Note: The physical volumes in the shared disks are displayed if they belong to the same usage type from the remote nodes. For example, if the usage type is CLPOOL, the disks that are part of the CLPOOL on the remote node are displayed, but the disks that are part of the CLPOOL on the local node are not displayed.
-lv 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.
-map 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.
-pv 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 are 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.
-size Displays the size of one or all physical volumes in megabytes.
-sp Specifies the storage pool.
-state Lists the state of the physical volume.

Examples

  1. To display the status and characteristics of physical volume hdisk3, type the following command:
    lspv hdisk3
  2. To display all physical volumes in the system, type:
    lspv

    The system displays the following output:

    NAME    PVID              VG      STATUS
    hdisk0  0000000012345678  rootvg  active
    hdisk1  10000BC876543258  vg00	    active
    hdisk2  ABCD000054C23486  None

    The previous example shows that physical volume hdisk0 contains the volume group rootvg, and it is activated. Physical volume hdisk1 contains the volume group vg00, and it is activated. Physical volume hdisk2 does not contain an active volume group.

  3. To display all physical volumes that can be virtual SCSI backing devices, type the following command:
    lspv -avail

    The system displays the following output:

    NAME     PVID              SIZE(megabytes)
    hdisk2   00c3e35c99c55ebd  7820
    hdisk3   00c3e35c99c0a332  7820
    hdisk4   00cbe8ddc00fbaad  7820
  4. To display all physical volumes that can be virtual SCSI backing devices and are not currently a backing device, type the following command:
    lspv -free

    The system displays the following output:

    NAME      PVID              SIZE(megabytes)
    hdisk2    00f61e528cf22a03  25600
    hdisk16   00f61e524d3e1a3f  140013
    hdisk17   00f61e5264a39957  140013
  5. To list all the physical volumes in the shared storage pool, type the following command:
    lspv -clustername newcluster -sp SP
    The system displays the following output:
    PV NAME   SIZE(MB)   PVUDID
    hdisk1    10240      200B75CXHW1031907210790003IBMfcp
  6. To list the physical volumes that are shared storage pool capable, type the following command:
    lspv -clustername newcluster -capable
    The system displays the following output:
    PV NAME    SIZE(MB)   PVUDID
    hdisk0     30720      200B75CXHW1025F07210790003IBMfcp
    hdisk2     10240      200B75CXHW1031107210790003IBMfcp
    hdisk3     10240      200B75CXHW1031207210790003IBMfcp
    hdisk4     10240      200B75CXHW1031307210790003IBMfcp
    hdisk7     10240      200B75CXHW1031A07210790003IBMfcp
  7. To list all the physical volumes in the shared storage pool and their status information, type the following command:
    lspv -clustername clusterA -sp SP -state
    The system displays the following output:
    PV NAME   SIZE(MB)  STATE    PVUDID
    hdisk1    10240     ONLINE   200B75CXHW1025F07210790003IBMfcp
    hdisk4    10240     ONLINE   200B75CXHW1031007210790003IBMfcp
    hdisk5    5120      ONLINE   200B75CXHW1031207210790003IBMfcp
    hdisk6    5120      ONLINE   200B75CXHW1031307210790003IBMfcp
    hdisk7    5120      ONLINE   200B75CXHW1031A07210790003IBMfcp
  8. To list the physical volumes that are used as volume group, type the following command:
    lspv -free -include VG

    The system displays the following output:

    NAME      PVID               SIZE(megabytes)
    hdisk11   00f6879f435652e9   10240
    hdisk12   00f6879f42f6ced0   10240
    Note: In a scenario, the physical volume hdisk11 or hdisk12 can be used as volume group disk in other VIOS systems, where these physical volumes are accessible. But in an another scenario, as part of an earlier process, the physical volume hdisk11 or hdisk12 were exported as virtual SCSI to AIX® client partition and AIX may have created a volume group on this disk. Though this disk is not exported and do not show up as free disk, it gets listed when you specify include VG option with lspv command.
  9. To list the physical volumes that are used as usage type CLPOOL, type the following command:
    lspv -free -include CLPOOL

    The system displays the following output:

    NAME        PVID                SIZE(megabytes)
    hdisk4      00f6879f2010874c    10240
    hdisk5      00f6879f5f1d8397    10240
    Note: The physical volume hdisk4 or hdisk5 can be used as a shared storage pool disk in other VIOS systems, where these physical volumes are accessible.



Last updated: Wed, November 18, 2020