ViPR 2.1 - Create ViPR Virtual Pools for Block Storage using the ViPR REST API

Table of Contents

Overview

This article provides ViPR System Administrators, using the ViPR REST API, with the necessary information to create and configure ViPR virtual pools for block storage systems.

This article is part of a series

Virtual pools for block storage can be added to ViPR at anytime. If, however, you are setting up the ViPR Controller virtual data center for the first time, before you continue to provision storage, complete the following steps.
  1. Authenticate with the ViPR REST API
  2. Add physical assets to ViPR:
  3. Create ViPR virtual assets:
    1. Create and configure a virtual array
    2. Create virtual pools:

Back to Top

Create ViPR Virtual Pools for Block Storage

Create a virtual pool for block storage by specifying the criteria for provisioned block storage volumes. These criteria are also used to match physical storage pools which can be used for virtual pool volumes.

Before you begin

There are additional optional parameters that can be set for RAID levels, high availability, SAN multi-path, and so on. A complete list of parameters for POST /block/vpools is described in the EMC ViPR REST API Reference.

The following steps describe how to create a virtual pool for block storage in ViPR using the REST API. To use the ViPR UI to create a virtual pool for block storage in ViPR see the Create ViPR virtual pools for block storage article.

This example shows how to create a virtual pool for block storage and apply an ACL to the virtual pool. It also describes the optional step of finding storage pools that match the set of properties of the block virtual pool, and then assigning those storage pools to the virtual pool.

Procedure

  1. To create a block virtual pool, use POST /block/vpools. The representation of the new virtual pool is returned.
    Request
    POST https://<ViPR_VIP>:4443/block/vpools
    Content-Type: application/xml
    X-SDS-AUTH-TOKEN: <AUTH_TOKEN>
    
    <block_vpool_create>
        <description>Basic Virtual Pool for Block Provisioning</description>
        <name>basic_vpool</name>
        <num_paths>1</num_paths>
        <protection>
            <snapshots>
                <max_native_snapshots>10</max_native_snapshots>
            </snapshots>
        </protection>
        <protocols>
            <protocol>FC</protocol>
        </protocols>
        <provisioning_type>Thin</provisioning_type>
        <use_matched_pools>true</use_matched_pools>
        <varrays>
            <element>urn:storageos:VirtualArray:dc09417d-9028-40de-8bff-74574996f2d5:vdc1</element>
        </varrays>
    </block_vpool_create>
    Response
    HTTP 200 OK
    Content-Type: application/xml
    
    <?xml version="1.0" encoding="UTF-8"?>
    <block_vpool>
        <creation_time>1379202604198</creation_time>
        <global>false</global>
        <id>urn:storageos:VirtualPool:6cd9f843-1b41-4b9f-8eb1-a26797d0a268:vdc1</id>
        <inactive>false</inactive>
        <internal>false</internal>
        <link rel="self" href="/block/vpools/urn:storageos:VirtualPool:6cd9f843-1b41-4b9f-8eb1-a26797d0a268:vdc1"/>
        <name>basic_vpool</name>
        <remote>false</remote>
        <tags />
        <vdc>
            <id>urn:storageos:VirtualDataCenter:030618c2-c6b2-40b0-a105-6b669983f58f:vdc1</id>
            <link rel="self" href="/vdc/urn:storageos:VirtualDataCenter:030618c2-c6b2-40b0-a105-6b669983f58f:vdc1"/>
        </vdc>
        <assigned_storage_pools />
        <description>Basic Virtual Pool for Block Provisioning</description>
        <invalid_matched_pools />
        <matched_storage_pools>
            <storage_pool>
                <id>urn:storageos:StoragePool:78caaf4a-673e-4580-ae41-a545a45e5e28:vdc1</id>
                <link rel="self" href="/vdc/storage-systems/urn:storageos:StorageSystem:56d8aa7e-45fe-4383-b49a-fec72e9927d3:vdc1/storage-pools/urn:storageos:StoragePool:78caaf4a-673e-4580-ae41-a545a45e5e28:vdc1"/>
            </storage_pool>
            <storage_pool>
                 <id>urn:storageos:StoragePool:ad0dae57-d318-409c-a859-6c9e59a28251:vdc1</id>
                 <link rel="self" href="/vdc/storage-systems/urn:storageos:StorageSystem:56d8aa7e-45fe-4383-b49a-fec72e9927d3:vdc1/storage-pools/urn:storageos:StoragePool:ad0dae57-d318-409c-a859-6c9e59a28251:vdc1"/>
            </storage_pool>
            <storage_pool>
                <id>urn:storageos:StoragePool:62d2e40d-ced0-4114-8bb7-8d333e7ef878:vdc1</id>
                <link rel="self" href="/vdc/storage-systems/urn:storageos:StorageSystem:56d8aa7e-45fe-4383-b49a-fec72e9927d3:vdc1/storage-pools/urn:storageos:StoragePool:62d2e40d-ced0-4114-8bb7-8d333e7ef878:vdc1"/>
            </storage_pool>
        </matched_storage_pools>
        <num_paths>1</num_paths>
        <num_resources>4</num_resources>
        <protocols>
            <protocol>FC</protocol>
        </protocols>
        <provisioning_type>Thin</provisioning_type>
        <system_type>NONE</system_type>
        <type>block</type>
        <use_matched_pools>true</use_matched_pools>
    				<varrays>
             <varray>
                 <id>urn:storageos:VirtualArray:dc09417d-9028-40de-8bff-74574996f2d5:vdc1</id>
                 <link rel="self" href="vdc/varrays/urn:storageos:VirtualArray:dc09417d-9028-40de-8bff-74574996f2d5:vdc1/>
             </varray>
        </varrays>
        <drive_type>NONE</drive_type>
        <expandable>true</expandable>
        <fast_expansion>false</fast_expansion>
        <high_availability/>
        <max_paths>2</max_paths>
        <min_paths>1</min_paths>
        <multi_volume_consistency>true</multi_volume_consistency>
        <paths_per_initiator>1</paths_per_initiator>
        <protection>
            <continuous_copies>
                <max_native_continuous_copies>0</max_native_continuous_copies>
            </continuous_copies>
            <snapshots>
                <max_native_snapshots>10</max_native_snapshots>
            </snapshots>
        </protection>
        <protocols>
            <element>FC</element>
        </protocols>
        <provisioning_type>Thin</provisioning_type>
        <raid_levels />
        <thin_volume_preallocation_percentage>0</thin_volume_preallocation_percentage>
        <unique_auto_tier_policy_names>false</unique_auto_tier_policy_names>
    </block_vpool>
    
    
  2. Tenant access to each virtual pool is controlled by an Access Control List (ACL). Only tenants that are included in the virtual pool's ACL are permitted access to that virtual pool. If no ACL is set, the virtual pool can be accessed by all tenants. Apply an ACL to the virtual pool using PUT/block/vpools/{vpool_urn}/acl. The updated ACL is returned.
    Request
    PUT https://<ViPR_VIP>:4443/block/vpools/urn:storageos:VirtualPool:6cd9f843-1b41-4b9f-8eb1-a26797d0a268:vdc1/acl
    Content-Type: application/xml
    X-SDS-AUTH-TOKEN: <AUTH_TOKEN>
    
    <acl_assignment_changes>
        <add>
            <privilege>USE</privilege>
            <tenant>urn:storageos:TenantOrg:757053b7-b952-41b9-83e1-44204b67a368:vdc1</tenant>
        </add>
    </acl_assignment_changes>
    Response
    HTTP 200 OK
    Content-Type: application/xml
    
    <?xml version="1.0" encoding="UTF-8"?>
    <acl_assignments>
        <acl_assignment>
            <privilege>USE</privilege>
            <tenant>urn:storageos:TenantOrg:757053b7-b952-41b9-83e1-44204b67a368:vdc1</tenant>
        </acl_assignment>
    </acl_assignments>
  3. ViPR automatically matches existing physical pools on the ViPR-managed storage systems to the virtual pool characteristics. You have the option of allowing ViPR to automatically associate the matching physical pools to the virtual pool you created, or you can manually select a subset of the matching physical pools to associate to the virtual pool. To manually select a subset of the matching physical pools:
    1. POST /block/vpools/matching-pools is used to get a list of storage pools that match a given set of criteria. In this example, the criterial that are sent in the request payload match the properties of the virtual pool that was just created.
      Request
      POST https://<ViPR_VIP>:4443/block/vpools/matching-pools
      Content-Type: application/xml
      X-SDS-AUTH-TOKEN: <AUTH_TOKEN>
      
      <block_vpool_create>
          <description>Basic Virtual Pool for Block Provisioning</description>
          <name>basic_vpool</name>
          <num_paths>1</num_paths>
          <protection>
              <snapshots>
                  <max_native_snapshots>10</max_native_snapshots>
              </snapshots>
          </protection>
          <protocols>
              <element>FC</element>
          </protocols>
          <provisioning_type>Thin</provisioning_type>
          <use_matched_pools>true</use_matched_pools>
          <varrays>
              <element>urn:storageos:VirtualArray:dc09417d-9028-40de-8bff-74574996f2d5:vdc1</element>
          </varrays>
      </block_vpool_create>
      Response
      HTTP 200 OK
      Content-Type: application/xml
      <?xml version="1.0" encoding="UTF-8"?>
      <storage_pools>
          <storage_pool>>
               <id>urn:storageos:StoragePool:62d2e40d-ced0-4114-8bb7-8d333e7ef878:vdc1</id>
               <link rel="self" href="/vdc/storage-systems/urn:storageos:StorageSystem:56d8aa7e-45fe-4383-b49a-fec72e9927d3:vdc1/storage-pools/urn:storageos:StoragePool:62d2e40d-ced0-4114-8bb7-8d333e7ef878:vdc1"/>
               <name>SYMMETRIX+000198700420+POOL+TP+3R5-A</name>
          </storage_pool>
          <storage_pool>
               <id>urn:storageos:StoragePool:9e551963-d596-48ae-b208-1b870126d195:vdc1</id>
               <link rel="self" href="/vdc/storage-systems/urn:storageos:StorageSystem:56d8aa7e-45fe-4383-b49a-fec72e9927d3:vdc1/storage-pools/urn:storageos:StoragePool:9e551963-d596-48ae-b208-1b870126d195:vdc1"/>
               <name>SYMMETRIX+000198700420+POOL+TP+M3</name>
          </storage_pool>
          <storage_pool>
               <id>urn:storageos:StoragePool:ad0dae57-d318-409c-a859-6c9e59a28251:vdc1</id>
               <link rel="self" href="/vdc/storage-systems/urn:storageos:StorageSystem:56d8aa7e-45fe-4383-b49a-fec72e9927d3:vdc1/storage-pools/urn:storageos:StoragePool:ad0dae57-d318-409c-a859-6c9e59a28251:vdc1"/>
               <name>SYMMETRIX+000198700420+POOL+TP+M2</name>
          </storage_pool>
          <storage_pool>
               <id>urn:storageos:StoragePool:78caaf4a-673e-4580-ae41-a545a45e5e28:vdc1</id>
               <link rel="self" href="/vdc/storage-systems/urn:storageos:StorageSystem:56d8aa7e-45fe-4383-b49a-fec72e9927d3:vdc1/storage-pools/urn:storageos:StoragePool:78caaf4a-673e-4580-ae41-a545a45e5e28:vdc1"/>
               <name>SYMMETRIX+000198700420+POOL+TP+data</name>
          </storage_pool>
          <storage_pool>
               <id>urn:storageos:StoragePool:38e2a0c2-89c9-4ec7-ad9b-29420e464012:vdc1</id>
               <link rel="self" href="/vdc/storage-systems/urn:storageos:StorageSystem:56d8aa7e-45fe-4383-b49a-fec72e9927d3:vdc1/storage-pools/urn:storageos:StoragePool:38e2a0c2-89c9-4ec7-ad9b-29420e464012:vdc1"/>
               <name>SYMMETRIX+000198700420+POOL+TP+t3</name>
          </storage_pool>
          <storage_pool>
               <id>urn:storageos:StoragePool:dbdcd42a-b0a4-49b4-8a6e-204a09b8b1ef:vdc1</id>
               <link rel="self" href="/vdc/storage-systems/urn:storageos:StorageSystem:56d8aa7e-45fe-4383-b49a-fec72e9927d3:vdc1/storage-pools/urn:storageos:StoragePool:dbdcd42a-b0a4-49b4-8a6e-204a09b8b1ef:vdc1"/>
               <name>SYMMETRIX+000198700420+POOL+TP+3R5-B</name>
          </storage_pool>
      </storage_pools>
      
      
    2. Using the URN returned for the new virtual pool returned from the POST /block/vpools request, assign one or more of the storage pools that match the properties of the virtual pool by sending a PUT/block/vpools/{identifier}/assign-matched-pools request. The representation of the updated virtual pool is returned.
      Request
      PUT https://<ViPR_VIP>:4443/block/vpools/urn:storageos:VirtualPool:6cd9f843-1b41-4b9f-8eb1-a26797d0a268:vdc1/assign-matched-pools
      Content-Type: application/xml
      X-SDS-AUTH-TOKEN: <AUTH_TOKEN>
      
      <vpool_pool_update>
          <assigned_pool_changes>
              <add>
                  <storage_pool>
                      <storage_pool>urn:storageos:StoragePool:62d2e40d-ced0-4114-8bb7-8d333e7ef878:vdc1</storage_pool>
                      <storage_pool>urn:storageos:StoragePool:78caaf4a-673e-4580-ae41-a545a45e5e28:vdc1</storage_pool>
                      <storage_pool>urn:storageos:StoragePool:ad0dae57-d318-409c-a859-6c9e59a28251:vdc1</storage_pool>
                  </storage_pool>
              </add>
          </assigned_pool_changes>
      </vpool_pool_update>
      Response
      HTTP 200 OK
      Content-Type: application/xml
      
      <?xml version="1.0" encoding="UTF-8"?>
      <block_vpool>
          <creation_time>1379202604198</creation_time>
          <global>false</global>
          <id>urn:storageos:VirtualPool:6cd9f843-1b41-4b9f-8eb1-a26797d0a268:vdc1</id>
          <inactive>false</inactive>
          <internal>false</internal>
          <link rel="self" href="/block/vpools/urn:storageos:VirtualPool:6cd9f843-1b41-4b9f-8eb1-a26797d0a268:vdc1"/>
          <name>basic_vpool</name>
          <remote>false</remote>
          <tags />
          <vdc>
              <id>urn:storageos:VirtualDataCenter:030618c2-c6b2-40b0-a105-6b669983f58f:vdc1</id>
              <link rel="self" href="/vdc/urn:storageos:VirtualDataCenter:030618c2-c6b2-40b0-a105-6b669983f58f:vdc1"/>
          </vdc>
          <assigned_storage_pools>
              <storage_pool>
                  <id>urn:storageos:StoragePool:78caaf4a-673e-4580-ae41-a545a45e5e28:vdc1</id>
                  <link rel="self" href="/vdc/storage-systems/urn:storageos:StorageSystem:56d8aa7e-45fe-4383-b49a-fec72e9927d3:vdc1/storage-pools/urn:storageos:StoragePool:78caaf4a-673e-4580-ae41-a545a45e5e28:vdc1"/>
              </storage_pool>
              <storage_pool>
                  <id>urn:storageos:StoragePool:ad0dae57-d318-409c-a859-6c9e59a28251:vdc1</id>
                  <link rel="self" href="/vdc/storage-systems/urn:storageos:StorageSystem:56d8aa7e-45fe-4383-b49a-fec72e9927d3:vdc1/storage-pools/urn:storageos:StoragePool:ad0dae57-d318-409c-a859-6c9e59a28251:vdc1"/>
              </storage_pool>
              <storage_pool>>
                   <id>urn:storageos:StoragePool:62d2e40d-ced0-4114-8bb7-8d333e7ef878:vdc1</id>
                   <link rel="self" href="/vdc/storage-systems/urn:storageos:StorageSystem:56d8aa7e-45fe-4383-b49a-fec72e9927d3:vdc1/storage-pools/urn:storageos:StoragePool:62d2e40d-ced0-4114-8bb7-8d333e7ef878:vdc1"/>
              </storage_pool>
          </assigned_storage_pools>
          <description>Basic Virtual Pool for Block Provisioning</description>
          <invalid_matched_pools />
          <matched_storage_pools>
              <storage_pool>
                  <id>urn:storageos:StoragePool:78caaf4a-673e-4580-ae41-a545a45e5e28:vdc1</id>
                  <link rel="self" href="/vdc/storage-systems/urn:storageos:StorageSystem:56d8aa7e-45fe-4383-b49a-fec72e9927d3:vdc1/storage-pools/urn:storageos:StoragePool:78caaf4a-673e-4580-ae41-a545a45e5e28:vdc1"/>
              </storage_pool>
              <storage_pool>
                   <id>urn:storageos:StoragePool:ad0dae57-d318-409c-a859-6c9e59a28251:vdc1</id>
                   <link rel="self" href="/vdc/storage-systems/urn:storageos:StorageSystem:56d8aa7e-45fe-4383-b49a-fec72e9927d3:vdc1/storage-pools/urn:storageos:StoragePool:ad0dae57-d318-409c-a859-6c9e59a28251:vdc1"/>
              </storage_pool>
              <storage_pool>
                  <id>urn:storageos:StoragePool:62d2e40d-ced0-4114-8bb7-8d333e7ef878:vdc1</id>
                  <link rel="self" href="/vdc/storage-systems/urn:storageos:StorageSystem:56d8aa7e-45fe-4383-b49a-fec72e9927d3:vdc1/storage-pools/urn:storageos:StoragePool:62d2e40d-ced0-4114-8bb7-8d333e7ef878:vdc1"/>
              </storage_pool>
          </matched_storage_pools>
          <num_paths>1</num_paths>
          <num_resources>4</num_resources>
          <protocols>
              <protocol>FC</protocol>
          </protocols>
          <provisioning_type>Thin</provisioning_type>
          <system_type>NONE</system_type>
          <type>block</type>
          <use_matched_pools>true</use_matched_pools>
      				<varrays>
               <varray>
                   <id>urn:storageos:VirtualArray:dc09417d-9028-40de-8bff-74574996f2d5:vdc1</id>
                   <link rel="self" href="vdc/varrays/urn:storageos:VirtualArray:dc09417d-9028-40de-8bff-74574996f2d5:vdc1/>
               </varray>
          </varrays>
          <drive_type>NONE</drive_type>
          <expandable>true</expandable>
          <fast_expansion>false</fast_expansion>
          <high_availability/>
          <max_paths>2</max_paths>
          <min_paths>1</min_paths>
          <multi_volume_consistency>true</multi_volume_consistency>
          <paths_per_initiator>1</paths_per_initiator>
          <protection>
              <continuous_copies>
                  <max_native_continuous_copies>0</max_native_continuous_copies>
              </continuous_copies>
              <snapshots>
                  <max_native_snapshots>10</max_native_snapshots>
              </snapshots>
          </protection>
          <protocols>
              <element>FC</element>
          </protocols>
          <provisioning_type>Thin</provisioning_type>
          <raid_levels />
          <thin_volume_preallocation_percentage>0</thin_volume_preallocation_percentage>
          <unique_auto_tier_policy_names>false</unique_auto_tier_policy_names>
      </block_vpool>
      
Back to Top