14: OCI ‐Block Volume Creation in Oracle Cloud Infrastructure (OCI) - pavankumarchittajallu/OCI_DOC GitHub Wiki

Step-by-Step Process for Block Volume Creation in Oracle Cloud Infrastructure (OCI)

1. Access the OCI Console

  • Open the Oracle Cloud Infrastructure Console.
  • Navigate to the main menu (navigation menu) and select Storage.
  • Under Block Storage, click on Block Volumes.

2. Initiate Block Volume Creation

  • Click the Create Block Volume button to start the creation process.

3. Configure Block Volume Details

In the Create Block Volume dialog, provide the following information:

  • Name: Enter a user-friendly name for the block volume. Avoid confidential information.
  • Compartment: Select the compartment where you want to create the block volume. This defaults to your current compartment but can be changed.
  • Availability Domain: Choose the same availability domain as your target compute instance. The block volume and the instance must be in the same availability domain.
  • Cluster Placement Group: Leave as default (usually "none"). This option may not always appear.
  • Volume Size and Performance:
    • Set the size of the volume (e.g., 50 GB to 32 TB, depending on your requirements and account limits).
    • Choose a performance level (Balanced is default; High Performance is optional if available).
    • Optionally, adjust IOPS and Throughput or use default values.
  • Backup Policy: Optionally select a backup policy (e.g., Oracle-defined bronze, silver, gold, or none).
  • Cross-Region Replication: Set to OFF unless you require cross-region replication.
  • Volume Encryption: Select Encrypt using Oracle-managed keys (default).
  • Tags: Optionally add free-form or defined tags for organization or automation purposes.

4. (Optional) Advanced Configuration

  • For advanced users, you can set additional parameters such as block size, log bias, secondary cache, and VPUs per GB using tags or CLI commands.
  • Example CLI command:
    oci bv volume create --availability-domain AD-1 \
      --compartment-id ocid1.compartment.unique_ID \
      --display-name myblockvolume \
      --size-in-gbs 50 \
      --vpus-per-gb 20 \
      --defined-tags '{"OraclePCA":{"logBias":"THROUGHPUT","secondaryCache":"METADATA"}}' \
      --freeform-tags '{"PCA_blocksize": "65536"}'
    

5. Review and Create

  • Optionally, check the box to View detail page after this block volume is created.
  • Click Create Block Volume to submit the request.

6. Wait for Provisioning

  • OCI will provision the block volume. This typically takes a few moments.

7. Attach the Block Volume to an Instance

  • Once the block volume is available, you can attach it to a compute instance:
    • Go to Compute > Instances.
    • Select your instance.
    • In the Resources section, click Attach block volumes and follow the prompts to complete the attachment.

8. Connect and Mount the Volume on the Instance

  • After attachment, connect to your instance and configure the volume at the operating system level (partition, format, and mount as needed).

Summary Table: Key Steps

Step Action
Access Console Storage > Block Storage > Block Volumes
Create Volume Click "Create Block Volume"
Configure Details Name, Compartment, Availability Domain, Size, Performance, Encryption, Tags, etc.
Advanced Options (Optional) Set block size, log bias, VPUs, etc. via tags or CLI
Review & Create Confirm settings and create the block volume
Attach to Instance Compute > Instances > Select Instance > Attach block volumes
OS Configuration Partition, format, and mount the volume on your instance

This process allows you to dynamically provision, manage, and attach block storage to your OCI compute instances, supporting a wide range of storage and application requirements.