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.
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:
|
-field FieldNames | Specifies the list of fields to display. The
following fields are supported if no physical volume is specified:
|
The following fields are supported if a physical
volume is specified:
|
|
|
|
|
|
|
|
|
|
|
|
-field FieldNames (continued) | The following fields are supported if the pv flag
is specified:
|
The following fields are supported if the map flag
is specified:
|
|
The following fields are supported if the free or avail flag
is specified:
|
|
The following fields are supported if the size flag
and a physical volume are specified:
|
|
-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:
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:
|
|
|
-map | Lists the following fields for each logical
volume on the physical volume: PVname:PPnum [LVname: LPnum [:Copynum]
[PPstate]]. Where:
|
|
|
-pv | Lists the following fields for each physical
partition on the physical volume:
|
|
|
-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. |
Exit Status
Examples
- To display the status and characteristics of physical volume hdisk3,
type the following command:
lspv hdisk3
- 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.
- 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
- 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
- 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
- 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
- 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
- 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. - 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.