Volume instance mapping API

In PowerVC, you can look up the backend resources that are related to the volume connections for a virtual machine. The API attempts to provide the following data if applicable: Virtual I/O Servers, Fibre Channel ports, shared storage pools, block device mappings, and zones that are associated with a volume to a given virtual machine.

Backend Storage Resource Mapping (APIs)

The following API can be called against a specific volume or virtual machine:
Table 1. Table 1. Volume Instance Mapping APIs
Method URI Description
GET /v2.1/{tenant_id}/volume_instance_mapping/{volume_id} Returns resources and connection information for a particular volume.
GET /v2.1/{tenant_id}/volume_instance_mapping/{server_id}?instance Returns resources and connection information for all volumes that are attached to the specified server.
Response Codes
Normal Response Code:
Accepted (200)
Error Response Codes for volume_instance_mapping:
Bad Request (400)
Unauthorized (401)
Not Found (404)
Internal Server Error (500)
Note: Retrieve Virtual I/O Server and Fibre Channel Port information with a NovaLink partition.

Example Request

GET /v2.1/815d8d83143f4da2a6400f63550fa5f2/volume_instance_mapping/0a546914-84ab-4bba-948b-c880a4853842?instance
X-Auth-Token:a6ddf6f185224091bf72af3590bd06a8

Example Response

  • HTTP/1.1 200 OK
  • Content-Type: application/json
  • Connection: keep-alive
{'6aba3900-578b-4aa6-a320-e300d7bb9c47': {'block_device_mapping': [{'boot_index': 'null',
		'connection_info': {'data': {'target_lun': '0',
        'target_wwn': ['5005076802264658'
		'5005076802164658',
        '5005076802164657',
        '5005076802264657'],																					
            'volume_id': '6aba3900-578b-4aa6-a320-e300d7bb9c47'},
            'driver_volume_type': 'fibre_channel',
            'volume_connector': {'connection-type': 'npiv',
            'connector': {'connection_type': ['npiv'],
                        'host': 'SVC_MIG_VM-8a546914-00000007',
                        'phy_to_virt_initiators': {'10000090fa451758': ['C02C65E5145A7100',
                        'C02C65E5145A7101'],
                        '10000090fa45473a': ['C0E7408612FCF600',
                        'C0E7408612FCF601']},
                 'wwpns': ['C018D91CCDFEFA00',
                           'C018D91CCDFEFA01',
                           'C02C65E5145A7100',
                           'C02C65E5145A7101',
                           'C05AFCA1A21DF200',
                           'C05AFCA1A21DF201',
                           'C0E7408612FCF600',
                           'C0E7408612FCF601']}}},
            'instance_uuid': '0a546914-84ab-4bba-948b-c880a4853842',
            'volume_id': '6aba3900-578b-4aa6-a320-e300d7bb9c47'}],
'fcs_info': {'10000090fa451758': {'adapter_id': 'U78C9.001.WZS0095-P1-C4',
            'id': '1aU78C9.001.WZS0095-P1-C4-T1',
            'name': 'fcs0',
            'vios_id': '6DD9BD11-16BF-4AFB-AED8-FDD63F4B32C1'},
             '10000090fa45473a': {'adapter_id': 'U78C9.001.WZS0095-P1-C8',
            'id': '1aU78C9.001.WZS0095-P1-C8-T1',
            'name': 'fcs0',
            'vios_id': '7384EBB7-03D4-4B3F-8944-A1B3BA5126AF'}},
'vios_info': {'6DD9BD11-16BF-4AFB-AED8-FDD63F4B32C1': {'host_name': '828642A_10D6DET',
            'id': '6DD9BD11-16BF-4AFB-AED8-FDD63F4B32C1',
            'lpar_id': 2,
            'lpar_name': 'vios1'},
              '7384EBB7-03D4-4B3F-8944-A1B3BA5126AF': {'host_name': '828642A_10D6DET',
            'id': '7384EBB7-03D4-4B3F-8944-A1B3BA5126AF',
            'lpar_id': 3,
            'lpar_name': 'vios2'}},
'volume_info': {'attachments': [{'attachment_id': '79fd9f01-e6b1-4fa1-8cfb-1abf9fea7313',
                  'server_id': '0a546914-84ab-4bba-948b-c880a4853842'}],
                'metadata': {'vdisk_id': '1792',
                'vdisk_name': 'volume-SVC_MIG_VM-8a546914-00000007-boot-0-c60b2e9f-73a8',
                'volume_wwn': '60050768028110A47000000000002C3D'},
                'name': 'volume-SVC_MIG_VM-8a546914-00000007-boot-0-c60b2e9f-73a8',
                'os-vol-host-attr:host': 'ip9_114_181_188',
                'os-vol-tenant-attr:tenant_id': '815d8d83143f4da2a6400f63550fa5f2',
                'stg_provider_info': {'backend_id': '00000200A044291C',
                      'backend_type': 'svc',
                      'default_volume_type': 'fd324095-0854-43a7-8358-26ab4224ec06',
                      'host': 'ip9_114_181_188',
                      'host_display_name': 'SVC188',
                      'id': 1,
                      'stg_type': 'fc',
                      'storage_hostname': 'ip9_114_181_188'}}},
 'a50e04b9-52d3-414f-aa17-63e3a0ce0e2b': {'block_device_mapping': [{'boot_index': 0,
        'connection_info': {'data': {'target_lun': '0',
                	  'target_wwn': ['5005076802264658',
                            '5005076802164658',
                            '5005076802164657',
                            '5005076802264657'],
            'volume_id': 'a50e04b9-52d3-414f-aa17-63e3a0ce0e2b'},
            'driver_volume_type': 'fibre_channel',
            'volume_connector': {'connection-type': 'npiv',
                'connector': {'connection_type': ['npiv'],
                        'host': 'SVC_MIG_VM-8a546914-00000007',
                'phy_to_virt_initiators': {'10000090fa451758': ['C02C65E5145A7100',
                                'C02C65E5145A7101'],
                                '10000090fa45473a': ['C0E7408612FCF600',
                                'C0E7408612FCF601']},
                 'wwpns': ['C018D91CCDFEFA00',
                           'C018D91CCDFEFA01',
                           'C02C65E5145A7100',
                           'C02C65E5145A7101',
                           'C05AFCA1A21DF200',
                           'C05AFCA1A21DF201',
                           'C0E7408612FCF600',
                           'C0E7408612FCF601']}}},
        'instance_uuid': '0a546914-84ab-4bba-948b-c880a4853842',
        'volume_id': 'a50e04b9-52d3-414f-aa17-63e3a0ce0e2b'}],
'fcs_info': {'10000090fa451758': {'adapter_id': 'U78C9.001.WZS0095-P1-C4',
        'id': '1aU78C9.001.WZS0095-P1-C4-T1',
        'name': 'fcs0',
        'vios_id': '6DD9BD11-16BF-4AFB-AED8-FDD63F4B32C1'},
             '10000090fa45473a': {'adapter_id': 'U78C9.001.WZS0095-P1-C8',
        'id': '1aU78C9.001.WZS0095-P1-C8-T1',
        'name': 'fcs0',
        'vios_id': '7384EBB7-03D4-4B3F-8944-A1B3BA5126AF'}},
'vios_info': {'6DD9BD11-16BF-4AFB-AED8-FDD63F4B32C1': {'host_name': '828642A_10D6DET',
        'id': '6DD9BD11-16BF-4AFB-AED8-FDD63F4B32C1',
        'lpar_id': 2,
        'lpar_name': 'vios1'},
        '7384EBB7-03D4-4B3F-8944-A1B3BA5126AF': {'host_name': '828642A_10D6DET',
        'id': '7384EBB7-03D4-4B3F-8944-A1B3BA5126AF',
        'lpar_id': 3,
        'lpar_name': 'vios2'}},
'volume_info': {'attachments': [{'attachment_id': '44172f77-d994-42a0-aba3-ab687d8e4cf0',
                    'server_id': '0a546914-84ab-4bba-948b-c880a4853842'}],
        'metadata': {'vdisk_id': '1390',
                'vdisk_name': 'volume-VN_SVC_DATA_01-cdce7cdf-56e6',
                'volume_wwn': '60050768028110A47000000000002C45'},
        'name': 'volume-VN_SVC_DATA_01-cdce7cdf-56e6',
        'os-vol-host-attr:host': 'ip9_114_181_188',
        'os-vol-tenant-attr:tenant_id': '815d8d83143f4da2a6400f63550fa5f2',
        'stg_provider_info': {'backend_id': '00000200A044291C',
                    'backend_type': 'svc',
                    'default_volume_type': 'fd324095-0854-43a7-8358-26ab4224ec06',
                    'host': 'ip9_114_181_188',
                    'host_display_name': 'SVC188',
                    'id': 1,
                    'stg_type': 'fc',
                    'storage_hostname': 'ip9_114_181_188'}}}}