importpv command

Purpose

Imports one or more physical volumes (PVs) with data into a Virtual I/O Server (VIOS) Shared Storage Pool (SSP).

Syntax

importpv [ -optype OperationType ] [ -clustername ClusterName] [ -sp StoragePool ] [ -tier TierName ] [ -fg FGName ] PhysicalVolume:LuName ...

importpv -file [ -optype OperationType ] [ -clustername ClusterName] [ -sp StoragePool ] [ -tier TierName ] [ -fg FGName ] Filename

importpv -show [ -clustername ClusterName ]

Description

The importpv command is used to import one or more physical volumes (PVs) into a VIOS shared storage pool (SSP). Physical volumes can have any kind of data that needs to be imported to a shared storage pool.

A physical volume can be imported if it meets the following criteria:
  • It is a direct attached physical volume.
  • It is an NPIV attached physical volume.
  • It is a physical volume that backs a vSCSI virtual disk.
A storage type cannot be imported if it meets the following criteria:
  • A logical volume that backs a vSCSI virtual disk.
  • A file that backs a vSCSI virtual disk.
  • An SSP LU that backs a vSCSI virtual disk.
The chkdev command is used to verify if the physical volume can be imported, by checking the PHYS2VIRT_CAPABILITY field in the chkdev results. A YES response indicates that the physical volume can be imported.
Note: The import operation is irreversible, which means that after the import operation is initiated and the physical volume is successfully added to the SSP, you cannot revert the PV to its original state.

Flags

Flag name Description
-clustername Specifies the name of the cluster.
-fg Specifies the name of the failure group.
-file Specifies that a file name has to be provided that contains a list of physical volume and logical unit pairs, separated by a colon. Each physical volume and logical unit pair is separated by a white space.

For example, hdiskX:luX hdiskY:luY ...

-optype Specifies the type of operation that can be performed after a previously failed import operation, which is considered to be recoverable. All other command line arguments must match those used in the original command. This flag takes three parameters: retry, abort, and undo.
-show Inspects the VIOS database for the existence of any previous import operation that is currently awaiting a retry, undo, or abort request and displays all the parameters belonging to that request.
-sp Specifies the name of the storage pool.
-tier Specifies the name of the tier.

After a failure, if you attempt to run the importpv command without specifying a retry, undo, or abort parameter, a specific error indicating that a new import cannot be performed is returned.

The -optype flag is only valid, when used after a previously failed import that is marked as recoverable. The possible post failure options are -optype retry, -optype undo, or -optype abort. Only one of these options can be used at a given time. You can use the -show flag to dump details from a previously failed import operation.

You can use the retry flag to resume the import operation from the point where the previously failed import operation stopped and try to complete the import. If the retry operation is successful, the data is available in the LU. You can use the undo flag to attempt a recovery of the failed import operation. The undo operation reverts the unsuccessful operation. If the undo operation is successful, the data is available in the PV. You can use the abort flag to stop the failed import operation. The unsuccessful PVs are left in the destroyed state. This state means that the data is not present in the LU or the PV. You must restore the lost data from a previously created backup. One instance where you can use the abort flag is if there are disk failures that cannot be promptly fixed and you want the pool to be functional quickly and are willing to lose the imported data.

Examples

  1. To add the physical volume hdisk1 with datavg to the default tier and the default failgrp of the shared storage pool, type the following command:
    importpv hdisk1:lu_1
  2. To check the status of an ongoing importpv command, type the following command:
    importpv -show
    The system displays the following output:
    Import operation for cluster: mycluster
    Storage pool: pool1
    Tier: SYSTEM
    Failure group: Default
    PV(s):PvUdid:LuLable:
    hdisk1:332136005076802818BFFE80000000000016104214503IBMfcp:lu_1
  3. To import a physical volume to a particular tier t1, type the following command:
    importpv -tier t1 hdisk1:lu_1
  4. To import a physical volume to a particular failgrp myfailgrp, by specifying the failgrp in the options, type the following command:
    importpv -fg myfailgrp hdisk1:lu_1
  5. To import a list of physical volumes, by specifying them in a file myfile, in the format specified in the flag section, type the following command:
    importpv -file myfile
  6. To abort a previously failed operation, type the following command:
    importpv hdisk1:lu_1 -optype abort
  7. To retry a previously failed operation, type the following command:
    importpv hdisk1:lu_1 -optype retry
  8. To import a physical volume to a particular tier t1 and the default failgrp, enter the following command:
    importpv -f -tier t1 -fg Default hdiskX:LU_1



Last updated: Wed, November 18, 2020