pv command
Purpose
Manages physical volumes in a shared storage pool.
Syntax
To add physical volumes to only one failure group in a shared storage pool:
pv -add [-clustername ClusterName] [-sp StoragePool] [-tier TierName] [-fg FGName1:] PhysVol ...
To add physical volumes to one or more failure groups in a shared storage pool:
pv -add [-clustername ClusterName] [-sp StoragePool] [-tier TierName] -fg FGName1:PhysVol ... [FGName2: PhysVol ...] ...
To add physical volumes to only one failure group in a shared storage pool, by using the file name:
pv -add -file [-clustername ClusterName] [-sp StoragePool] [-tier TierName] [-fg FGName1:] FileName
To add physical volumes to one or more failure groups in a shared storage pool, by using the file name:
pv -add -file [-clustername ClusterName] [-sp StoragePool] -fg FGName1:FileName1 [FGName2: FileName2] …
To remove physical volumes from a shared storage pool:
pv -remove [-clustername ClusterName] [-sp StoragePool] -pv PhysVol ...
To remove physical volumes by using the file name:
pv -remove -file [-clustername ClusterName] [-sp StoragePool] -pv FileName
To replace physical volumes in a shared storage pool:
pv -replace [-clustername ClusterName] [-sp StoragePool] -oldpv PhysVol ... -newpv PhysVol ...
To replace physical volumes by using the file name:
pv -replace -file [-clustername ClusterName] [-sp StoragePool] -oldpv FileName1 -newpv FileName2
To list physical volumes in a shared storage pool:
pv -list [-clustername ClusterName] [-sp StoragePool] [-tier TierName] [-fg FGName] [-attr Attribute=Value] [-verbose | -field FieldName ...] [-fmt Delimiter [-header]]
To list physical volumes that are cluster capable:
pv -list -capable [-clustername ClusterName ] [-field FieldName ...] [-fmt Delimiter [-header ]]
Description
Flags
Flag name | Description |
---|---|
-add | Adds the specified physical volumes to a shared storage pool. |
-attr | Specifies the attribute and value of the physical
volume. Supports the following attributes: name, udid, size, and state. |
-capable | Lists the physical volumes, that can be added to shared storage pool. |
-clustername | Specifies the name of the cluster. |
-fg | Specifies the name of the failure groups in the storage pool. |
-field | Specifies a list of fields to be displayed. Supports
the following attributes if the -list flag
is specified:
Supports
the following attributes if the -list and -capable flags
are specified:
|
-file | Specifies that a file name is provided with the add, remove, and replace options. The file must contain physical volume names that are separated by a white space. |
-fmt | Separates the output fields by using a user-specified delimiter character. |
-header | Specifies the display field names in the formatted listing output. |
-list | Lists the physical volumes in a shared storage pool. |
-newpv | Lists one or more physical volumes that are replacing the existing physical volumes in the shared storage pool. This option specifies the file name instead of the physical volume names if the file option is used. |
-oldpv | Lists one or more physical volumes in the shared storage pool that are replaced with the new physical volumes. This option specifies the file name instead of the physical volume names if the file option is used. |
-remove | Removes one or more physical volumes from a shared storage pool. |
-replace | Replaces one or more physical volumes within
a shared storage pool. Note: If multiple physical volumes are being
replaced, all of them must belong to the same failure group.
|
-sp | Specifies the name of the shared storage pool. |
-tier | Specifies the name of the tier. |
-verbose | Displays detailed information about the physical volume. |
Examples
- To add two physical volumes to the shared storage pool that has
only one failure group, type the following command:
pv –add hdisk33 hdisk34
The system displays the following output:
Given physical volume(s) have been added successfully
Note: You cannot use the following command to add two physical volumes to the shared storage pool that has multiple failure groups:pv –add hdisk1 hdisk2
The system displays the following output, as this is an incorrect example when multiple failure groups are present:
Failed to add disk(s) to the Storage Pool. Multiple Failure Groups are present.
- To add physical volumes to multiple failure groups, type the following command:
pv –add –fg fg1: hdisk42 hdisk43 fg2: hdisk53 hdisk54
The system displays the following output:
Given physical volume(s) have been added successfully
- To add multiple physical volumes (where none of the physical volumes
are in use) to only one failure group in a shared storage pool, type
the following command:
pv –add hdisk1 hdisk2
The system displays the following output, as in this example hdisk2 is in use:
The given request has been partially succeeded. PV is currently in use. hdisk2
Note: The physical volume hdisk1 is successfully added to the shared storage pool and the physical volume hdisk2 cannot be added because it is in use. - To add physical volumes to multiple failure groups in a specific tier in a multi tier
environment, type the following
command:
pv –add -tier tier2 –fg fg1: hdisk42 hdisk43 fg2: hdisk53 hdisk54
The system displays the following output:
Given physical volume(s) have been added successfully.
- To remove a physical volume in a shared storage pool, type the
following command:
pv -remove -pv hdisk7
The system displays the following output:
Given physical volume(s) have been removed successfully.
- To replace hdisk1 with hdisk2 in a shared storage
pool, type the following command:
pv –replace –clustername mycluster –sp mysp –oldpv hdisk1 -newpv hdisk2
The system displays the following output:
Given physical volume(s) have been replaced successfully
- To replace physical volumes that are specified in the pvfile1 file
with physical volumes specified in the pvfile2, in a shared
storage pool, type the following command:
pv –replace -file –oldpv pvfile1 -newpv pvfile2
The system displays the following output:
Given physical volume(s) have been replaced successfully
The contents of file pvfile1: hdisk1 hdisk2 hdisk3 hdisk4.
The contents of file pvfile2: hdisk21 hdisk33.
Note: All these physical volumes must belong to the same failure group. Otherwise, the command fails. - To replace physical volumes hdisk1 and hdisk2 with hdisk3 and hdisk4 (that
are in use) in a shared storage pool, type the following command:
pv –replace –oldpv hdisk1 hdisk2 -newpv hdisk3 hdisk4
The system displays the following output, as this is an example for partial success only:
The given request has been partially succeeded. PV is in use hdisk4
- To list all the physical volumes in a shared storage pool that has failure groups, type the
following command:
pv -list
The system displays the following output for a cluster with two failure groups:
POOL_NAME: testsp TIER_NAME: tier1 FG_NAME: fg1 PV_NAME SIZE(MB) STATE UDID hdisk4 10240 ONLINE 3E213600A0B80006E25060000B93E50ADBC110F1818 FAStT03IBMfcp hdisk5 10240 ONLINE 3E213600A0B80006E25060000D2E64F755F420F1818 FAStT03IBMfcp POOL_NAME: testsp TIER_NAME: tier1 FG_NAME: fg2 PV_NAME SIZE(MB) STATE UDID hdisk6 10240 ONLINE 3E213600A0B80006E25060000B93E50ADBC110F1828 FAStT03IBMfcp hdisk7 10240 ONLINE 3E213600A0B80006E25060000D2E64F755F420F1828 FAStT03IBMfcp POOL_NAME: testsp TIER_NAME: tier2 FG_NAME: fg1 PV_NAME SIZE(MB) STATE UDID hdisk42 10240 ONLINE 3E213600A0B80006E25060000B93E50ADBC110F1819 FAStT03IBMfcp hdisk43 10240 ONLINE 3E213600A0B80006E25060000D2E64F755F420F1820 FAStT03IBMfcp POOL_NAME: testsp TIER_NAME: tier2 FG_NAME: fg2 PV_NAME SIZE(MB) STATE UDID hdisk53 10240 ONLINE 3E213600A0B80006E25060000B93E50ADBC110F1829 FAStT03IBMfcp hdisk54 10240 ONLINE 3E213600A0B80006E25060000D2E64F755F420F1830 FAStT03IBMfcp
- To list the detailed information about physical volumes that are in a shared storage pool, type
the following command:
pv –list –verbose
The system displays the following output:
POOL_NAME: testsp TIER_NAME: tier1 FG_NAME: fg1 PV_NAME: hdisk4 PV_SIZE(MB): 10240 PV_STATE: ONLINE PV_UDID: 3E213600A0B80006E25060000B93E50ADBC110F1818 FAStT03IBMfcp PV_DESC: MPIO IBM 2107 FC Disk POOL_NAME: testsp TIER_NAME: tier1 FG_NAME: fg1 PV_NAME: hdisk5 PV_SIZE(MB): 10240 PV_STATE: ONLINE PV_UDID: 3E213600A0B80006E25060000D2E64F755F420F1818 FAStT03IBMfcp PV_DESC: MPIO IBM 2107 FC Disk POOL_NAME: testsp TIER_NAME: tier1 FG_NAME: fg2 PV_NAME: hdisk6 PV_SIZE(MB): 10240 PV_STATE: ONLINE PV_UDID: 3E213600A0B80006E25060000B93E50ADBC110F1828 FAStT03IBMfcp PV_DESC: MPIO IBM 2107 FC Disk POOL_NAME: testsp TIER_NAME: tier1 FG_NAME: fg2 PV_NAME: hdisk7 PV_SIZE(MB): 10240 PV_STATE: ONLINE PV_UDID: 3E213600A0B80006E25060000D2E64F755F420F1828 FAStT03IBMfcp PV_DESC: MPIO IBM 2107 FC Disk POOL_NAME: testsp TIER_NAME: tier2 FG_NAME: fg1 PV_NAME: hdisk42 PV_SIZE(MB): 10240 PV_STATE: ONLINE PV_UDID: 3E213600A0B80006E25060000B93E50ADBC110F1819 FAStT03IBMfcp PV_DESC: MPIO IBM 2107 FC Disk POOL_NAME: testsp TIER_NAME: tier2 FG_NAME: fg1 PV_NAME: hdisk43 PV_SIZE(MB): 10240 PV_STATE: ONLINE PV_UDID: 3E213600A0B80006E25060000D2E64F755F420F1820 FAStT03IBMfcp PV_DESC: MPIO IBM 2107 FC Disk POOL_NAME: testsp TIER_NAME: tier2 FG_NAME: fg2 PV_NAME: hdisk53 PV_SIZE(MB): 10240 PV_STATE: ONLINE PV_UDID: 3E213600A0B80006E25060000B93E50ADBC110F1829 FAStT03IBMfcp 328 Power Systems: Virtual I/O Server and Integrated Virtualization Manager commands PV_DESC: MPIO IBM 2107 FC Disk POOL_NAME: testsp TIER_NAME: tier2 FG_NAME: fg2 PV_NAME: hdisk54 PV_SIZE(MB): 10240 PV_STATE: ONLINE PV_UDID: 3E213600A0B80006E25060000D2E64F755F420F1830 FAStT03IBMfcp PV_DESC: MPIO IBM 2107 FC Disk
- To list all the physical volumes in a given failure group in a given tier in a shared storage
pool, type the following command:
pv-list -tier tier1 -fg fg1
The system displays the following output:
POOL_NAME: testsp TIER_NAME: tier1 FG_NAME: fg1 PV_NAME SIZE(MB) STATE UDID hdisk4 10240 ONLINE 3E213600A0B80006E25060000B93E50ADBC110F1818 FAStT03IBMfcp hdisk5 10240 ONLINE 3E213600A0B80006E25060000D2E64F755F420F1818 FAStT03IBMfcp
- To list physical volumes in a formatted output with comma (,) as the delimiter, type the
following command:
pv –list –fmt ,
The system displays the following output:
testsp,tier1,fg1,hdisk3,10240,ONLINE,3E213600A0B80006E25060000B93E50ADBC110F1818 FAStT03IBMfcp testsp,tier1,fg1,hdisk5,10240,ONLINE,3E213600A0B80006E25060000D2E64F755F420F1818 FAStT03IBMfcp testsp,tier1,fg2,hdisk6,10240,ONLINE,3E213600A0B80006E25060000B93E50ADBC110F1828 FAStT03IBMfcp testsp,tier1,fg2,hdisk7,10240,ONLINE,3E213600A0B80006E25060000D2E64F755F420F1828 FAStT03IBMfcp testsp,tier2,fg1,hdisk42,10240,ONLINE,3E213600A0B80006E25060000B93E50ADBC110F1819 FAStT03IBMfcp testsp,tier2,fg1,hdisk43,10240,ONLINE,3E213600A0B80006E25060000D2E64F755F420F1820 FAStT03IBMfcp testsp,tier2,fg2,hdisk53,10240,ONLINE,3E213600A0B80006E25060000B93E50ADBC110F1829 FAStT03IBMfcp testsp,tier2,fg2,hdisk54,10240,ONLINE,3E213600A0B80006E25060000D2E64F755F420F1830 FAStT03IBMfcp
- To list physical volumes in a failure group fg2 in a shared storage pool, type the
following command:
pv –list –fg fg2
The system displays the following output:
POOL_NAME: testsp TIER_NAME: tier1 FG_NAME: fg2 PV_NAME SIZE(MB) STATE UDID hdisk6 10240 ONLINE 3E213600A0B80006E25060000B93E50ADBC110F1828 FAStT03IBMfcp hdisk7 10240 ONLINE 3E213600A0B80006E25060000D2E64F755F420F1828 FAStT03IBMfcp POOL_NAME: testsp TIER_NAME: tier2 FG_NAME: fg2 PV_NAME SIZE(MB) STATE UDID hdisk53 10240 ONLINE 3E213600A0B80006E25060000B93E50ADBC110F1829 FAStT03IBMfcp hdisk54 10240 ONLINE 3E213600A0B80006E25060000D2E64F755F420F1830 FAStT03IBMfcp
- To list the physical volume with a specific UDID in a storage pool, type the following
command:
pv –list –attr pv_udid=”3E213600A0B80006E25060000B93E50ADBC110F1828 FAStT03IBMfcp”
The system displays the following output:
POOL_NAME: testsp TIER_NAME: tier1 FG_NAME: fg2 PV_NAME SIZE(MB) STATE UDID hdisk6 10240 ONLINE 3E213600A0B80006E25060000B93E50ADBC110F1828 FAStT03IBMfcp
- To list the physical volume with a specific name in a storage pool, type the following
command:
pv –list –attr pv_name=hdisk7
The system displays the following output:
POOL_NAME: testsp TIER_NAME: tier1 FG_NAME: fg2 PV_NAME SIZE(MB) STATE UDID hdisk7 10240 ONLINE 3E213600A0B80006E25060000D2E64F755F420F1828 FAStT03IBMfcp
- To list physical volumes that are cluster capable in a shared
storage pool or a failure group, type the following command:
pv –list -capable
The system displays the following output:
PV_NAME SIZE(MB) STATE UDID hdisk11 10240 N/A 3E213600A0B80006E25060000B94050ADBC580F1818 FAStT03IBMfcp hdisk12 10240 N/A 3E213600A0B80006E24E600002FDD50ADB6640F1818 FAStT03IBMfcp hdisk14 5120 N/A 3E213600A0B80006E24E600002FFC50ADB68F0F1818 FAStT03IBMfcp hdisk15 5120 N/A 3E213600A0B80006E25060000B94250ADBCA50F1818 FAStT03IBMfcp hdisk16 5120 N/A 3E213600A0B80006E24E60000301750ADB6B00F1818 FAStT03IBMfcp