Creating a Block Volume

This is the first task you perform to create and attach block volumes to an instance on Compute Cloud@Customer.

During the block volume creation, use free-form tags to change these block volume parameters:

  • Block volume size properties
  • Synchronous write bias
  • Secondary cache

To set values for the synchronous write bias and secondary cache, you must use the CLI.

See Free-Form Tags Used for Extended Functionality.

Avoid entering confidential information in names and tags.

    1. On the Compute Cloud@Customer Console Dashboard, click Block Storage/View 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.

        This selection cannot 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. If you aren't sure whether to apply tags, skip this option (you can apply tags later). For more information about tagging resources, see Resource Tags.

    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.

    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.

      Syntax:

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

      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. 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.

      Synchronous Write Bias and Secondary Cache Properties

      Synchronous Write Bias and Secondary Cache properties can be set by using defined tags. Specify the OraclePCA tag namespace. To set a value for the Synchronous Write Bias, specify logBias for the tag key. To set a value for the Secondary Cache, specify secondaryCache for the tag key. See Adding Tags at Resource Creation for the syntax to specify a defined tag.

      The logBias or Synchronous Write Bias property controls the use of the write cache flash devices for a share or LUN ("Logzilla"). The value of the logBias property must be either LATENCY or THROUGHPUT. If this value isn't set, the value LATENCY is used.

      The secondaryCache property controls the use of the read cache flash devices for a share or LUN ("Readzilla"). The value of the secondaryCache property must one of ALL, METADATA, or NONE. If this value isn't set, the value ALL is used.

      The values of the logBias and secondaryCache properties can be changed with the update command.

      Volume Block Size Property

      The volume block size can be set by using the PCA_blocksize free-form tag. The default block size is 8192 bytes. To specify a different block size, specify a value in bytes for the PCA_blocksize tag. Supported values are a power of 2 between 512 bytes and 1 megabyte, specified as a string and fully expanded. Note that we recommend setting the value to at least 8192 bytes. See Adding Tags at Resource Creation for the syntax to specify a free-form tag.

      The block size can't be changed after the volume has been created.

      $ 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.