Hitachi Ops Center​

 View Only

Unlock the Power of VSP One Block 20: Introducing APIs for Seamless Storage Management

By Vikash Taank posted 09-09-2024 06:08

  

Introduction

This blog introduces the essential APIs for managing Hitachi Virtual Storage Platform One Block 20 (VSP One B20) storage systems:

  • Hitachi Ops Center API Configuration Manager REST API (CMREST)  
  • Hitachi Virtual Storage One Block Platform REST API (PFREST)
  • VSP One Block Administrator API

 

Users have access to a wide range of APIs for managing VSP One Block 20 storage, providing significant flexibility to customize their storage solutions. However, this increased flexibility can sometimes result in reduced clarity. This blog delves into the various APIs offered for VSP One Block 20 storage systems and shows how to implement them for essential storage operations. The key storage operations for all three APIs are as follows:

 ·       Registering a storage system

·       Creating a DDP enabled Parity Group

·       Creating a Pool (DDP)

·       Creating a Volume (DRS)

·       Creating a Hitachi Thin Image Advanced Pair

 

Note:

·       For simplicity, the blog adopts abbreviations like 'PFREST' and 'CMREST'.

·       This blog is not intended to serve as a substitute for the User Guides. While the User Guides provide comprehensive instructions on usage, this blog merely provides an overview of various APIs.

Brief on the APIs

Hitachi Ops Center API Configuration Manager REST API (CMREST)

 

Ops Center API Configuration Manager is an independent and lightweight management tool that includes a Command Control Interface (CC) and a Command-Line Interface (CLI) software. It enables programmatic management of Hitachi storage systems and can be installed as a standalone application on Windows or Linux, or as part of the Hitachi Ops center suite.

 The following figure shows the configuration layout:  

 

Setting up CMREST involves installing Configuration Manager REST API on a management server. The process starts with the REST API client sending a request to the CMREST server. The CMREST server then forwards this request to the Platform REST API server. The Platform REST API server processes the request by communicating with the storage system and returns the results to the CMREST server. Finally, the CMREST server relays these results to the REST API client.  

 

Hitachi VSP One Block Platform REST API

 Platform REST API offers a cost-effective solution by allowing you to issue requests directly to the Platform REST API server embedded in the ESM Stack following the REST Protocol. This eliminates the need for a separate external management server. 

 The following figure shows the configuration layout:  

 

 

 

VSP One Block Administrator API

 VSP One Block 20 offers a cost-effective solution by integrating embedded management software, eliminating the need for a separate external management server. This self-contained approach not only simplifies storage management, but also saves customers from investing in additional hardware and software, resulting in significant cost savings. Unlike Platform REST API, the VSP One Block Administrator API directly interacts with the Storage Virtualized Operating System (SVOS) and is embedded in the Embedded Software Management (ESM) stack, which follows the REST protocol. As a result, response time is faster than the legacy Platform REST API.

 

The following figure shows the configuration layout:  

 

 

Advantages of APIs

 

  • Using APIs over the GUI results in significantly better performance, increased flexibility, ease of use, and a higher level of standardization. APIs also enable automation of tasks, allowing for greater efficiency and consistency. 
  • CMREST makes management of multiple storage systems more efficient, streamlined, and organized. It allows for centralized control, where all storage systems are registered in the CMREST database.
  • Platform REST API eliminates the need for a separate external management server by allowing you to issue requests directly to the Platform REST server embedded in the ESM stack. This approach provides a flexible, easy, and cost-effective solution for managing storage systems, as it reduces the hardware requirements and simplifies the setup process.  
  • Like Platform REST API, the VSP One Administrator API eliminates the need for a separate external management server by allowing you to issue requests directly to the VSP One Administrator server embedded in the ESM stack. This results in significant cost savings while also providing a flexible and easy solution for managing storage systems. However, unlike Platform REST API, the VSP One Administrator API interacts directly with SVOS instead of using CCI. This direct interaction enables faster response times compared to the legacy Platform REST API. 

 

 

Prerequisites for running APIs

 ·       CMREST must be installed on the management server as a standalone application on Windows or Linux, or as part of the Hitachi Ops center suite using the OVA/Express installer on RHEL/OEL machines.

·       Ensure that all the necessary ports are open and accurately configured (client, management server, and storage system), and establish SSL communication to secure the interactions. Additionally, if you are using a firewall, you might have to register a firewall exception manually depending on the environment. For detailed instructions, see the Hitachi Ops Center API Configuration Manager REST API Reference Guide.

·       The API requests are provided using ‘curl’, along with the contents of the JSON file that contains the mandatory parameters that will be passed as input when the command is run. If you want to run these commands, ensure that ‘curl’ is installed, because it often does not come pre-installed on Windows and various Linux distributions. 

·       Ensure that you generate a valid Authorization token before running the commands. The token must be included in the request header as follows:  -H “Authorization:Session <token>” . In our examples, we used an authorization token for authentication instead of a username and password.

 

Operation

 Let’s now implement some of the new features introduced in VSP One Block 20 using the three APIs.

 

Registering a storage system

 Storage registration is not applicable for Platform REST and VSP One Administrator API because the requests are directly issued to the Platform REST or VSP One Administrator API server embedded in the ESM Stack.   

API

Coding Example

Input Json File (RegistertingStorage.json)

Hitachi Ops Center API Configuration Manager REST API

curl -k -v -H "Accept:application/json" -H "Content-Type:application/json" -u username:password -X POST --data-binary @./RegisteringStorage.json https://192.0.2.100:23451/ConfigurationManager/v1/objects/storages

{

"model": "VSP One B28",

"serialNumber": "81XXXX",

"ip": "172.XX.XX.XX"

}

Hitachi VSP One Block Platform REST API

NA

NA

VSP One Administrator API

NA

NA

 

 

Note: The API request was run using only the mandatory parameters. For information on the usage of optional parameters, see the individual API guides for each of the APIs.

 

Creating a DDP Enabled Parity Group 

Currently, CMREST and Platform REST APIs do not support creating DDP-enabled parity groups. However, non-DDP parity groups can still be created using these APIs.  
With the VSP One Administrator API, the workflow is different and more abstracted. Instead of directly creating a parity group, you can specify DDP while creating a pool. This creates a DDP parity group in the backend, which is only visible through CCI or Platform REST API/CMREST.   

API

Coding Example

Input Json File (ParityGroup.json)

Hitachi Ops Center API Configuration Manager REST API

curl -k -v -H "Accept:application/json" -H "Content-Type:application/json" -H "Authorization:Session xxxxxxxxxxxxxxxxxx" -X POST --data-binary @./PartiyGroup.json https://192.0.2.100:23451/ConfigurationManager/v1/objects/storages/A3400081xxxx/parity-groups

{

"driveLocationIds": ["00-00","00-01","00-02","00-03","00-04","00-05","00-06","00-07"],

"raidType": "6D+2P"

}

Hitachi VSP One Block Platform REST API

curl -k -v -H "Accept:application/json" -H "Content-Type:application/json" -H "Authorization:Session xxxxxxxxxxxxxxxxxx" -X POST --data-binary @./ParityGroup.json https://192.0.2.100/ConfigurationManager/v1/objects/parity-groups

{

"driveLocationIds": ["00-00","00-01","00-02","00-03","00-04","00-05","00-06","00-07"],

"raidType": "6D+2P"

}

VSP One Administrator API

NA

NA

 

Note: The API request was run using only the mandatory parameters. For information on the usage of optional parameters, see the individual API guides for each of the APIs.

  

 

Creating a Pool (DDP) 

CMREST and Platform REST APIs cannot be used to create pools from parity groups for DDP or to expand and shrink pools created from parity groups for DDP. VSP One Block 20 does not support HDT Pools, Active Flash Pools, and Thin Image Pools.  

API

Coding Example

Input Json File (PoolCreation.json)

Hitachi Ops Center API Configuration Manager REST API

curl -k -v -H "Accept:application/json" -H "Content-Type:application/json" -H "Authorization:Session xxxxxxxxxxxxxxxxxx" -X POST --data-binary @./PoolCreation.json https://192.0.2.100:23451/ConfigurationManager/v1/objects/storages/A3400081XXXX/pools

{

"poolId": 50,

"poolName": "CMREST_Pool",

"startLdevId": 101,

"endLdevId": 105,

"poolType": "HDP"

}

Hitachi VSP One Block Platform REST API

curl -k -v -H "Accept:application/json" -H "Content-Type:application/json" -H "Authorization:Session xxxxxxxxxxxxxxxxxx" -X POST --data-binary @./PoolCreation.json https://192.0.2.100:23451/ConfigurationManager/v1/objects/pools

{

"poolId": 50,

"poolName": "CMREST_Pool",

"startLdevId": 101,

"endLdevId": 105,

"poolType": "HDP"

}

VSP One Administrator API

curl -k -v -H "Accept:application/json" -H "Content-Type:application/json" -H "Authorization:Session xxxxxxxxxxxxxxxxxx" -X POST --data-binary @./PoolCreation.json https://192.0.2.100/ConfigurationManager/simple/v1/objects/pools

{

"name": "Pool-A",

"drives": [

{

"driveTypeCode": "SNB5B-R1R9NC",

"dataDriveCount": 9,

"raidLevel": "RAID6",

"parityGroupType": "DDP"

}

]

}

 

Note: The API request was run using only the mandatory parameters. For information on the usage of optional parameters, see the individual API guides for each of the APIs.

 

Creating a Volume  

For VSP One Block 20, only creation of DRS and DRD volumes is possible through GUI. However, with APIs, we have the flexibility to create regular DP volumes as well.  

API

Coding Example

Input Json File (VolumeCreation.json)

Hitachi Ops Center API Configuration Manager REST API

curl -k -v -H "Accept:application/json" -H "Content-Type:application/json" -H "Authorization:Session xxxxxxxxxxxxxxxxxx" -X POST --data-binary @./VolumeCreation.json https://192.0.2.100:23451/ConfigurationManager/v1/objects/storages/A3400081XXXX/ldevs

{

"poolId": 0,

"byteFormatCapacity": "1G",

"dataReductionMode": "compression_deduplication",

"isDataReductionSharedVolumeEnabled": "True"

}

Hitachi VSP One Block Platform REST API

curl -k -v -H "Accept:application/json" -H "Content-Type:application/json" -H "Authorization:Session xxxxxxxxxxxxxxxxxx" -X POST --data-binary @./VolumeCreation.json https://192.0.2.100/ConfigurationManager/v1/objects/ldevs

{

"poolId": 0,

"byteFormatCapacity": "1G",

"dataReductionMode": "compression_deduplication",

"isDataReductionSharedVolumeEnabled": "True"

}

VSP One Administrator API

curl -k -v -H "Accept:application/json" -H "Content-Type:application/json" -H "Authorization:Session xxxxxxxxxxxxxxxxxx " -X POST --data-binary @./VolumeCreation.json https://192.0.2.100/ConfigurationManager/simple/v1/objects/volumes

{

"capacity": 1000,

"nicknameParam": {

"baseName": "REST_API_1000MVolume"

},

"savingSetting": "DEDUPLICATION_AND_COMPRESSION",

"isDataReductionShareEnabled": "true",

"poolId": 0

}

 

Note: The API request was run using only the mandatory parameters. For information on the usage of optional parameters, see the individual API guides for each of the APIs. 

Hitachi Thin Image Advanced 

Hitachi Thin Image Advanced enables rapid creation of in-system, space-efficient, read/write, volume-consistent snapshots and subsequent rollback of entire volumes.

Thin Image is discontinued on VSP One Block 20 because of performance issues and usage of regular DP volumes. Instead, only Thin Image Advanced is supported, which utilizes DRS volumes. Thin Image Advanced enhances efficiency and provides secure protection for snapshot data. It features non-modifiable and non-removable snapshots, safeguarding against malicious users and ransomware attacks. 

 

API

Coding Example

Input Json File (TIA.json)

Hitachi Ops Center API Configuration Manager REST API

curl -k -v -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization:Session xxxxxxxxxxxxxxxxxx" -X POST --data-binary @./TIA.json https://192.0.2.100:23451/ConfigurationManager/v1/objects/storages/A3400081XXXX/snapshots

{

"snapshotGroupName": "SG1",

"snapshotPoolId": 0,

"pvolLdevId": 0,

"canCascade": "true",

"isDataReductionForceCopy": "true"

}

Hitachi VSP One Block Platform REST API

curl -k -v -H "Accept: application/json" -H "Content-Type: application/json" -H "Authorization:Session xxxxxxxxxxxxxxxxxx " -X POST --data-binary @./TIA.json https://192.0.2.100/ConfigurationManager/v1/objects/snapshots

{

"snapshotGroupName": "SG1",

"snapshotPoolId": 0,

"pvolLdevId": 0,

"canCascade": "true",

"isDataReductionForceCopy": "true"

}

VSP One Administrator API

curl -k -v -H "Accept:application/json" -H "Content-Type:application/json" -H "Authorization:Session xxxxxxxxxxxxxxxxxx " -X POST --data-binary @./TIA.json https://192.0.2.100/ConfigurationManager/simple/v1/objects/snapshots

{

"params": [

{

"masterVolumeId": 0,

"poolId": 0,

"snapshotGroupName": "SG1",

"type": "Snapshot"

}

]

}


Note: The API request was run using only the mandatory parameters. For information on the usage of optional parameters, see the individual API guides for each of the APIs.

Conclusion

This blog provides a brief overview of the three APIs available in VSP One Block 20, as well as the implementation of some of the new VSP One Block 20 features. Depending on the use case, each of the three APIs offers a different set of advantages. VSP One Block 20 provides the flexibility to use different APIs, streamlining and optimizing workload management.

 

References

 For detailed instructions and additional information on all three APIs, see:

Ops Center API Configuration Manager REST API Reference Guide: https://docs.hitachivantara.com/r/en-us/ops-center-api-configuration-manager/11.0.x/mk-99cfm000
Ops Center API Configuration Manager REST API System Requirements:

https://docs.hitachivantara.com/r/en-us/ops-center-api-configuration-manager/11.0.x/mk-99cfm002

 Hitachi Virtual Storage Platform One Block Platform REST API Reference Guide:

https://docs.hitachivantara.com/r/en-us/virtual-storage-platform-5000-series/88-08-12/mk-23vsp1b003

 VSP One Block Administrator API Reference Guide:

https://docs.hitachivantara.com/r/en-us/virtual-storage-platform-one-block/a3-02-2x/mk-23vsp1b002

 How to Register VSP One Block 20 (VSP One B24, B26, and B28) or Pegasus Midrange 2U Storage to the Ops Center CMREST Server in Different Ways:

https://knowledge.hitachivantara.com/Knowledge/Storage/How_to_Register_a_VSP_One_Series_Storage_(VSP_One_B24%2C_B26_and_B28)_or_Pegasus_Midrange_2U_Storage_to_the_Ops_Center_CMREST_Server_in_Different_Ways

0 comments
9 views

Permalink