• SAP HANA

saphana
  1. Help Center
  2. SAP HANA
  3. User Guide (API)
  4. Creating a HANA ECS
  5. Creating an EVS Disk as a Data Disk

Creating an EVS Disk as a Data Disk

For detailed API information, see Native OpenStack API Reference.

API Format

Method

URI

Description

POST

/v2/{tenant_id}/volumes

Submits the request for creating a volume.

API Description

When creating a data volume for an ECS or HANA ECS, ensure that the EVS disk type matches the ECS or HANA ECS type. For example, if a HANA ECS is of the e flavor type, such as e1.xlarge, the volume_type value must be uh-l1 (IB+SSD) or co-p1 (IB+SATA). For other types of ECSs or HANA ECSs, the volume_type value can be SATASAS, or SSD.

Before provisioning a HANA ECS, you must create log and data volumes for it. Based on application scenarios, you must create a shared EVS disk with a specified size as the data volume of the HANA ECS. For details, see section Deployment Scenarios.

Request Parameters

Name

Type

Mandatory

Description

volume

map<string,string>

Yes

Specifies the EVS disk to be created.

availability_zone

string

Yes

Specifies the AZ where the disk is to be created. If the AZ does not exist, the disk creation will fail.

source_volid

string

No

Specifies the ID of the source EVS disk. If this parameter is specified, a new EVS disk is cloned from the source EVS disk. Currently, this function is not supported.

description

string

No

Specifies the EVS disk description. The value contains a maximum of 255 bytes.

snapshot_id

string

No

Specifies the ID of a snapshot. If this parameter is specified, the EVS disk is created from the snapshot.

size

int

Yes

Specifies the EVS disk size, in GB.

  • If the EVS disk is created using an image, the disk size must be greater than or equal to the image size.
  • If the EVS disk is created from a snapshot, the disk size must be greater than or equal to the snapshot size.

name

string

No

Specifies the EVS disk name. The value contains a maximum of 255 bytes.

imageRef

string

No

Specifies the ID of an image. If this parameter is specified, the EVS disk is created from an image.

NOTE:

Bare Metal Server (BMS) system disks cannot be created from BMS images.

volume_type

string

No

Specifies the EVS disk type.

Currently, the value can be SSDSASSATAco-p1, or  uh-l1.
  • SSD: specifies the ultra-high I/O disk type.
  • SAS: specifies the high I/O disk type.
  • SATA: specifies the common I/O disk type.
  • co-p1: specifies the high I/O (performance-optimized I) disk type.
  • uh-l1: specifies the ultra-high I/O (latency-optimized) disk type.

    EVS disks of the co-p1 and uh-l1 types are used exclusively for high performance computing (HPC) and SAP HANA Elastic Cloud Servers (ECSs).

If the specified EVS disk type is not available in the AZ, the disk will fail to create.

NOTE:
  • If the EVS disk is created from a snapshot, the volume_type field must be the same as that of the source EVS disk of the snapshot.

metadata

map<string, string>

No

Specifies the EVS disk metadata. The length of key or value in the metadata cannot exceed 255 bytes.

NOTE:

Parameter values under metadata cannot be null.

source_replica

string

No

If this parameter is specified, the disk is created from a disk clone. Currently, this function is not supported.

consistencygroup_id

string

No

Specifies the ID of the consistency group. If this parameter is specified, the disk belongs to this consistency group. Currently, this function is not supported.

shareable

string

No

Specifies whether the EVS disk is shareable. The value can be true (sharable) or false (not sharable). This is an extended attribute. 

NOTE:

This field is no longer used. Use multiattach.

multiattach

boolean

No

Specifies a shared disk. The default value is false.

NOTE:

Specifying either two of the source_volidsnapshot_id, and imageRef fields is not supported.

  • Description of metadata fields

    Name

    Type

    Mandatory

    Description

    __system__encrypted

    string

    No

    Specifies the encryption function in the metadata. The value can be 0 (encryption function disabled) or 1 (encryption function enabled).

    If this parameter does not exist, the EVS disk is not encrypted by default.

    __system__cmkid

    string

    No

    Specifies the cmkid encryption field in the metadata. This field is used together with the __system__encrypted field for encryption. The cmkid field has a fixed length of 36 bytes.

    NOTE:

    For details about how to obtain the CMK ID, see section Querying the List of CMKs in the Key Management Service API Reference.

    hw:passthrough

    string

    No

    • If this parameter is set to true, the disk device type will be SCSI, that is, Small Computer System Interface (SCSI), which allows ECS OSs to directly access underlying storage media. SCSI reservation command is supported.
    • If this parameter is set to false, the disk device type will be VBD, that is, Virtual Block Device (VBD), which supports only simple SCSI read and write commands.
    • If this parameter does not exist, the disk device type will be VBD by default.
      NOTE:

      If parameter shareable is set to true and parameter hw:passthrough is not specified, shared EVS disks with device type VBD are created.

    full_clone

    string

    No

    If the EVS disk is created from a snapshot and the linked cloning method is used, set this parameter to 0.

    NOTE:
    • If the EVS disk is created from a snapshot, the __system__encrypted and __system__cmkid fields are not supported, and the newly created disk has the same encryption attribute as that of the source EVS disk of the snapshot.
    • If the EVS disk is created from an image, the __system__encrypted and __system__cmkid fields are not supported, and the newly created disk has the same encryption attribute as that of the image.
    • If the EVS disk is created from a snapshot, the hw:passthrough field is not supported, and the newly created disk has the same attribute as that of the source EVS disk of the snapshot.
    • If the EVS disk is created from an image, the hw:passthrough field is not supported, and the device type of newly created disk is VBD.

Response Parameters

Name

Type

Mandatory

Description

volume

map<string, string>

Yes

Specifies the created EVS disk.

id

string

Yes

Specifies the EVS disk ID.

links

array

Yes

Specifies the URI of the disk.

name

string

No

Specifies the EVS disk name.

status

string

Yes

Specifies the EVS disk status.

attachments

array

No

Specifies the attachment information.

availability_zone

string

Yes

Specifies the AZ to which the EVS disk belongs.

bootable

string

No

Specifies whether the EVS disk is bootable.

encrypted

Boolean

No

Specifies whether the disk is encrypted.

created_at

string

Yes

Specifies the time when the EVS disk was created.

description

string

No

Specifies the EVS disk description.

volume_type

string

Yes

Specifies the EVS disk type.

replication_status

string

Yes

Specifies the disk replication status.

consistencygroup_id

string

No

Specifies the ID of the consistency group accommodating the disk.

source_volid

string

No

Specifies the source disk ID.

snapshot_id

string

No

Specifies the snapshot ID.

metadata

map<string, string>

Yes

Specifies the metadata.

size

int

Yes

Specifies the EVS disk size.

user_id

string

Yes

Specifies the ID of the user that uses the disk.

updated_at

string

No

Specifies the time when the EVS disk information is updated.

shareable

Boolean

Yes

Specifies whether the EVS disk is shareable.

multiattach

Boolean

Yes

Specifies whether the EVS disk is shareable.

Request Example (Creating a Data Volume for a HANA ECS or NFS Server)

NOTE:
  • When creating such a volume, set volume_type to uh-l1 or co-p1.
  • When creating log and data volumes for a HANA ECS, ensure that shareable volumes are used as data volumes. Therefore, the value of shareable can only be true.

POST /v2/5dd0b0056f3d47b6ab4121667d35621a/volumes
{
   "volume": {
       "name": "studioserver_logvol",
      "availability_zone": "aaa",//aaa is used as an example of the AZ.
       "description": "create for hana",
       "volume_type": "uh-l1",
       "multiattach":true,
       "size":64,
       "metadata":{"hw:passthrough":"true"}
                 }
}

Request Example (Creating a Data Volume for an SAP HANA Studio ECS or NAT Server)

NOTE:
  • When creating such a volume, the volume_type value can be SATASAS, or SSD.
  • In general scenarios, do not use a shareable volume as the data volume of the SAP HANA Studio or NFS server.

POST /v2/5dd0b0056f3d47b6ab4121667d35621a/volumes
{
    "volume": {
      "name": "studioserver_vol",
      "availability_zone": "aaa",//aaa is used as an example of the AZ.
      "description": "create for hana",
      "volume_type": "SATA",
      "multiattach": false,
       "size": 100
    }
}

Response Example

{
    "volume": {
      "attachments": [],
      "availability_zone": "aaa",//aaa is used as an example of the AZ.
      "bootable": "false",
      "consistencygroup_id": null,
      "created_at": "2016-05-25T02:38:40.392463",
      "description": "create for api test",
      "encrypted": false,
      "id": "8dd7c486-8e9f-49fe-bceb-26aa7e312b66",
      "links": [
         {
           "href": "https://volume.localdomain.com:8776/v2/5dd0b0056f3d47b6ab4121667d35621a/volumes/8dd7c486-8e9f-49fe-bceb-26aa7e312b66",
"rel": "self"
         },
         {
           "href": "https://volume.localdomain.com:8776/5dd0b0056f3d47b6ab4121667d35621a/volumes/8dd7c486-8e9f-49fe-bceb-26aa7e312b66",
"rel": "bookmark"
        }
    ],
    "metadata": {
       "volume_owner": "openapi"
     },
      "name": "openapi_vol01",
      "replication_status": "disabled",
      "multiattach": false,
      "size": 40,
      "snapshot_id": null,
      "source_volid": null,
      "status": "creating",
      "updated_at": null,
      "user_id": "39f6696ae23740708d0f358a253c2637",
      "volume_type": "SATA"
   }
}