Creating a Block Volume

On Compute Cloud@Customer, block volumes are detachable block storage devices that you can use to dynamically expand the storage capacity of an instance.

During the block volume creation, you can optionally use free-form tags to change the following block volume parameter:

Volume Block size
The default value is 8192 bytes. To change the value, specify a value in bytes for the PCA_blocksize free-form tag. Supported values are a power of 2 between 512 bytes and 1 megabyte, specified as a string and fully expanded. We recommend setting the value to at least 8192 bytes.
The block size can't be changed after the volume has been created.
See Using Free-Form Tags for Extended Functionality.

(Optional) To create a block volume with nondefault values for the following attributes, first configure the required tags as described in Creating OraclePCA Tags. Then use the following information when you create the block volume.

  • Synchronous Write Bias

    You can configure the write cache flash devices for a share or LUN ("Logzilla"). The value can be changed later by updating the block volume.

    To use a nondefault value, during block volume creation, assign this defined tag:

    • Tag namespace: OraclePCA
    • Tag name: logBias
    • Value (select one): LATENCY (default) or THROUGHPUT
  • Secondary Cache

    You can configure the use of the read cache flash devices for a share or LUN ("Readzilla"). The value can be changed later by updating the block volume.

    To use a nondefault value, during block volume creation, assign this defined tag:

    • Tag namespace: OraclePCA
    • Tag name: secondaryCache
    • Value (select one): ALL (default), METADATA, or NONE

Avoid entering confidential information in names and tags.

    1. In the Compute Cloud@Customer Console navigation menu, click Block Storage, then click Block Volumes.
    2. Click Create Block Volume.

    3. Provide the following volume information:

      • Name: Provide a name or description for the volume. Avoid entering confidential information.

      • Compartment: Select the compartment in which to create the block volume.

      • Size (in GBs): The default size of 1024 GB is shown. To change the size, enter a value from 50 to 32768 (50 GB to 32 TB).

      • High Performance Volume: (Optional) By default, the volume uses balanced performance. To create a block volume that uses the high performance feature, click the Enable High Performance button. You can only select high performance volumes if such volumes are available. For more information, see Block Volume Performance Options.

        This selection can't be changed after the volume is created.

      • Backup Policy: (Optional) Select a backup policy from the drop-down list. You might need to change the compartment.

        Oracle defined policies are listed, and any user defined policies. For information about Oracle defined policies (bronze, silver, and gold) see Oracle Provided Backup Policies.

        Backup policies can be assigned or changed after the volume is created. A volume can only have only one volume backup policy assigned at a time. For information about creating, editing, and assigning backup policies, see Managing Backup Policies. You can also back up this volume manually as described in Creating a Manual Boot or Block Volume Backup.

      • Tagging: (Optional) Add one or more tags to this resource. Tags can also be applied later. For more information about tagging resources, see Resource Tags.

        To use nondefault values for the block size, write bias, or secondary cache, specify the appropriate tags to set the values for these attributes. See Adding Tags at Resource Creation.

    4. Click Create Block Volume.

      The volume is ready to attach to an instance after its icon lists the volume in the Available state. See Attaching a Volume.

  • Use the oci bv volume create command and required parameters to create a volume.

    oci bv volume create --availability-domain <availability_domain_name> --compartment-id <compartment_OCID>  [OPTIONS]

    For a complete list of CLI commands, flags, and options, see the Command Line Reference.

    To use nondefault values for the block size, write bias, or secondary cache, specify the appropriate tags to set the values for these attributes. See Adding Tags at Resource Creation.

    Procedure

    1. Gather the information that you need to run the command:

      • Availability domain name (oci iam availability-domain list)

      • Compartment OCID (oci iam compartment list)

    2. Run the volume create command.

      This procedure doesn't show all available parameters for this command. For information about additional parameters, run the command with the --help option.

      Example:

      This example specifies VPUs, log bias, secondary cache, and volume block size.

      VPUs per Gigabyte Option

      The value of the --vpus-per-gb option is the number of volume performance units (VPUs) that will be applied to this volume per GB. The default value for vpus-per-gb is 10, for balanced volume performance. For higher performance, you can specify 20 VPUs/GB. You can only select high performance volumes if such volumes are available. For more information, see Block Volume Performance Options.

      VPUs per GB can't be changed after the volume is created.

      You can't auto-tune volumes.

      Example:

      $ oci bv volume create --availability-domain AD-1 --compartment-id compartment_OCID --display-name myblockvolume --size-in-gbs 50 --vpus-per-gb 20 --defined-tags '{"OraclePCA":{"logBias":"THROUGHPUT","secondaryCache":"METADATA"}}' 
      --freeform-tags '{"PCA_blocksize": "65536"}'
      {
        "data": {
          "auto-tuned-vpus-per-gb": null,
          "autotune-policies": null,
          "availability-domain": "AD-1",
          "block-volume-replicas": null,
          "compartment-id": "ocid1.compartment.
                              unique_ID
                           ",
          "defined-tags": {
            "OraclePCA": {
              "logBias": "THROUGHPUT",
              "secondaryCache": "METADATA"
            }
          },
          "display-name": "myblockvolume",
          "freeform-tags": {},
               "PCA_blocksize": "65536"
          },
          "id": "ocid1.volume.
                              unique_ID
                           ",
          "is-auto-tune-enabled": null,
          "is-hydrated": null,
          "kms-key-id": null,
          "lifecycle-state": "PROVISIONING",
          "size-in-gbs": 50,
          "size-in-mbs": 51200,
          "source-details": null,
          "system-tags": null,
          "time-created": "2022-12-08T21:05:36.647925+00:00",
          "volume-group-id": null,
          "vpus-per-gb": 20
        },
        "etag": "08d0abc9-60c6-4fc7-b6fe-85d0af1c0308",
        "opc-work-request-id": "ocid1.workrequest.
                              unique_ID
                           "
      }

      A vpus-per-gb value of 10 indicates that this is a balanced performance volume. A vpus-per-gb value of 20 indicates that this is a high performance volume.

      When the volume is in the AVAILABLE state, you can attach the volume to an instance. See Attaching a Volume.

  • Use the CreateVolume operation to create a block volume.

    For information about using the API and signing requests, see REST APIs and Security Credentials. For information about SDKs, see Software Development Kits and Command Line Interface.