Managing Storage Volumes

Storage volumes are pieces of storage of specific size created in the storage pool. You can attach them to an instance, either in an orchestration or after the instance has been launched.

Add Storage Volume

This API enables you to add a storage volume.

Method

POST

Note:

You can add only private volumes within your tenancy.

REST Resource

/storage/volume/

URI

https://api_endpoint/storage/volume/

Request Body Parameters

Parameter Description
name Name of this storage volume.

Object names can contain only alphanumeric characters, hyphens, and periods. Object names are case-sensitive.

size The size of this storage volume measured in the number of bytes or multiples of bytes. The allowed range is from 1 GB to 2 TB, in increments of 1 GB.

Use one of the following abbreviations as the unit of measurement:

  • B or b (bytes)

  • K or k (kilobytes)

  • M or m (megabytes)

  • G or g (gigabytes)

  • T or t (terabytes).

For example, to create a volume of size 10 gigabytes, you can specify 10G, or 10240M, or 10485760K, and so on.

properties A list of the storage properties that are associated with this storage volume.

The following storage properties are supported:

  • /oracle/public/storage/default—Default storage property for internal storage appliance.

  • /oracle/public/storage/latency—Storage property for placing volumes on external storage appliance.

  • /oracle/public/storage/throughput—Storage property for placing volumes on external storage appliance.

For information on setting up storage volumes on external storage appliances, see section Managing Storage Volumes in Using Oracle Compute Cloud Service.

description (Optional) Description of the storage volume
source_storagevolume_name (Optional) Name of the existing storage volume, from where the data will be copied when this volume is created
imagelist (Optional) Name of the image list to use as source for this storage volume when created. This option must be paired with imagelist_entry in order to reference a specific machine image.
imagelist_entry (Optional) Specific the image list entry version to extract
tags (Optional) A list of user-friendly strings which will tag the storage volume. Tags should be specified in the following syntax: "tags": ["tag1", "tag2"]
quota (Optional) The quota against which this volume will be created.  If the quota is not specified, then the default quota of the tenancy (to which the user belongs) is used.

Example URI

https://api.oc.example.com/storage/volume/

Example Request Body

{
  "size": "10G",
  "properties": [
    "/oracle/public/storage/default"
  ],
  "name": "/mytenant/public/vol1"
}

Example Response Body

{
 "status": "Initializing",
 "account": "/mytenant/default",
 "writecache": false,
 "managed": true,
 "description": null,
 "tags": [],
 "bootable": false,
 "hypervisor": null,
 "quota": null,
 "uri": "https://api.oc.example.com/storage/volume/mytenant/public/vol1",
 "status_detail": "The storage volume is currently being initialized.",
 "imagelist_entry": -1,
 "storage_pool": "/mytenant/public/mypool",
 "machineimage_name": null,
 "status_timestamp": "2015-06-01T11:15:57Z",
 "shared": false,
 "imagelist": null,
 "size": "10737418240",
 "properties": ["/oracle/public/storage/default"],
 "name": "/mytenant/public/vol1"
}

Delete Storage Volume

This API enables you to delete a specific storage volume.

Method

DELETE

Note:

You can delete only private volumes within your tenancy.

REST Resource

/storage/volume/name

URI

https://api_endpoint/storage/volume/name

URI Parameter

Parameter Description
name Name of the storage volume

Example URI

https://api.oc.example.com/storage/volume/mytenant/public/vol1

Update Storage Volume

This API enables you to update a specific storage volume.

Method

PUT

REST Resource

/storage/volume/name

URI

https://api_endpoint/storage/volume/name

URI Parameter

Parameter Description
name Name of this storage volume

Request Body Parameter

Parameter Description
description (Optional) Description of this storage volume
tags (Optional) A list of user-friendly strings that will tag the storage volume. During an update, the list of tags specified becomes the new list. To preserve existing tags, the existing set must first be retrieved and any changes should be made to that list, and then that list must be specified for the update.

Example URI

https://api.oc.example.com/storage/volume/mytenant/public/vol1

Example Request Body

{
 "description": "Updated Storage Volume",
 "tags": ["Accounting Department Block Storage"],
}

Example Response Body

{
 "status": "Online",
 "account": "/mytenant/default",
 "writecache": false,
 "managed": true,
 "description": "Updated Storage Volume",
 "tags": ["Accounting Department Block Storage"],
 "bootable": false,
 "hypervisor": null,
 "quota": null,
 "uri": "https://api.oc.example.com/storage/volume/mytenant/public/vol1",
 "status_detail": "The storage volume is online.",
 "imagelist_entry": -1,
 "storage_pool": "/mytenant/public/mypool",
 "machineimage_name": null,
 "status_timestamp": "2015-06-01T11:16:04Z",
 "shared": false,
 "imagelist": null,
 "size": "10737418240",
 "properties": ["/oracle/public/storage/default"],
 "name": "/mytenant/public/vol1"
}

Retrieve Storage Volume Details

You can retrieve storage volume details by using the REST API.

Discover Storage Volumes

This API enables you to discover storage volumes in a specific container.

Note:

The discover API calls display the names of the objects in the specified container, not the details about the objects. To list the names of the objects, you must set the Accept header to application/oracle-compute-v3+directory+json. For all other purposes, you must set the Accept header to application/oracle-compute-v3+json.

Method

GET

REST Resource

/storage/volume/container

URI

https://api_endpoint/storage/volume/container/

URI Parameter

Parameter Description
container Hierarchical namespace for storage volume.

Example URI

https://api.oc.example.com/storage/volume/mytenant/public/

Example Response Body

{
  "result": [
    "/mytenant/public/vol1"
  ]
}

Get Storage Volume

This API enables you to retrieve information for a specific storage volume.

Method

GET

REST Resource

/storage/volume/name

URI

https://api_endpoint/storage/volume/name

URI Parameter

Parameter Description
name Name of the storage volume

Example URI

https://api.oc.example.com/storage/volume/mytenant/public/vol1

Example Response Body

{
 "status": "Online",
 "account": "/mytenant/default",
 "writecache": false,
 "managed": true,
 "description": null,
 "tags": [],
 "bootable": false,
 "hypervisor": null,
 "quota": null,
 "uri": "https://api.oc.example.com/storage/volume/mytenant/public/vol1",
 "status_detail": "The storage volume is online.",
 "imagelist_entry": -1,
 "storage_pool": "/mytenant/public/mypool",
 "machineimage_name": null,
 "status_timestamp": "2015-06-01T11:16:04Z",
 "shared": false,
 "imagelist": null,
 "size": "10737418240",
 "properties": ["/oracle/public/storage/default"],
 "name": "/mytenant/public/vol1"
}

List Storage Volumes

This API enables you to list storage volumes.

Method

GET

REST Resource

/storage/volume/container

URI

https://api_endpoint/storage/volume/container?tags=tagsValue&quota=quotaValue&name=nameValue

URI Parameter

Note:

The output of this command is filtered based on the optional parameters (if specified).
Parameter Description
container Hierarchical namespace for the storage volume
tags=tagsValue (Optional) A list of user-friendly strings which tag the storage volume
quota=quotaValue (Optional) The quota against which this volume is created
name=nameValue (Optional) Name of storage volume

Example URI

https://api.oc.example.com/storage/volume/mytenant/public/

Example Response Body

{"result": [
{
 "status": "Online",
 "account": "/mytenant/default",
 "writecache": false,
 "managed": true,
 "description": null,
 "tags": [],
 "bootable": false,
 "hypervisor": null,
 "quota": null,
 "uri": "https://api.oc.example.com/storage/volume/mytenant/public/vol1",
 "status_detail": "The storage volume is online.",
 "imagelist_entry": -1,
 "storage_pool": "/mytenant/public/mypool",
 "machineimage_name": null,
 "status_timestamp": "2015-06-01T11:16:04Z",
 "shared": false,
 "imagelist": null,
 "size": "10737418240",
 "properties": ["/oracle/public/storage/default"],
 "name": "/mytenant/public/vol1"
}
]
}