• Native OpenStack API

noa
  1. Help Center
  2. Native OpenStack API
  3. Developer Guide
  4. Development Guide
  5. Application Scenarios of EVS Disks
  6. Creating an EVS Disk

Creating an EVS Disk

Guidelines

  • You can create an empty EVS data disk, create an EVS system disk using an image, and create an EVS disk using a backup.
  • After creating an empty EVS data disk, do not perform operations on other EVS disks until the EVS data disk status becomes Available.
  • After creating an EVS system disk using an image, do not perform operations on other disks until the EVS system disk status changes from Downloading to Available.
  • After creating an EVS disk using a backup, do not perform operations on other EVS disks until the EVS disk status changes from Restoring to Available.

Interface Invoking Procedure

You can create an EVS disk separately according to the API description of native OpenStack.

POST /v2/{tenant_id}/volumes

Parameters

Parameter

Type

Mandatory

Description

availability_zone

String

Yes

Specifies the availability zone (AZ) of the EVS disk to be created. If the AZ does not exist, the EVS disk creation will fail, and the disk status changes to error. For details about the AZs, see section "Regions and Endpoints" in the Native OpenStack API Reference.

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.

description

String

No

Provides supplementary information about the EVS disk.

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

No

If the EVS disk is created directly or from an image, this parameter is mandatory. If the EVS disk is cloned from a source disk, this parameter is optional.

Specifies the size of the EVS disk, in the unit of GB. The data disk size cannot be smaller than 100 GB. In addition, the EVS disk that is created using an image or backup, the size cannot be smaller than the min_disk value of the image.

name

String

No

Specifies the name of the EVS disk.

imageRef

String

No

Specifies the ID of an image in Glance. If this parameter is specified, the EVS disk is created from the image. For details about the IDs, see descriptions of "List Image API" in the Native OpenStack API Reference.

volume_type

String

No

Specifies the type of the EVS disk. Only SATA, SAS, and SSD disks are supported currently. If the created EVS disk is not one of these three types, the EVS disk will be in the error state.

metadata

Dict

No

Specifies the metadata of the EVS disk. The key value cannot be billing, resourceType, or resourceSpecCode.

source_replica

Uuid

No

Specifies the source backup. If this parameter is specified, the EVS disk is created using the backup.

consistencygroup_id

Uuid

No

Specifies the ID of the consistency group. If this parameter is specified, the EVS disk belongs to this consistency group.

scheduler_hints

String

No

Specifies scheduling information.

shareable

Boolean

No

Specifies whether the EVS disk is shareable. This parameter is an extended attribute.

Request Example

{

"volume": {

"availability_zone": "eu-de-01",

"description": "this is a test description",

"size": 120,

"name": "test_disk"

}

}