subscribe iconSubscribe to this information

lspv command

Purpose

Displays information about a physical volume within a volume group.

Syntax

lspv [ -avail | -free | -size ][ -field Fieldname... ] [ -fmt Delimiter ]

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

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

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:
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

-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.
-free Lists only physical volumes that are available for use as a backing device. If the physical volume is already used as a backing device or 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.
-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.
-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 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.
-size Displays the size of one or all physical volumes in megabytes.

Exit Status

See Exit status for Virtual I/O Server commands.

Examples

  1. To display the status and characteristics of physical volume hdisk3, type:
    lspv hdisk3
  2. To display all physical volumes in the system, type:
    lspv
    You should see output similar to the following:
    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:
    lspv -avail
    Output similar to the following is displayed:
    lspv -avail
    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:
    lspv -free
    Output similar to the following is displayed:
    hdisk3   10000BC876543258   None  None 
    hdisk4   ABCD000054C23486   None  None

Send feedback | Rate this page

Last updated: Fri, Oct 30, 2009