1
0
forked from docs/doc-exports
doc-exports/docs/opengauss/api-ref/opengauss_api_0016.html
Ru, Li Yi d97aea4dd2 opengauss_api
Reviewed-by: Boka, Ladislav <ladislav.boka@t-systems.com>
Co-authored-by: Ru, Li Yi <liyiru7@huawei.com>
Co-committed-by: Ru, Li Yi <liyiru7@huawei.com>
2024-09-06 09:04:21 +00:00

25 KiB

Adding CNs, Adding Shards, or Scaling Up Storage

Function

This API is used to add CNs, add shards, or scale up storage. Before calling this API:

Constraints

  • Adding CNs
    • The maximum number of CNs is 256.
    • If you choose the single-AZ deployment during instance creation, add CNs in the same AZ.
  • Adding shards
    • The shard growth increment ranges from 1 to 64.
    • The maximum number of shards is 256.
  • Scaling up Storage
    • The storage space must be a multiple of (Number of shards x 40 GB).
    • All nodes must be available.

URI

Request

  • Parameter description
    Table 2 Parameter description

    Name

    Mandatory

    Type

    Description

    expand_cluster

    No

    Object

    This parameter is mandatory when you add CNs or shards.

    For details, see Table 3.

    enlarge_volume

    No

    Object

    New storage space after scaling up. This parameter is mandatory for scaling up storage.

    For details, see Table 6.

    Table 3 expand_cluster field data structure description

    Name

    Mandatory

    Type

    Description

    coordinators

    No

    Array of Coordinators objects

    This parameter is mandatory for adding CNs. For details, see Table 4.

    shard

    No

    Shard object

    This parameter is mandatory for adding shards. For details, see Table 5.

    Table 4 coordinators parameter description

    Name

    Mandatory

    Type

    Description

    az_code

    Yes

    string

    AZs to which CNs are to be added. If multiple CNs need to be added, enter the AZ where each CN is located.

    Table 5 shard parameter description

    Name

    Mandatory

    Type

    Description

    count

    Yes

    integer

    Number of shards to be added.

    Table 6 enlarge_volume field data structure description

    Name

    Mandatory

    Type

    Description

    size

    Yes

    Integer

    Storage space, which must always be a multiple of (Number of shards x 40 GB). Value range: (Number of shards x 40 GB) to (Number of shards x 16 TB).

Example Request

  • Adding a CN
    {
        "expand_cluster": {
            "coordinators": [
                {
                    "az_code": "eu-de-01"
                }
            ]
        }
    }
  • Adding multiple CNs
    {
        "expand_cluster": {
            "coordinators": [
                {
                    "az_code": "eu-de-01"
                },
                {
                    "az_code": "eu-de-01"
                },
                {
                    "az_code": "eu-de-01"
                }
            ]
        }
    }
  • Adding a DN shard
    {
        "expand_cluster": {
            "shard": {
                "count": 1
            }
        }
    }
  • Scaling up storage to 400 GB
    {
        "enlarge_volume": {
            "size": 400
        }
    }

Response

  • Normal response
    Table 7 Parameter description

    Name

    Type

    Description

    job_id

    String

    Task ID. This parameter is returned when your instance is billed at a pay-per-use basis.

  • Example normal response
    {
    	"job_id": "2b414788a6004883a02390e2eb0ea227"
    }
  • Abnormal response

    For details, see Abnormal Request Results.

Status Code

Error Code

For details, see Error Codes.