• Elastic Volume Service

evs
  1. Help Center
  2. Elastic Volume Service
  3. API Reference
  4. OpenStack Cinder API v2
  5. EVS Disk Actions
  6. Expanding the Capacity of an EVS Disk

Expanding the Capacity of an EVS Disk

Function

This API is used to expand the capacity of an EVS disk.

  • If the status of the to-be-expanded disk is available, there are no restrictions.
  • If the status of the to-be-expanded disk is in-use, the restrictions are as follows:
    • The shared disk cannot be expanded, that is, the value of parameter multiattach must be false.
    • The status of the ECS to which the disk attached must be ACTIVE, PAUSED, SUSPENDED, or SHUTOFF.

URI

  • URI format

    POST /v2/{project_id}/volumes/{volume_id}/action

  • Parameter description

    Parameter

    Mandatory

    Description

    project_id

    Yes

    Specifies the project ID.

    volume_id

    Yes

    Specifies the ID of the EVS disk.

Request

  • Parameter description

    Parameter

    Type

    Mandatory

    Description

    os-extend

    map<string, string>

    Yes

    Specifies to expand the EVS disk capacity.

  • Parameter in the os-extend field

    Parameter

    Type

    Mandatory

    Description

    new_size

    int

    Yes

    Specifies the disk capacity after expansion. The disk capacity after expansion must be greater than that before expansion.

  • Example request
    {
        "os-extend": {
            "new_size": 100
        }
    }

Response

  • Parameter description

    Parameter

    Type

    Description

    message

    string

    Specifies the returned error message when an error occurs.

    code

    string

    Specifies the returned error code when an error occurs.

    For details about the error code, see Error Codes.

  • Example response

    None

    or

    {
        "error": {
            "message": "XXXX", 
            "code": "XXX"
        }
    }

    In the preceding example, error indicates a general error, for example, badRequest or itemNotFound. An example is provided as follows:

    {
        "badRequest": {
            "message": "XXXX", 
            "code": "XXX"
        }
    }

Returned Values

  • Normal

    202

Error Codes

For details, see Error Codes.