Creating a snapshot

Storage Advisor Embedded User Guide

Version
93-07-2x
88-08-12
Audience
anonymous
Part Number
MK-97HM85022-25

The following request creates a snapshot for backing up data or for re-purposing the backed up data. This request also allows you to clone a snapshot.

Execution permission

Storage Administrator (Local Copy)

Request line

POST base-URL/simple/v1/objects/snapshots

Request message

Object ID
None.
Query parameters
None.
Body

The following is an example of cloning a snapshot from the master volume (ID 100, snapshot group name: snapshotGroup) in the , in the pool with ID 13. In this example, a snapshot group (snapshot name: snapshotGroup) is also created at the same time.

{
  "params": [
    {
      "masterVolumeId": 100,
      "poolId": 13,
      "snapshotGroupName": "snapshotGroup",
      "type": "Snap Clone"
    }
  ]
}

The following is an example of cloning a snapshot from the master volume (ID 100, snapshot group name: snapshotGroup): in the , in the pool with ID 13.

{
  "params": [
    {
      "masterVolumeId": 100,
      "poolId": 13,
      "snapshotGroupName": "snapshotGroup",
      "type": "Snapshot"
    }
  ]
}

The following is an example of cloning a snapshot from the master volume (ID 100, snapshot group name: snapshotGroup) in the , in the pool with ID 13. In this example, the volume ID is also defined for the volume to create from the snapshot.

{
  "params": [
    {
      "masterVolumeId": 100,
      "poolId": 13,
      "snapshotGroupName": "snapshotGroup",
      "type": "Mapped Snapshot"
    }
  ]
}

Attribute

Type

Description

params

object[]

Information about a snapshot to create

  • masterVolumeId (int)

    (Required) Specify the ID of the master volume from which snapshots are created, as an integer from 0 through 65279.

  • poolId (int)

    (Required) Specify the ID of the pool in which the differential data of the snapshot is stored as an integer in the range from 0 through 127.

    If the usage rate of the pool exceeds the depletion threshold value, snapshots including the created snapshot might become unusable. Make sure that there is enough free space in the specified pool.

    Tiered pools cannot be specified.

    To check the usage rate of the pool and whether the pool has a tiered structure, run the API function for getting information about a specific pool by specifying a pool ID.

    If a volume shares data reduction with snapshots, specify the pool ID to which the volume belongs.

    For details about a volume that shares data reduction with snapshots, see the Hitachi Thin Image Advanced User Guide.

  • snapshotGroupName (string)

    (Required) Specify a snapshot group name of up to 32 characters.

    You can use alphanumeric characters (0 through 9, A through Z, a through z), space characters, and the following symbols:

    Comma (,), hyphen (-), period (.), forward slash (/), colon (:), at sign (@), back slash (\), underscore (_)

    This attribute is case-sensitive.

    You can use a space character between characters, but cannot use it at the beginning or end of the snapshot group name.

    When getting detailed information or using an API request that supports changing the configuration (an API request that does not include simple in the request line), if the snapshot group name includes a space character, you cannot get snapshot group name and information about snapshots.

    You cannot use a hyphen (-) at the beginning of the snapshot group name.

    If you specify a new snapshot group name, a snapshot group of that name will be created when the request is run.

  • type (string)

    (Required) Snapshot type:

    • Snap Clone: Create a volume by Snap Clone.

      If the volume shares data reduction with snapshots, this value cannot be specified.

    • Snapshot: Create a snapshot.
    • Mapped Snapshot: Create a snapshot, and define a volume ID for the snapshot.

    If Snap Clone or Mapped Snapshot is specified for this attribute, a nickname is automatically assigned, in the following applicable format, to the volume that is created from the snapshot.

    If Snap Clone is specified:
    "Clone of ID:ID-of-master-volume-created-from-snapshot"
    If Mapped Snapshot is specified:
    "Snapshot of ID:ID-of-master-volume-created-from-snapshot"
  • destinationSize (int)

    (Optional) Specify the capacity of the volume for which the snapshot is created as an integer from 47 through 268435456.

    Specify a value greater than the capacity of the master volume from which the snapshot is created. You can specify this attribute only when Snap Clone is specified for the type attribute.

    If this attribute is omitted but Snap Clone is specified for the type attribute, a value equal to the capacity of the master volume from which the snapshot is created is assumed.

Response message

Body

Attribute

Type

Description

statusResource

string

URL used to obtain the results of the create snapshot request

Note:

Run the API function for obtaining information about the status of the API function that performs asynchronous processing. For details, see Getting status information about an API function that performs asynchronous processing.

Status codes

See HTTP status codes.

Coding example

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