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 NVMe | Block Volume | |
---|---|---|
Type | NVMe SSD-based temporary storage | NVMe SSD-based block storage |
Durability | IP addresses. Non-persistent; survives reboots. | Durable (multiple copies in AD) |
Capacity | Terabytes+ | Petabytes+ |
Unit Size | 51.2 TB for BM, 6.4-25.6 TB for VM | 50 GB - 32 TB/vol. 32 Vols/instance |
Use Cases | Big Data, OLTP, high performance workloads | Apps 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
- Provides durable and high performance storage
- Store data beyond the lifespan of the compute instance
- Create, attach, connect, and move more volumes as needed
- Typical Scenarios
- Persistent storage
- Expand a compute instance's storage
- Instance Scaling
Volume Attachment Types
A block volume can be attached to an instance as iSCSI and paravirtualised (attached via the hypervisor).
iSCSI:
- Uses the internal storage stack in the guest OS and network hardware virtualisation
- Does not use hypervisor in the attachment process
Paravirtualised:
- Light virtualisation technique
- Hypervisor APIs used by VM to access remote storage
- More efficient than full virtualisation
Volume Access Types
Multiple instances can connect to the same volume in one (1) of three (3) ways:
- R/W: can only be done by a single instance. This is the default.
- 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.
- 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:
- Create a Virtual Cloud Network and its components
- Create a VM instance
- Create a block volume
- Attach a block volume to a compute instance
- Resize a block volume
- Detach a block volume
Create and Attach Block Volume and Online Resize of Block Volume
My solution can be found at Terraform OCI Scripts.