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 storagevolume

This command enables you to create a storage volume.

Note:

You can add only private volumes within your tenancy.

Syntax

oracle-compute add storagevolume name size properties [--description] [--source_storagevolume_name] [--imagelist] [--imagelist_entry] [--tags] [--quota]

Parameters and Options

The following parameters are specific to this command. You can also use the common options described in General Command Options.

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 an 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 the source for this storage volume when its created. This option must be paired with --imagelist_entry to reference a specific machine image.
--imagelist_entry (Optional) Specific image list entry version to extract.
--tags (Optional) A list of user-friendly strings that will tag the storage volume. Tags should be specified by using the 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

$ oracle-compute add storagevolume /demo/public/v2 1G /oracle/public/storage/default --description "1GB volume" --tags 'tag1,tag2'

Sample Output

$ oracle-compute add storagevolume /demo/public/v2 1G /oracle/public/storage/default --description "1GB volume" --tags 'tag1,tag2' -Fstatus,name,size,tags 
status        name           size       tags 
Initializing /demo/public/v2 1073741824 tag1,tag2

delete storagevolume

This command enables you to delete a storage volume.

Note:

You can delete only private volumes within your tenancy.

Syntax

oracle-compute delete storagevolume name

Note:

To delete storage volumes that are attached to instances, you must first detach them by using the oracle-compute delete storageattachment  command.

Parameters and Options

The following parameters are specific to this command. You can also use the common options described in General Command Options.

Parameter Description
name Name of the storage volume

Example

$ oracle-compute delete storagevolume /mytenant/public/v2

update storagevolume

This command enables you to update a storage volume.

Note:

You can update only private volumes within your tenancy.

Syntax

oracle-compute update storagevolume name [--description] [--tags]

Parameters and Options

The following parameters are specific to this command. You can also use the common options described in General Command Options.

Parameter Description
name Name of this storage volume, generated by the server
--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, you must retrieve the existing set, make any desired changes to that list, and then specify that list for the update.

Example

oracle-compute update storagevolume /mytenant/public/vol-u01 --tags ‘my-application-volume-01’

Sample Output

$ oracle-compute update storagevolume /mytenant/public/vol-u01 --tags 'my-application-volume-01' -Fstatus,name,size,status_detail,tags -ftab 
status  status_detail                   name                     size        tags 
Online  The storage volume is online.   /mytenant/public/vol-u01 1073741824     my-application-volume-01

Retrieve Storage Volume Details

You can retrieve storage volume details by using the CLI.

discover storagevolume

This command enables you to retrieve information about existing storage volumes.

Syntax

oracle-compute discover storagevolume container

Parameters and Options

The following parameters are specific to this command. You can also use the common options described in General Command Options.

Parameter Description
container Hierarchical name-space for the storage volume

Example

$ oracle-compute discover storagevolume /mytenant/public

Sample Output

$ oracle-compute discover storagevolume /mytenant/public/ 
entry 
/mytenant/public/demo-em-1_vm1_vol01 
/mytenant/public/demo-em-1_vm1_vol02 
/mytenant/public/demo-em-1_vm2_vol01 
/mytenant/public/demo-em-1_vm2_vol02 
/mytenant/public/vol1

get storagevolume

This command enables you to retrieve storage volume information.

Syntax

oracle-compute get storagevolume name

Parameters and Options

The following parameters are specific to this command. You can also use the common options described in General Command Options.

Parameter Description
name Name of the storage volume

Example

$ oracle-compute get storagevolume /mytenant/public/vol1

Sample Output

$ oracle-compute get storagevolume /mytenant/public/vol1 -Fstatus,name,size,status_detail 

status status_detail                  name                 size 
Online The storage volume is online. /mytenant/public/vol1 1073741824

list storagevolume

This command enables you to retrieve storage volumes from a specific container.

Syntax

oracle-compute list storagevolume container [--tags] [--quota] [--name]

Parameters and Options

The following parameters are specific to this command. You can also use the common options described in General Command Options.

Parameter Description
container Hierarchical name-space for the storage volume
--tags (Optional) A list of user-friendly strings that tag the storage volume
--quota (Optional) The quota against which this volume is created
--name (Optional) Name of this storage volume

Example

$ oracle-compute list storagevolume /mytenant/public/

Sample Output

$ oracle-compute list storagevolume /mytenant/public/ -Fstatus,name,size,tags
status  name                                size         tags
Online /mytenant/public/demo-em-1_vm1_vol01 1073741824 
Online /mytenant/public/demo-em-1_vm1_vol02 1073741824 
Online /mytenant/public/demo-em-1_vm2_vol01 1073741824 
Online /mytenant/public/demo-em-1_vm2_vol02 1073741824 
Online /mytenant/public/vol1 1073741824