ViPR 2.2 - Add Third-Party Block storage to ViPR using the REST API
Table of Contents
Overview
Learn how you, as a ViPR system administrator, can add third-party block storage to EMC ViPR. ViPR uses the OpenStack® Block Storage (Cinder) Service to add third-party block storage systems to ViPR. Once OpenStack block storage is added to ViPR, all the storage systems, being managed by OpenStack are discovered, and registered in ViPR.
Some of the important REST API calls to manage and configure the storage after it has been added, and discovered in ViPR are also described.
This article is part of a series
- Authenticate with the ViPR REST API
- Add physical assets to ViPR:
- Create ViPR virtual assets:
Add Third-party block storage to ViPR
Before you begin
- Pre-configuration and support requirements.
- The IP address of the Third-party block storage provider.
- The username and password for connecting to the storage provider. System administrator privileges are required.
- The port number used to connect to the storage provider. The default port number for a Third-party block storage provider is 22.
- The interface_type is cinder.
- Authenticate with the ViPR REST API as a System Administrator.
The EMC ViPR REST API Reference provides a description and complete list of parameters for the REST API methods used in this article.
The following steps describe how to add Third-party block storage to ViPR using the REST API. To use the ViPR UI to add Third-party block storage to ViPR, see the Add Storage Systems Using the ViPR UI article.
Procedure
- Add third-party block storage by sending a
POST /vdc/storage-providers request.
The request returns a task whose URI can be queried to determine the when the task is complete.Request
POST https://<ViPR_VIP>:4443/vdc/storage-providers Content-Type: application/xml X-SDS-AUTH-TOKEN: <AUTH_TOKEN> <storage_provider_create> <name>TP_east_1</name> <interface_type>cinder</interface_type> <ip_address>192.168.0.0</ip_address> <port_number>22</port_number> <user_name>admin</user_name> <password>Password1</password> <use_ssl>false</use_ssl> </storage_provider_create>
ResponseHTTP 202 Accepted Content-Type: application/xml <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <task> <creation_time>1423158587993</creation_time> <global>false</global> <id>urn:storageos:Task:980cf8ac-04da-4ad9-8216-18b08f105967:vdc1</id> <inactive>false</inactive> <internal>false</internal> <link rel="self" href="/vdc/tasks/urn:storageos:Task:980cf8ac-04da-4ad9-8216-18b08f105967:vdc1"/> <name>SCAN STORAGE PROVIDER</name> <remote>false</remote> <tags/> <vdc> <id>urn:storageos:VirtualDataCenter:99c5c185-ebb0-468a-8fe7-3ea6e65b7b57:vdc1</id> <link rel="self" href="/vdc/urn:storageos:VirtualDataCenter:99c5c185-ebb0-468a-8fe7-3ea6e65b7b57:vdc1"/> </vdc> <associated_resources/> <description>scan storage provider</description> <op_id>be94a927-1994-4ef8-a375-98bbdef54598</op_id> <progress>0</progress> <resource> <id>urn:storageos:StorageProvider:f0d1c9cb-ae38-4012-809d-a3bed4a4d9ef:vdc1</id> <link rel="self" href="/vdc/storage-providers/urn:storageos:StorageProvider:f0d1c9cb-ae38-4012-809d-a3bed4a4d9ef:vdc1"/> <name>TP_east_1</name> </resource> <start_time>1423158587989</start_time> <state>pending</state> </task>
- Repeat the query of the Third-party storage provider create task, using the task URL from the response body of the POST request, until the message attribute of the task is
Operation completed successfully.
Request
GET https://<ViPR_VIP>:4443/vdc/tasks/urn:storageos:Task:980cf8ac-04da-4ad9-8216-18b08f105967:vdc1 Content-Type: application/xml X-SDS-AUTH-TOKEN: <AUTH_TOKEN>
ResponseHTTP 200 OK Content-Type: application/xml <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <task> <creation_time>1423158587993</creation_time> <global>false</global> <id>urn:storageos:Task:980cf8ac-04da-4ad9-8216-18b08f105967:vdc1</id> <inactive>false</inactive> <internal>false</internal> <link rel="self" href="/vdc/tasks/urn:storageos:Task:980cf8ac-04da-4ad9-8216-18b08f105967:vdc1"/> <name>SCAN STORAGE PROVIDER</name> <remote>false</remote> <tags/> <vdc> <id>urn:storageos:VirtualDataCenter:99c5c185-ebb0-468a-8fe7-3ea6e65b7b57:vdc1</id> <link rel="self" href="/vdc/urn:storageos:VirtualDataCenter:99c5c185-ebb0-468a-8fe7-3ea6e65b7b57:vdc1"/> </vdc> <associated_resources/> <description>scan storage provider</description> <end_time>1423158620439</end_time> <message>Operation completed successfully</message> <op_id>be94a927-1994-4ef8-a375-98bbdef54598</op_id> <progress>100</progress> <resource> <id>urn:storageos:StorageProvider:f0d1c9cb-ae38-4012-809d-a3bed4a4d9ef:vdc1</id> <link rel="self" href="/vdc/storage-providers/urn:storageos:StorageProvider:f0d1c9cb-ae38-4012-809d-a3bed4a4d9ef:vdc1"/> <name>TP_east_1</name> </resource> <start_time>1423158587989</start_time> <state>ready</state> </task>
ViPR storage system discovery overview
After a storage system is added to ViPR, ViPR automatically discovers, and registers the storage system, and storage system resources. There are optional configuration steps that can be performed on the storage system, and its resources, after the storage has been added, discovered, and registered in ViPR.
ViPR discovery of third-party block storage ports
The OpenStack API does not provide the storage port World Wide Port Name (WWPN) for Fibre Channel connected storage systems, or the IQN for iSCSI connected storage systems. Therefore, ViPR cannot retrieve the storage port WWPNs, or IQNs during discovery.
After ViPR discovers a third-party block storage array, a default storage port is created for the storage system, and appears in the Storage Port page, with the name Default, and storage port identifier: Openstack+<storagesystemserialnumber>+Port+Default.
Fibre Channel configured storage ports
ViPR export operations cannot be performed on an FC connected storage system, which has been added to ViPR without any WWPNs assigned to the storage port. Therefore, ViPR system administrators must manually add at least one WWPN to the default storage port before performing any export operations on the storage system. WWPNs can be added to ViPR through the ViPR CLI and UI.
After the WWPN is added to the storage port, you can perform export operations on the storage system from ViPR. At the time of the export, ViPR reads the export response from the Cinder service. The export response will include the WWPN, which was manually added by the system administrator from the ViPR CLI, and any additional WWPNs listed in the export response. ViPR then creates a storage port for each of the WWPNs listed in the export response during the export operation.
After a successful export operation is performed, the Storage Port page displays any newly created ports, in addition to the Default storage port.
Each time another export operation is performed on the same storage system, ViPR reads the Cinder export response. If the export response presents WWPNs, which are not present in ViPR, then ViPR creates new storage ports for every new WWPN.
iSCSI configured storage ports
The default storage port is used to support the storage system configuration until an export is performed on the storage system. At the time of the export, ViPR reads the export response from the Cinder service, which includes the iSCSI IQN. ViPR then modifies the default storage port's identifier with the IQN received from the Cinder export response.
Each time another export operation is performed on the same storage system, ViPR reads the Cinder export response. If the export response presents an IQN, which is not present in ViPR, then ViPR creates a new storage port.
Back to TopAdd WWPNs to FC connected third-party block storage ports
If the third-party block storage is connected through Fibre Channel (FC), at least one storage port, World Wide Port Name (WWPN) must be manually added to ViPR through the ViPR CLI.
You will need to get at least one valid WWPN for the storage port before continuing.
Use the following CLI commands to add a WWPN to the storage port.
- Get the last three digits of the storage system serial number from the list of storage systems.
C:\Users\<username>viprcli storagesystem list NAME PROVIDER_NAME SYSTEM_TYPE SERIAL_NUMBER IBMSVC-FC_StorwizeSVCDriver+11111111234 myProviderName openstack 11111111234
- Get the port network ID for the Default storage port. The storage port network ID (PORT_NETWORK_ID) will be an invalid value.
C:\Users\<username>viprcli storageport list -t openstack -sn 234 PORT_NAME TRANSPORT_TYPE NETWORK_NAME PORT_NETWORK_ID REGISTRATION_STATUS DEFAULT FC FABRIC_name-fabric <some invalid value> REGISTERED
- Add the WWPN (50:01:02:34:05:06:FE:07 in this example) to the storage port.
C:\Users\<username>viprcli storageport update -t openstack -sn 234 -pn DEFAULT -tt FC -pnwid "50:01:02:34:05:06:FE:07"
- Repeat step 2, to validate the value was added to the storage port (PORT_NETWORK_ID).
C:\Users\<username>viprcli storageport list -t openstack -sn 234 PORT_NAME TRANSPORT_TYPE NETWORK_NAME PORT_NETWORK_ID REGISTRATION_STATUS DEFAULT FC FABRIC_name-fabric 50:01:02:34:05:06:FE:07 REGISTERED
Refer to the EMC ViPR CLI Reference guide for more information.
Back to TopNetwork configuration for block storage systems
After the storage system is added to ViPR, it is recommended to add the corresponding SAN switch using POST /vdc/network-systems.
When a SAN switch is added to ViPR, the Fibre Channel networks (Brocade Fabrics or Cisco VSANs), are automatically discovered and registered in ViPR. Additionally, through discovery of the SAN switch topology, ViPR discovers, and registers the host initiators for hosts on the network, and identifies which storage systems are associated with the SAN switch.
Refer to Add network systems (fabric managers) and SAN networks to ViPR for more information.
- For Storage Systems that use ViPR services with the iSCSI protocol, the iSCSI host ports must be logged into the correct target array ports before they can be used in the service.
Important REST API calls to manage and configure storage systems
The table shows some important APIs that are used to manage and configure storage systems.