PowerVM

Import LPAR disks to Shared Storage Pools

By Rob Gjertsen posted Thu June 25, 2020 06:31 PM

  

Shared Storage Pools (SSP) is getting enhanced with each added feature in new releases of VIOS. The adoption of SSP is easily attributed to its design principles of storage management simplification and efficient storage utilization. SSP enhancements in PowerVM 2.2.4 release such as, Storage tiers, Move LU, and Grow LU have provided even more compelling reasons for increased adoption.  For more information, refer to the blog: PowerVM Shared Storage Pool Enhancements

With the aforementioned compelling reasons, you would want an easy way to migrate an existing LPAR storage to the VIOS SSP environment.  The virtual I/O Server has the capability to migrate storage from non-SSP to SSP environment.  This is possible using the command importpv (VIOS command) which is designed to import one or more physical volumes containing data into SSP.   It migrates the data from the input physical volumes into the SSP Logical Unit.

Physical volumes eligible for the import can be any of the following:

  • Direct attached PV belonging to SAN
  • NPIV attached PV
  • vSCSI disk that is backed by a PV on VIOS.

And the physical volumes NOT eligible for the import are:

  •  vSCSI disks backed by a Logical Volume (LV) 
  •  vSCSI disks backed by File.

Few recommendations for the importpv operation.

  1. A Shared Storage Pool (SSP) should already exist in your environment. If not, create a new one.
  2. All the physical volumes to be imported must be rezoned to deny access to all client LPARs and provide access to all VIOS partitions in the SSP.
  3. All the physical volumes being imported should be made visible to all the VIOS partitions in the SSP.
  4. Additionally, in-case of NPIV attached PV import, the NPIV server and client adapter mappings should be removed from the HMC profiles of VIOS and client LPARs.
  5. Reserves on all the physical volumes to be imported must be removed. For example, the option ”reserve_policy” should be set to “no_reserve”.

Use-case for importpv

Importpv use case is depicted using a vSCSI disk backed by a PV on the VIOS.

Figure 1 shows a VIOS which exports hdiskX to the client LPAR through a virtual adapter. This VIOS is also part of a SSP cluster.

hdiskX appears as a vSCSI disk hdiskX to the client LPAR and it contains the rootvg for the client.

hdiskX of the VIOS can be imported to the SSP using importpv command. Since we are importing the physical volume containing the rootvg, in addition to the recommendations mentioned above, we also recommend to power off the client partition before starting the importpv.

 

 

As shown in the Figure 2, once the import of the hdiskX is complete, the hdiskX gets added to the SSP and is backed by a SSP LU (LU_1).

Now the VIOS provides same storage to the client LPAR's through SSP LU. This SSP LU (LU_1) created as part of the importpv operation needs to be mapped to the vSCSI adapter of the client.

 

 

Using the importpv command

The importpv command supports the following options:

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

importpv -file [-f] [-optype OperationType] [-clustername ClusterName] [-sp StoragePool] [-tier TeirName] [-fg FGName] FileName

importpv -show [-clustername ClusterName]


The -optype option is only valid when used after a previously failed import that is marked as recoverable.

 The allowed post failure options are -optype retry, -optype undo, or -optype abort and are mutually exclusive. 

  • The -show option is also available to dump details from a previously failed import operation.
  • The retry option is used to resume the import operation from where the previously failed operation was left off and attempt to complete the import. If retry is successful, data will be available in the LU.
  • The undo option is used to attempt a recovery of the failed import operation. It would revert the unsuccessful operation. If the undo is successful, data will be available in the PV.
  • The abort option lets the failed import operation to be aborted, the unsuccessful PV's are left in the destroyed state, i.e the data is not present in the LU as well as PV. The user needs to restore the lost data from backup. One instance when the abort option can be used is if there are disk failures which cannot be promptly fixed and the user wants the pool to be back in good state quickly and is willing to sacrifice the imported data.

The following examples show the usage of the importpv command:

1.) To add the physical volume hdisk0 with rootvg, to the default tier and default fail group of the shared storage pool, enter the following:

     importpv -f hdiskX:LU_1

2.) To check the status of an ongoing importpv command, enter the following:

     importpv -show

3.) To import a physical volume to a particular tier t1, enter the following:

     importpv -f -tier t1 hdiskX:LU_1

4.) To import a physical volume to a particular fail group fg1, enter the following:

     importpv -f -fg fg1 hdiskX:LU_1

5.) To import a physical volume to a particular tier t1 and the default fail group, enter the following:

           importpv -f -tier t1 -fg Default hdiskX:LU_1

6.) To import a list of physical volumes, by specifying them in a file file1, enter the following:

     importpv -file -f file1 

           Example file1 format :
     hdiskX:luX hdiskY:luY

7.) To abort a previously failed operation, enter the following:

     importpv -f hdiskX:LU_1 -optype abort

8.) To retry a previously failed operation, enter the following:

     importpv -f hdiskX :LU_1 -optype retry

9.) To undo the previously failed operation, enter the following:

     importpv -f hdiskX:LU_1 -optype undo 

Note: The importpv command does not provide an option to revert back to the previous state of the imported PV. It implies that after the importpv operation is initiated and the physical volume is successfully added to the SSP, user cannot revert the PV to its original state.

Contacting the PowerVM Team

Have questions for the PowerVM team or want to learn more?  Follow our discussion group on LinkedIn IBM PowerVM or IBM Community Discussions

0 comments
18 views

Permalink