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: ?
Note: The lspv command, without any flags,
can display the General Parallel File System (GPFS) volume groups
that are located on the disks. However, the lspv command
must initially be run with a root authority so that the command has
permissions to query the GPFS nodes for information. After the GPFS
volume group names are cached locally, non-root users running the lspv command
can see the GPFS volume group names.
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 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:
|
-M | Lists the following fields for each logical volume on the physical
volume:
Where:
|
-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:
|
-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:
|
-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
- To display the status and characteristics of physical volume hdisk3,
enter the following command:
lspv hdisk3
- 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. |