Deploy and manage Block Storage

Summary

Block volumes can be attached to a single compute instance either as a boot volume, or to expand storage. Block volumes can be shared among up to eight (8) compute instances.

Reference

Block Storage - Basics

Summary of Block Storage

Block storage can be summarised as follows:

 Local NVMeBlock Volume
TypeNVMe SSD-based temporary storageNVMe SSD-based block storage
DurabilityIP addresses. Non-persistent; survives reboots.Durable (multiple copies in AD)
CapacityTerabytes+Petabytes+
Unit Size51.2 TB for BM, 6.4-25.6 TB for VM50 GB - 32 TB/vol. 32 Vols/instance
Use CasesBig Data, OLTP, high performance workloadsApps that require SAN like features (Oracle DB, Exchange)

Overview of Block Volume

Block volume is NVMe (Non-Volatile Memory Express) SSD-based storage that is durable (outlives the compute instance). Multiple block volumes can be created, attached, and detached from a compute instance. This allows block volumes to be relocated between compute instances.

NVMe SSD devices can be locally attached for extremely low latency and high performance. But these devices do not outlive the compute instance.

Block Volume Features and Use Cases

Volume Attachment Types

A block volume can be attached to an instance as iSCSI and paravirtualised (attached via the hypervisor).

iSCSI:

Paravirtualised:

Volume Access Types

Multiple instances can connect to the same volume in one (1) of three (3) ways:

  1. R/W: can only be done by a single instance. This is the default.
  2. R/W shareable: Up to eight (8) compute instances can connect to the same block volume. A cluster file system needs to installed in order to prevent data corruption.
  3. R/O shareable:

Boot Volumes

Launching a compute instance creates a new boot volume. On termination of the compute instance, the boot volume can be retained.

This retained boot volume can be used for future launching of compute instances, or for diagnosing boot failures by attaching the boot volume to another compute instance.

Lab

This topic is covered by Lab 12-1: Block Storage: Create, Attach, Detach, and Resize a Block Volume:

Overview

The Oracle Cloud Infrastructure (OCI) Block Volume service lets you dynamically provision and manage block storage volumes. You can create, attach, connect, and move volumes, as well as change volume performance, as needed, to meet your storage, performance, and application requirements.

In this lab, you'll:

  1. Create a Virtual Cloud Network and its components
  2. Create a VM instance
  3. Create a block volume
  4. Attach a block volume to a compute instance
  5. Resize a block volume
  6. Detach a block volume

Create and Attach Block Volume and Online Resize of Block Volume

My solution can be found at Terraform OCI Scripts.