Category
Storage
1. Introduction
Oracle Cloud Block Volume is Oracle Cloud Infrastructure (OCI) block storage service that lets you provision durable storage volumes and attach them to compute instances (and other services) as raw block devices—similar to adding a new disk to a server.
In simple terms: you create a Block Volume, attach it to a VM, format it with a filesystem (or use it as a raw disk for databases), and your application can read/write data with predictable performance.
Technically, OCI Block Volume provides network-attached block storage with configurable size and performance characteristics, integration with OCI Compute, encryption by default, backups, and replication options for resilience. Volumes are generally created in an availability domain (AD) and attached to instances in the same AD, while backups are stored regionally and can be restored across ADs (verify current regional/AD behavior in official docs for your region).
What problem it solves: persistent, durable, scalable storage for workloads that need a “disk” abstraction—databases, application servers, stateful Kubernetes pods, boot/root disks, and enterprise applications—without managing SAN hardware or complex storage arrays.
Service name note: The current OCI service is commonly referred to as Block Volume (under Block Storage). Related capabilities include Boot Volumes, Backups, Clones, Volume Groups, and Replication. Verify the latest naming in OCI documentation if your console shows slightly different labels.
2. What is Block Volume?
Official purpose
OCI Block Volume is a managed block storage service designed to provide persistent, durable storage volumes that you can attach to OCI compute instances and use like physical disks.
Official docs (entry point):
https://docs.oracle.com/en-us/iaas/Content/Block/home.htm
Core capabilities
- Provision block volumes with a chosen size (GB/TB range; exact min/max vary—verify limits in docs for your region).
- Attach/detach volumes to instances (typically within the same availability domain).
- Online resize (increase volume size; filesystem expansion is handled in the OS).
- Backups (manual and policy-based) and restores.
- Clones (fast copies, depending on feature and region support).
- Replication for disaster recovery (where supported).
- Encryption at rest by default; customer-managed keys integration via OCI Vault (where configured).
Major components (conceptual model)
- Block Volume: A data volume you attach to compute instances.
- Boot Volume: The root disk for an OCI compute instance (also part of the Block Volume family).
- Volume Attachment: The relationship between a volume and an instance (iSCSI or paravirtualized, depending on OS/shape support).
- Backup / Backup Policy: Point-in-time protection stored as a managed backup (backups are incremental after the first full, per OCI design—verify details in docs).
- Volume Group / Volume Group Backup: Manage and back up multiple volumes together for application-consistent recovery patterns (app consistency still typically needs OS/app coordination).
- Replication: Keeps a replica of a volume in a different region or domain (depending on your chosen replication type and regional capabilities).
Service type
- Managed infrastructure storage service (IaaS storage).
- Accessed through OCI Console, OCI CLI, SDKs, Terraform, and APIs.
Scope: regional vs. availability domain
Common OCI behavior (verify for your region): – Volumes are created in an Availability Domain and attach to instances in the same AD. – Backups are regional, enabling restore into other ADs in the region. – Cross-region copy/replication is available via features like cross-region backup copy or block volume replication (feature availability can vary).
How it fits into the Oracle Cloud ecosystem
Block Volume is a core OCI Storage building block and commonly integrates with: – OCI Compute (VM/Bare Metal instances) – OCI Container Engine for Kubernetes (OKE) via CSI drivers for persistent volumes – OCI Backup policies and tagging/governance – OCI Vault for customer-managed encryption keys – OCI Monitoring and Logging/Audit for operational visibility and governance
3. Why use Block Volume?
Business reasons
- Avoid owning/operating on-prem SAN/NAS hardware.
- Pay for storage capacity and performance characteristics as you scale.
- Improve recovery posture using backups and replication rather than manual disk imaging.
Technical reasons
- Get a disk-like abstraction suitable for databases and stateful workloads.
- Choose performance characteristics (for example, via performance units / performance levels—verify current performance options).
- Attach/detach volumes to move workloads or perform recovery.
Operational reasons
- Automation via Terraform/CLI/SDK.
- Standardized backup policies and lifecycle management.
- Easier migrations: mount volumes, copy data, snapshot/backup, restore.
Security/compliance reasons
- Encryption at rest by default and secure access via IAM.
- Audit trails for API actions via OCI Audit.
- Strong compartment-based isolation and tagging for governance.
Scalability/performance reasons
- Scale capacity without redeploying instances.
- Use multiple volumes, striping (e.g., RAID 0/10 in OS), or volume groups for throughput and management.
- Use replication/backups to support RPO/RTO objectives.
When teams should choose it
Choose Block Volume when you need: – Persistent storage for compute instances – Database storage (Oracle Database, PostgreSQL, MySQL, etc.) – Stateful Kubernetes workloads on OKE – Boot disk management and golden images/workflow improvements via boot volumes and backups
When they should not choose it
Avoid Block Volume when: – You need shared POSIX file access across many instances without cluster-aware software → use OCI File Storage. – You need object semantics (HTTP API, lifecycle tiering, static website, huge scale) → use OCI Object Storage. – You need ultra-low latency, local ephemeral scratch space → consider local NVMe on bare metal/selected VM shapes (ephemeral; data loss on instance termination). – Your application expects multi-writer shared disk without a cluster filesystem/manager → multi-attach/shared block requires careful architecture (verify support).
4. Where is Block Volume used?
Industries
- Financial services (databases, risk engines, regulatory retention via backups)
- SaaS and ISVs (stateful services, multi-tenant apps)
- Healthcare (EHR systems with encryption and audit needs)
- Retail/e-commerce (transactional workloads and caching layers)
- Manufacturing and telecom (OT data collection, analytics staging)
- Public sector (strict security controls and compartmentalization)
Team types
- Platform engineering teams standardizing storage patterns
- DevOps/SRE teams operating compute fleets
- Security teams enforcing encryption, IAM, and audit controls
- Database administrators building predictable storage layouts
- Kubernetes teams needing persistent volumes
Workloads
- OLTP databases and transaction systems
- ERP/CRM application servers
- CI/CD runners needing durable caches/artifacts (careful: object storage may be better)
- Logging pipelines staging data before object storage/analytics
- Enterprise middleware with filesystem requirements
Architectures
- Single instance + attached volume (simple stateful VM)
- Multi-tier app where DB uses block volumes and app tier is stateless
- OKE clusters using block volumes for PVs
- DR architectures using backup copy/replication across regions
Real-world deployment contexts
- Production: performance and backup policies, encryption keys, monitoring, DR design
- Dev/test: smaller volumes, fewer backups, short retention, aggressive cleanup automation
5. Top Use Cases and Scenarios
Below are realistic scenarios where OCI Block Volume is a strong fit.
1) Database data files on dedicated volumes
- Problem: Databases need durable storage with predictable IOPS/throughput.
- Why Block Volume fits: Block devices map well to database storage layouts; you can tune performance and separate data/logs.
- Example: Oracle Database on OCI Compute uses multiple Block Volumes: one for datafiles, one for redo logs, one for backups.
2) Boot volume management for golden images and rollback
- Problem: You need safer OS patching and rollback.
- Why it fits: Boot volumes can be backed up and restored; you can detach/attach in recovery scenarios.
- Example: Before patching a fleet, take boot volume backups; roll back by restoring if patch fails.
3) Stateful application server (single VM)
- Problem: App needs local disk persistence across restarts.
- Why it fits: Attach a Block Volume and mount it to
/var/lib/app. - Example: A licensing server stores its state on a mounted volume so the VM can be replaced without losing data.
4) Kubernetes persistent volumes on OKE
- Problem: Pods need persistent storage beyond node lifecycle.
- Why it fits: OKE can provision OCI Block Volumes via CSI for persistent volumes.
- Example: A PostgreSQL StatefulSet uses a PV backed by Block Volume; rescheduling retains the volume.
5) High-throughput workload using OS-level striping
- Problem: One volume isn’t enough throughput for analytics staging.
- Why it fits: Use multiple volumes and RAID 0 (or LVM striping) for higher throughput (at the cost of complexity).
- Example: ETL worker uses 4 volumes striped for fast temporary staging, combined with backups as needed.
6) Application-consistent backups using volume groups
- Problem: App writes to multiple disks; backups must be coordinated.
- Why it fits: Volume groups help manage multiple volumes and backups together (application consistency still needs quiescing).
- Example: A middleware stack uses separate volumes for binaries, data, and logs; a coordinated backup policy covers all.
7) Disaster recovery via replication or cross-region backup copy
- Problem: Need RPO/RTO across regions.
- Why it fits: Replication/cross-region backup copy supports DR architectures.
- Example: Primary region hosts production; secondary region holds replicated volumes for failover.
8) Lift-and-shift from on-prem VM disks
- Problem: Migrating VMs and their disk layouts to cloud.
- Why it fits: Block Volumes resemble on-prem SAN LUNs; you can rebuild the filesystem/mount layout similarly.
- Example: Migrate a 3-tier app: convert and import OS image, then attach new data volumes and restore from backups.
9) Secure, isolated storage per environment/tenant
- Problem: Need environment isolation and auditability.
- Why it fits: Compartment scoping, IAM policies, and encryption with Vault keys.
- Example: Each customer tenant gets a compartment with its own Block Volumes and customer-managed keys.
10) Forensics and incident response (disk capture)
- Problem: Need to preserve disk state for analysis.
- Why it fits: Detach volumes, take backups, and attach clones to isolated forensic instances (permissions controlled).
- Example: Security team clones a suspected compromised volume into an isolated compartment for investigation.
11) Batch processing scratch with controlled persistence
- Problem: Jobs need scratch space but want data preserved for a limited time.
- Why it fits: Create volumes per job, attach during run, then delete after retention window.
- Example: A nightly batch job writes intermediate data to a temporary volume; volume is deleted after 7 days.
12) Enterprise middleware with strict filesystem semantics
- Problem: Vendor software requires a block device and supports specific filesystems.
- Why it fits: You can present a block device and mount with the vendor-approved filesystem and mount options.
- Example: An enterprise content management system stores indexes on XFS on a dedicated volume.
6. Core Features
Feature availability can vary by region, shape/OS, or tenancy settings. Verify the latest details in the official docs: https://docs.oracle.com/en-us/iaas/Content/Block/home.htm
6.1 Block volumes (data volumes)
- What it does: Provides persistent block devices that you attach to instances.
- Why it matters: Enables durable state for workloads.
- Practical benefit: Add storage without rebuilding the instance.
- Caveats: Attachment constraints (commonly same AD); maximum attachments per instance and volume size limits are quota/shape dependent (verify).
6.2 Boot volumes
- What it does: Stores the OS disk used to boot OCI compute instances.
- Why it matters: Boot disk durability, backups, and restore workflows improve operational safety.
- Practical benefit: Safer patching and rollback; rebuild instances while keeping boot volume snapshots/backups.
- Caveats: Boot volume behavior differs from data volumes in lifecycle; verify detach/attach rules for your OS image and shape.
6.3 Volume attachments (paravirtualized and iSCSI)
- What it does: Connects a volume to an instance either via iSCSI or paravirtualized device.
- Why it matters: Affects performance, OS device naming, and operational procedures.
- Practical benefit: Paravirtualized attachments are often simpler on supported platforms; iSCSI provides broad compatibility.
- Caveats: Your OS and instance shape determine supported attachment types; iSCSI requires configuring initiator/CHAP where applicable (verify).
6.4 Online resizing (capacity expansion)
- What it does: Lets you increase a volume size without recreating it.
- Why it matters: Capacity planning becomes less risky.
- Practical benefit: Expand storage as data grows; then expand filesystem in OS.
- Caveats: Typically you can expand but not shrink; filesystem expansion steps differ by filesystem (ext4 vs XFS) and partitioning.
6.5 Performance tuning (performance levels / VPUs)
- What it does: Lets you choose performance characteristics for a volume (commonly via performance levels or performance units).
- Why it matters: Aligns cost with workload needs.
- Practical benefit: Use lower-cost performance for dev/test, higher performance for databases.
- Caveats: Exact options (e.g., “Lower Cost / Balanced / Higher Performance” and VPU rates) can change—verify current performance tier definitions and limits.
6.6 Backups (manual and scheduled via policies)
- What it does: Creates point-in-time backups stored in OCI-managed storage.
- Why it matters: Core data protection and recovery mechanism.
- Practical benefit: Restore into new volumes; keep retention policies consistent.
- Caveats: Backups are not the same as application-consistent snapshots unless the app is quiesced; consider consistent backup methods for databases.
6.7 Backup copy across regions
- What it does: Copies backups to another region for DR.
- Why it matters: Protects against regional outages and supports compliance requirements.
- Practical benefit: Restore volumes in another region during disaster recovery tests.
- Caveats: Adds storage and network-related costs; RPO depends on backup schedule and copy latency.
6.8 Clones
- What it does: Creates a new volume from an existing volume/backup (implementation details vary).
- Why it matters: Fast provisioning for dev/test, blue/green patterns.
- Practical benefit: Quickly create a test environment from a production-like dataset.
- Caveats: Copy-on-write behavior, performance during initial period, and billing model should be validated in docs.
6.9 Volume groups
- What it does: Logical grouping of multiple volumes for coordinated operations (like group backups).
- Why it matters: Many enterprise apps span multiple disks.
- Practical benefit: Simplifies consistent backup/restore operations across multiple volumes.
- Caveats: True application consistency still requires coordination at OS/application layer.
6.10 Replication (where supported)
- What it does: Maintains a replica in another location (region/domain) for DR.
- Why it matters: Supports lower RPO than backup-only.
- Practical benefit: Faster recovery workflows if replication is continuously maintained.
- Caveats: Costs and supported replication topologies vary—verify replication types and limits.
6.11 Encryption by default + customer-managed keys
- What it does: Encrypts data at rest; optionally use keys from OCI Vault.
- Why it matters: Reduces risk of data exposure and supports compliance.
- Practical benefit: Meet encryption requirements without custom tooling.
- Caveats: Key rotation and key deletion policies must be designed to avoid data loss (if you delete a key, data can become unrecoverable).
6.12 Governance: compartments, tags, quotas, and audit
- What it does: Use OCI governance controls to manage storage sprawl.
- Why it matters: Storage often grows silently and becomes a cost/security risk.
- Practical benefit: Chargeback via tags, enforce budgets/quotas, audit all actions.
- Caveats: Requires disciplined naming/tagging and IAM design.
7. Architecture and How It Works
7.1 High-level architecture
Block Volume is a managed storage service that exposes volumes as attachable block devices. Your instance reads/writes blocks; OCI handles replication and durability behind the scenes (implementation details are managed by OCI).
Key operational idea: control plane vs data plane – Control plane: Create volume, attach/detach, backup, restore, update performance—via API/Console/CLI. – Data plane: Reads/writes from the instance to the volume through the attachment mechanism (paravirtualized or iSCSI).
7.2 Request/data/control flow (typical)
- Admin provisions a volume in a compartment and availability domain.
- Admin attaches it to a compute instance.
- OS discovers a new block device.
- Admin partitions/formats/mounts it (or database uses raw device).
- Application reads/writes; OCI provides durability.
- Backups are scheduled or taken on-demand.
- For restore, create a new volume from backup and attach it.
7.3 Integrations with related OCI services
- OCI Compute: Primary consumer of block volumes.
- OKE (Kubernetes): Persistent volumes through OCI CSI drivers (check OKE docs for current CSI driver details).
- OCI Vault: Customer-managed keys for encryption.
- OCI Identity and Access Management (IAM): Policies to control volume and backup operations.
- OCI Monitoring: Metrics for volume performance and attachment health (verify exact metrics available).
- OCI Events + Notifications: React to backup completion or volume state changes (verify event types).
- OCI Audit: Logs all API calls to create/attach/detach/back up volumes.
7.4 Dependency services
- IAM (authentication/authorization)
- Networking (VCN) for instances (volume attachment traffic is managed; instances still require VCN for management, updates, app traffic)
- Key management (Vault) if using customer-managed keys
7.5 Security/authentication model
- OCI API calls are authorized by IAM policies scoped to compartments.
- Authentication typically uses:
- User + API key (for CLI/SDK)
- Instance principals (recommended for code running on OCI instances)
- Resource principals (for some OCI services)
7.6 Networking model
- Attachments are performed within OCI’s infrastructure. From your perspective:
- Paravirtualized appears as a device in the OS.
- iSCSI appears as an iSCSI target; OS initiator connects (details vary).
- Network security lists/NSGs primarily govern VCN traffic to/from instances, not the internal storage fabric.
7.7 Monitoring/logging/governance considerations
- Monitoring: Track volume performance metrics and errors; set alarms for saturation or unusual latency (verify exact metric names).
- Audit: Use OCI Audit to trace volume lifecycle events.
- Tagging: Enforce tags like
CostCenter,Environment,DataClassification. - Quotas: Prevent runaway cost by limiting total block volume capacity per compartment.
7.8 Architecture diagrams
Simple architecture (single instance with Block Volume + backups)
flowchart LR
U[Admin / CI-CD] -->|OCI API/Console/CLI| CP[OCI Control Plane]
CP --> BV[(Block Volume)]
CP --> BK[(Block Volume Backup)]
VM[Compute Instance] -->|Attach| BV
VM -->|Read/Write Blocks| BV
CP -->|Create/Restore| BV
Production-style architecture (app + DB volumes + backup policy + DR copy)
flowchart TB
subgraph RegionA["OCI Region A"]
subgraph AD1["Availability Domain 1"]
APP[App Tier VM/Pool]:::compute
DB[(DB VM)]:::compute
V1[(Block Volume: DB Data)]:::storage
V2[(Block Volume: DB Logs)]:::storage
APP --> DB
DB --> V1
DB --> V2
end
BP[Backup Policy / Scheduler]:::control
BK1[(Backups - Regional)]:::storage
BP --> BK1
V1 --> BK1
V2 --> BK1
end
subgraph RegionB["OCI Region B (DR)"]
BK2[(Backup Copy / DR Backups)]:::storage
DRVM[(Restore VM)]:::compute
DRVOL[(Restored Block Volumes)]:::storage
BK2 --> DRVOL
DRVM --> DRVOL
end
BK1 -->|Cross-region copy (scheduled)| BK2
classDef compute fill:#eef,stroke:#336,stroke-width:1px;
classDef storage fill:#efe,stroke:#363,stroke-width:1px;
classDef control fill:#fee,stroke:#633,stroke-width:1px;
8. Prerequisites
Tenancy and account requirements
- An active Oracle Cloud tenancy with billing enabled (unless staying fully within Free Tier).
- Access to an OCI region that supports Compute and Block Volume.
Permissions / IAM roles
You need permissions to manage volumes and attachments in the target compartment.
Common IAM policy patterns (examples; adjust compartment/group names):
Allow group StorageAdmins to manage volume-family in compartment MyCompartment
Allow group StorageAdmins to manage volume-attachments in compartment MyCompartment
Allow group StorageAdmins to manage instances in compartment MyCompartment
Notes:
– volume-family typically covers volumes, backups, volume groups (verify exact policy verbs/resources in IAM docs).
– You might separate duties (e.g., backup operators vs compute operators) in production.
Billing requirements
- You may incur charges for:
- Provisioned volume capacity
- Provisioned performance tier (if priced separately)
- Backups and cross-region copies
- Check pricing before running production-scale tests.
Tools needed
Choose one path: – OCI Console (browser) for manual lab steps. – OCI CLI for repeatable commands: https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/cliinstall.htm – Optional: Terraform OCI provider for infrastructure-as-code: https://registry.terraform.io/providers/oracle/oci/latest/docs
Region availability
- Block Volume is broadly available, but specific features (replication types, performance tiers) can vary.
- Verify in docs and in your region’s console.
Quotas/limits
Expect limits around: – Total block volume capacity per compartment/tenancy – Number of volumes – Number of attachments per instance – Backup retention or backup counts (policy-based limits)
Use OCI Limits/Quotas pages in your tenancy and verify the current service limits in official documentation.
Prerequisite services for the lab
- Compute instance (Oracle Linux recommended for a smooth walkthrough)
- VCN/Subnet for the instance (you can use existing networking)
9. Pricing / Cost
Pricing changes and is region-dependent. Do not rely on copied numbers from blogs. Use official sources.
Official pricing resources
- OCI pricing landing and price list: https://www.oracle.com/cloud/price-list/
- OCI cost estimator/calculator (if available in your locale): https://www.oracle.com/cloud/costestimator.html (verify current URL/availability)
- OCI Free Tier: https://www.oracle.com/cloud/free/
Pricing dimensions (how you are billed)
Block Volume cost typically depends on: 1. Provisioned capacity (GB-month) 2. Performance (may be included or priced via performance units/tier—verify your region’s SKUs) 3. Backups (GB-month of backup storage) 4. Backup copy / cross-region copy (GB-month in destination + any associated transfer/copy charges per OCI pricing model) 5. Replicated volumes (if using replication, you pay for source and replica storage, and possibly replication-related charges)
Free tier considerations
Oracle Cloud Free Tier often includes limited “Always Free” resources. Free-tier limits can change and may vary by region.
Verify current Block Volume Always Free allocations on: https://www.oracle.com/cloud/free/
Key cost drivers
- Overprovisioning capacity: Paying for TBs you don’t use.
- Backups with long retention: Backups accumulate; retention policies matter.
- High performance tiers everywhere: Use higher performance only where required.
- Forgotten unattached volumes: Detached volumes still incur storage cost.
- Cross-region DR storage: Doubles (or more) storage footprint.
Hidden or indirect costs
- Compute costs for instances used to copy/restore/test DR.
- Operational overhead: monitoring/alerting time, DR drills.
- Data transfer: OCI often prices egress; cross-region copy/storage has its own pricing. Validate current policies for intra-region and inter-region transfer charges.
Network/data transfer implications
- Volume attachment traffic is not the same as internet egress, but inter-region operations (backup copy/DR) can introduce billable data movement depending on OCI pricing rules.
Always verify with the official price list for “Data Transfer” and “Block Volume” SKUs.
How to optimize cost (practical)
- Right-size volume capacity; expand only when needed.
- Use lower-cost performance for dev/test.
- Use backup policies with short retention for non-prod (e.g., daily backups retained 7 days) and longer retention only where required.
- Periodically audit for:
- unattached volumes
- stale backups
- volumes in unused compartments
- Tag everything and use OCI cost analysis tools for chargeback.
Example low-cost starter estimate (no fabricated numbers)
A minimal lab typically includes: – 1 small compute instance (possibly Free Tier eligible) – 1 small Block Volume (e.g., tens of GB) – 1 manual backup – Run for a few hours and then delete everything
To estimate: 1. Look up Block Volume capacity GB-month price in your region. 2. Multiply by provisioned GB and fraction of month used. 3. Add backup GB-month for the created backup. 4. Add compute costs (or confirm Always Free coverage).
Example production cost considerations
For production, model: – Total data volume size (TB) – Expected annual growth – Performance requirements (tier/units) – Backup retention (daily/weekly/monthly) and compliance retention – Cross-region DR footprint (duplicate storage + backup copies) – DR testing (compute runtime + restored volumes during tests)
10. Step-by-Step Hands-On Tutorial
Objective
Provision an OCI Block Volume, attach it to a Linux compute instance, format and mount it, write data, take a backup, and then clean up safely.
Lab Overview
You will: 1. Create a Block Volume in the same availability domain as your instance. 2. Attach the Block Volume using a paravirtualized attachment (or iSCSI if required). 3. Partition/format/mount the volume on the instance. 4. Validate read/write and persistence across reboot. 5. Create a manual backup. 6. Detach and delete resources to avoid ongoing charges.
This lab is designed to be low-risk and low-cost, but any non-free resource can incur charges if left running.
Step 1: Prepare a compartment, network, and Linux instance
Option A (recommended for beginners): Use OCI Console
1. In OCI Console, choose (or create) a compartment like lab-storage.
2. Ensure you have a VCN/subnet and can SSH to an instance.
3. Create a small Linux instance:
– Image: Oracle Linux (or another supported Linux)
– Ensure you can SSH in (upload public key)
4. Note:
– Instance OCID
– Availability Domain
– Compartment OCID
– Region
Expected outcome: You can SSH into the instance.
Verify (from your laptop):
ssh -i /path/to/private_key opc@<public_ip>
If you cannot SSH, fix networking/SSH keys before continuing.
Step 2: Create a Block Volume (Console method)
- Go to Storage → Block Volumes.
- Select the same compartment as your instance.
- Click Create Block Volume.
- Choose:
– Availability Domain: must match the instance’s AD (common requirement; verify in your region)
– Name:
lab-bv-01– Size: choose a small size suitable for lab – Performance: choose default/balanced unless you have a reason – Encryption: default is enabled; optionally select a Vault key if your org requires it
Click Create.
Expected outcome: The volume state becomes Available.
Verify: In the volume details page, confirm:
– Lifecycle state: AVAILABLE
– Size and AD are correct
Step 3: Attach the Block Volume to the instance
- Open the Block Volume
lab-bv-01. - Click Attached Instances → Attach to Instance.
- Select your instance.
- Attachment type: – Prefer Paravirtualized if offered for your instance/OS. – Otherwise choose iSCSI and follow the iSCSI commands provided by OCI.
Click Attach.
Expected outcome: The attachment shows as Attached.
Verify on the instance (Linux):
lsblk
Look for a new disk (commonly something like sdb/sdc or an OCI-specific device path). If you don’t see it immediately, wait 30–60 seconds and run lsblk again.
Step 4: Partition and format the volume (Linux)
If you plan to use the entire disk as a single filesystem, you can create one partition and format it. For database workloads, you might use raw devices or ASM instead—this lab uses a filesystem.
- Identify the new disk:
lsblk -o NAME,SIZE,TYPE,MOUNTPOINT
Assume the new disk is /dev/sdb (yours may differ).
- Create a GPT partition table and a single partition:
sudo parted /dev/sdb --script mklabel gpt
sudo parted /dev/sdb --script mkpart primary 0% 100%
- Format it (XFS example):
sudo mkfs.xfs -f /dev/sdb1
Expected outcome: A filesystem is created successfully.
Verify:
sudo blkid /dev/sdb1
You should see a UUID and TYPE="xfs".
Step 5: Mount the filesystem and make it persistent
- Create a mount point:
sudo mkdir -p /mnt/labdata
- Mount it:
sudo mount /dev/sdb1 /mnt/labdata
- Write test data:
echo "Hello from OCI Block Volume" | sudo tee /mnt/labdata/hello.txt
sudo cat /mnt/labdata/hello.txt
- Make mount persistent via
/etc/fstabusing UUID:
VOL_UUID=$(sudo blkid -s UUID -o value /dev/sdb1)
echo "UUID=${VOL_UUID} /mnt/labdata xfs defaults,nofail 0 2" | sudo tee -a /etc/fstab
- Test
fstab:
sudo umount /mnt/labdata
sudo mount -a
df -h | grep labdata
sudo cat /mnt/labdata/hello.txt
Expected outcome: The volume mounts successfully and data is readable.
Step 6: Reboot to confirm persistence
sudo reboot
After the instance comes back:
df -h | grep labdata
sudo cat /mnt/labdata/hello.txt
Expected outcome: The filesystem is mounted after reboot and the file is still there.
Step 7: Create a manual backup (Console)
- Go to the Block Volume details page.
- Click Create Backup.
- Name:
lab-bv-01-backup-01 - Create.
Expected outcome: Backup lifecycle state transitions to AVAILABLE after completion.
Verify: Storage → Block Volume Backups → confirm the backup exists and is AVAILABLE.
Validation
Use this checklist:
– lsblk shows the attached disk and partition.
– df -h shows /mnt/labdata mounted.
– /mnt/labdata/hello.txt exists after reboot.
– A Block Volume backup exists and is available.
Troubleshooting
Issue: Volume not visible in lsblk
- Wait 30–60 seconds and retry.
- Confirm the volume is attached in OCI Console.
- Confirm the volume and instance are in the same availability domain (common requirement).
- If iSCSI attachment was used, ensure you executed OCI-provided iSCSI connect commands.
Issue: mount: unknown filesystem type
- You may not have formatted the correct device/partition.
- Re-check device names with
lsblk. - Verify filesystem tools installed (e.g.,
xfsprogsfor XFS).
Issue: mount -a fails after editing /etc/fstab
- Use UUID-based entry (recommended).
- Ensure no typos in filesystem type or mount point.
- Consider adding
nofailfor non-critical mounts; for critical mounts, omitnofailand use strict monitoring.
Issue: Permission denied when writing
- Mount point is owned by root; use
sudoor change ownership:
sudo chown -R opc:opc /mnt/labdata
echo "test" > /mnt/labdata/test.txt
Cleanup
To avoid ongoing costs, remove resources you created.
- On the instance, unmount:
sudo umount /mnt/labdata
- In OCI Console:
– Detach the volume from the instance (Compute → Instance → Attached block volumes → Detach), or from the volume page.
– Delete the backup (Block Volume Backups → delete
lab-bv-01-backup-01) – Delete the Block Volume (lab-bv-01) – Optionally terminate the compute instance (if created only for the lab)
Expected outcome: No remaining block volumes or backups in the compartment.
11. Best Practices
Architecture best practices
- Separate volumes by function for databases:
- datafiles
- logs/redo
- temp
- backups (or use Object Storage)
- Prefer restoring from backups into new volumes rather than overwriting existing volumes.
- Use volume groups for multi-volume applications to simplify coordinated operations.
IAM/security best practices
- Use least privilege:
- Separate “volume admins” from “compute admins” if required.
- Allow only backup operators to manage backups.
- Use compartments to isolate environments (prod vs non-prod).
- Consider customer-managed keys (Vault) for regulated workloads—ensure key lifecycle policies are well-defined.
Cost best practices
- Enforce mandatory tags:
Environment,Owner,CostCenter,Retention. - Use quotas to prevent uncontrolled volume provisioning.
- Remove unattached volumes and expired backups regularly.
- Choose performance tiers intentionally; avoid defaulting everything to highest performance.
Performance best practices
- Benchmark with your own workload (fio/db benchmarks) before committing to a tier.
- Use multiple volumes with striping only if operationally justified.
- Align block size and filesystem options with workload patterns (small random I/O vs large sequential).
Reliability best practices
- Use backups + cross-region strategy aligned to RPO/RTO.
- Test restores regularly (DR drills).
- Consider replication for lower RPO if supported and cost-justified.
Operations best practices
- Monitor volume performance and attachment health.
- Use consistent naming:
prd-db01-data-01,prd-db01-logs-01- Automate provisioning and backups (Terraform + backup policies).
- Document runbooks: attach/detach steps, restore steps, key recovery procedures.
Governance/tagging/naming best practices
- Standard tags:
DataClassification: Public/Internal/Confidential/RestrictedBackupPolicy: Gold/Silver/BronzeApp: AppName- Naming conventions that embed environment and purpose.
- Use OCI Audit to review sensitive actions (detach, delete backup, delete volume).
12. Security Considerations
Identity and access model
- Use OCI IAM policies with compartment scoping.
- Avoid giving broad permissions like
manage all-resourcesto storage operators. - For automation on instances, prefer instance principals over embedding user API keys (verify best practice guidance in OCI IAM docs).
Encryption
- Encryption at rest is enabled by default for Block Volume.
- For regulated workloads, use customer-managed keys with OCI Vault:
- Define key rotation policies
- Ensure key access policies and break-glass procedures exist
- Understand the impact of disabling/deleting keys (can render data unrecoverable)
OCI Vault: https://docs.oracle.com/en-us/iaas/Content/KeyManagement/home.htm
Network exposure
- Block volumes are attached within OCI infrastructure; you don’t expose them directly to the internet.
- Your main network exposure is the instance:
- Lock down SSH (use bastion, restrict CIDRs, use NSGs)
- Patch OS and disable unnecessary services
Secrets handling
- Don’t store credentials on the volume in plaintext.
- Use OCI Vault secrets where appropriate (verify service fit and runtime integration).
Audit/logging
- OCI Audit logs volume lifecycle actions (create, update, attach, detach, delete).
- Ensure Audit is enabled/retained per compliance requirements:
- centralize logs
- restrict access
- set alerts for risky actions (e.g., delete backup)
Audit overview: https://docs.oracle.com/en-us/iaas/Content/Audit/home.htm
Compliance considerations
- Map controls to your requirements:
- encryption at rest
- access control
- retention policies
- DR testing evidence
- Use compartments and tagging to demonstrate data segregation and ownership.
Common security mistakes
- Using overly broad IAM permissions for storage admins.
- Leaving old backups indefinitely (risk + cost).
- Not restricting who can delete volumes/backups.
- Losing control of customer-managed keys (no documented rotation/break-glass).
Secure deployment recommendations
- Use least privilege policies.
- Enforce tag-based governance.
- Implement backup policies with tested restore procedures.
- For high-risk environments, require approvals (process) for delete operations and key operations.
13. Limitations and Gotchas
Limits vary by region/tenancy and can change. Confirm with official docs and your tenancy limits pages.
- Availability domain coupling: Volumes often must be created in and attached within the same AD as the instance.
- Cannot shrink volumes (commonly): You can typically expand but not shrink; shrinking requires migration to a new smaller volume.
- Filesystem expansion is your job: OCI expands the block device; you must expand partitions/filesystems in the OS.
- Device naming changes: Linux device names (
/dev/sdb,/dev/sdc) can change after reboots/reattach—use UUIDs in/etc/fstab. - Backups are not automatically app-consistent: You may need app/database quiescing or native backup tooling.
- Unattached volumes still cost money: Detaching doesn’t stop billing.
- Backup retention creep: Policy misconfiguration can silently grow backup storage costs.
- Replication/DR feature availability: Replication options and topology support can vary; verify before designing DR.
- Multi-attach/shared block complexity: If using shared attachments, you need cluster-aware filesystems/volume managers and strict operational discipline (verify OCI shared block support and limits).
- Quota surprises: You can hit limits on volume count, attachment count, or total GB unexpectedly during automation runs.
14. Comparison with Alternatives
Within Oracle Cloud (OCI)
- Object Storage: Best for unstructured objects, backups, logs, static assets, and massive scale via HTTP APIs.
- File Storage: Best for shared POSIX file systems across multiple instances.
- Local NVMe (ephemeral): Best for scratch, caches, and ultra-low latency; data can be lost if the instance is terminated or fails.
- Database services (managed): Sometimes using Autonomous Database or managed DB services reduces the need to manage block storage directly (but you still need to understand it for surrounding systems).
Other cloud equivalents
- AWS EBS
- Azure Managed Disks
- Google Persistent Disk
Self-managed alternatives
- On-prem SAN/NAS arrays
- Ceph RBD (block), GlusterFS (file), or similar distributed storage
- LVM/RAID on local disks (no managed durability)
Comparison table
| Option | Best For | Strengths | Weaknesses | When to Choose |
|---|---|---|---|---|
| OCI Block Volume | Persistent disks for VMs/OKE stateful apps | Durable, managed, encryption, backups, automation | AD attachment constraints, backup/DR design required | You need a reliable “disk” for compute/database/stateful pods |
| OCI Boot Volume | OS/root disk lifecycle | Backup/restore for OS, standard VM boot disk | Not a shared storage solution | OS management, rollback, image-like workflows |
| OCI File Storage | Shared POSIX filesystem | Multi-client access, simpler shared data | Not ideal for DB raw block patterns | Shared app data, home dirs, shared assets |
| OCI Object Storage | Unstructured objects and archives | Massive scale, lifecycle tiering, HTTP access | Not block semantics; app changes often needed | Backups, logs, media, data lakes |
| Local NVMe (OCI) | High-speed ephemeral scratch | Very low latency/high throughput | Not durable; operational risk | Caches, temp scratch, performance-critical ephemeral data |
| AWS EBS / Azure Disks / GCP PD | Cross-cloud equivalent use cases | Mature ecosystems, similar concepts | Different performance models/pricing | Multi-cloud design comparisons and migrations |
| Ceph RBD (self-managed) | Custom block storage platform | Control, portability | Ops burden, upgrades, failure domains | You have strong storage ops skills and need portability/control |
15. Real-World Example
Enterprise example: ERP database modernization on OCI
- Problem: A company runs an ERP system on-prem with SAN storage. They need to move to OCI with predictable performance, encryption, and DR.
- Proposed architecture:
- OCI Compute (DB VM or bare metal depending on needs)
- Separate Block Volumes for data, logs, and app binaries
- Backup policy with daily incremental backups and periodic long-term retention
- Cross-region backup copy (or replication, if supported/required) for DR
- Vault customer-managed keys and strict IAM separation for storage operations
- Why Block Volume was chosen:
- Matches existing block storage patterns from SAN
- Supports backups, restores, and operational runbooks
- Integrates with OCI IAM/Audit for governance
- Expected outcomes:
- Faster provisioning and simpler scaling vs SAN procurement
- Improved auditability and encryption posture
- Tested restore and DR procedures aligned to RPO/RTO
Startup/small-team example: Stateful SaaS on a lean budget
- Problem: A startup runs a small SaaS with a single database VM and needs persistence plus simple backups without a full storage team.
- Proposed architecture:
- One OCI Compute VM
- One Block Volume mounted at
/var/lib/postgresql(or DB data directory) - Automated backup policy + periodic restore test to a second VM (only during tests)
- Tags for owner/environment; strict cleanup automation for dev/test
- Why Block Volume was chosen:
- Minimal operational overhead
- Predictable “disk” behavior for the database
- Easy backup/restore workflow
- Expected outcomes:
- Reliable persistence
- Simple recovery from operator errors
- Controlled costs with smaller volumes and tight retention
16. FAQ
1) Is OCI Block Volume the same as Object Storage?
No. Block Volume presents storage as a block device attached to an instance. Object Storage is accessed via HTTP APIs and stores objects (files) with metadata, not block devices.
2) Can I attach one Block Volume to multiple instances?
OCI has concepts like shared/multi-attach in some contexts, but it requires careful design and may have constraints. For shared file access, OCI File Storage is often the safer default. Verify multi-attach support and requirements in official docs.
3) Do Block Volumes replicate data automatically?
OCI provides durability for volumes as a managed service. Additional replication features (for DR) may be optional. For DR, use backups + cross-region copy or replication (where supported). Verify exact durability/replication behavior in docs.
4) Are Block Volumes encrypted?
Encryption at rest is enabled by default. You can also use customer-managed keys with OCI Vault if required.
5) Can I shrink a Block Volume?
Typically, block volumes can be expanded but not shrunk. Shrinking usually requires creating a new smaller volume and migrating data.
6) How do backups work?
Backups are point-in-time copies managed by OCI. Scheduling is typically handled via backup policies. Application consistency usually requires application/database coordination.
7) Are backups incremental?
OCI commonly implements incremental backups after an initial full backup, but details can vary. Verify backup mechanics in the official documentation.
8) Can I restore a backup into a different availability domain?
Often yes, because backups are regional. However, behavior can vary by region and feature. Verify regional/AD restore behavior.
9) Do I pay for a detached volume?
Yes. Detached volumes still consume storage and are billable until deleted.
10) What’s the difference between Boot Volume and Block Volume?
Boot Volume is the instance’s OS/root disk. Block Volume usually refers to additional data disks you attach.
11) What attachment type should I use: iSCSI or paravirtualized?
Use the type recommended for your OS and instance shape: – Paravirtualized is typically simpler on supported platforms. – iSCSI is broadly compatible but requires initiator configuration. Follow OCI documentation and console recommendations.
12) How do I ensure the volume mounts after reboot?
Use /etc/fstab with the filesystem UUID (not /dev/sdb names) and test with mount -a.
13) Can I use Block Volume with Kubernetes (OKE)?
Yes. OKE commonly uses OCI Block Volume through a CSI driver to provide persistent volumes. Verify the current OKE storage docs for the recommended driver and StorageClass settings.
14) How do I migrate data from on-prem to a Block Volume?
Common methods:
– Use rsync over VPN/FastConnect
– Restore from database-native backups
– Use application-level export/import
For large datasets, consider staged migration and cutover plans.
15) What monitoring should I set up?
At minimum: – Alarms on volume performance saturation/latency (where metrics exist) – Alerts for backup failures – Audit alerts for delete/detach operations (process + monitoring)
16) What’s the safest way to do DR testing?
Restore backups into an isolated DR compartment/VPC, attach to test instances, run validation checks, then delete restored resources to control cost.
17) How does Block Volume relate to compliance?
It supports encryption, IAM controls, audit logs, and compartment isolation—key building blocks for compliance. Your compliance depends on your configuration, processes, and evidence (restore tests, access reviews, retention controls).
17. Top Online Resources to Learn Block Volume
| Resource Type | Name | Why It Is Useful |
|---|---|---|
| Official documentation | OCI Block Volume documentation | Primary reference for features, limits, and workflows: https://docs.oracle.com/en-us/iaas/Content/Block/home.htm |
| Official documentation | OCI Boot Volumes (within Block Volume docs) | Boot volume lifecycle and backup/restore behavior (navigate from Block docs) |
| Official documentation | OCI IAM documentation | Policy syntax and best practices: https://docs.oracle.com/en-us/iaas/Content/Identity/home.htm |
| Official documentation | OCI Vault documentation | Customer-managed keys and encryption controls: https://docs.oracle.com/en-us/iaas/Content/KeyManagement/home.htm |
| Official documentation | OCI Audit documentation | Understand audit events and retention: https://docs.oracle.com/en-us/iaas/Content/Audit/home.htm |
| Official pricing | OCI Price List | Authoritative pricing SKUs: https://www.oracle.com/cloud/price-list/ |
| Official free tier | Oracle Cloud Free Tier | Always Free eligibility and limits: https://www.oracle.com/cloud/free/ |
| Official CLI docs | OCI CLI installation and usage | Install/configure CLI for repeatable labs: https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/cliinstall.htm |
| Official reference architectures | OCI Architecture Center | Patterns for backup/DR and storage designs: https://docs.oracle.com/en/solutions/ |
| Official service overview | OCI Storage overview | Broader storage positioning and service selection (navigate from OCI docs) |
| Official tutorials/labs | Oracle LiveLabs (search for OCI storage) | Hands-on labs; search for “Block Volume” and “OKE storage”: https://livelabs.oracle.com/ |
| Official videos | Oracle Cloud Infrastructure YouTube channel | Product walkthroughs and best practices: https://www.youtube.com/@OracleCloudInfrastructure |
| Community learning | OCI forums / community content | Practical troubleshooting insights (validate against official docs) |
18. Training and Certification Providers
| Institute | Suitable Audience | Likely Learning Focus | Mode | Website |
|---|---|---|---|---|
| DevOpsSchool.com | DevOps engineers, SREs, platform teams | OCI fundamentals, automation, DevOps practices around cloud infrastructure | Check website | https://www.devopsschool.com/ |
| ScmGalaxy.com | Beginners to intermediate engineers | SCM/DevOps concepts; may include cloud modules and hands-on labs | Check website | https://www.scmgalaxy.com/ |
| CLoudOpsNow.in | Cloud operations teams | Cloud ops practices, monitoring, governance, cost controls | Check website | https://www.cloudopsnow.in/ |
| SreSchool.com | SREs and operations engineers | Reliability engineering, incident response, SLIs/SLOs, operational readiness | Check website | https://www.sreschool.com/ |
| AiOpsSchool.com | Ops and engineering teams | AIOps concepts, automation, observability-driven operations | Check website | https://www.aiopsschool.com/ |
19. Top Trainers
| Platform/Site | Likely Specialization | Suitable Audience | Website |
|---|---|---|---|
| RajeshKumar.xyz | DevOps/cloud training content (verify specific offerings) | Beginners to intermediate DevOps learners | https://www.rajeshkumar.xyz/ |
| devopstrainer.in | DevOps training services (verify OCI coverage) | Teams seeking practical DevOps enablement | https://www.devopstrainer.in/ |
| devopsfreelancer.com | Freelance DevOps assistance/training (verify scope) | Small teams needing hands-on guidance | https://www.devopsfreelancer.com/ |
| devopssupport.in | DevOps support and training resources (verify scope) | Operations teams and DevOps practitioners | https://www.devopssupport.in/ |
20. Top Consulting Companies
| Company | Likely Service Area | Where They May Help | Consulting Use Case Examples | Website |
|---|---|---|---|---|
| cotocus.com | Cloud/DevOps consulting (verify specific offerings) | Architecture, migration planning, operational best practices | Storage design review, backup/restore runbooks, IaC enablement | https://www.cotocus.com/ |
| DevOpsSchool.com | DevOps consulting and training | Platform engineering, DevOps transformation, automation | Terraform standardization for OCI storage, CI/CD integration, governance tagging | https://www.devopsschool.com/ |
| DEVOPSCONSULTING.IN | DevOps consulting services (verify specifics) | DevOps tooling, cloud operations processes | Backup policy implementation guidance, monitoring/alerting setup, cost governance | https://www.devopsconsulting.in/ |
21. Career and Learning Roadmap
What to learn before Block Volume
- Linux basics:
- disks/partitions (
lsblk,parted,fdisk) - filesystems (XFS/ext4), mounting,
/etc/fstab - Networking basics in OCI:
- VCN, subnets, security lists/NSGs, routing
- OCI fundamentals:
- compartments
- IAM policies
- OCIDs and regions/availability domains
What to learn after Block Volume
- OCI File Storage and Object Storage selection patterns
- Backup/DR architecture:
- cross-region strategies
- restore testing automation
- Terraform for OCI (infrastructure-as-code)
- Observability:
- Monitoring metrics, alarms
- Audit log analysis
- Kubernetes storage on OKE (CSI, StorageClasses, StatefulSets)
Job roles that use it
- Cloud Engineer / DevOps Engineer
- Site Reliability Engineer (SRE)
- Cloud Solution Architect
- Platform Engineer
- Database Administrator (DBA) on cloud
- Security Engineer (cloud governance and encryption controls)
Certification path (if available)
Oracle offers OCI certifications; the exact certification names and tracks evolve. Verify current OCI certification paths on Oracle University: https://education.oracle.com/
Project ideas for practice
- Build a “stateful VM” blueprint: – Create VM + Block Volume + backup policy + monitoring alarms via Terraform.
- Implement a DR drill: – Copy backups to another region and automate restore verification.
- Build an OKE stateful app: – Deploy PostgreSQL with a Block Volume-backed PVC; test node replacement.
- Cost governance automation: – Script detection of unattached volumes and old backups; alert or delete with approvals.
22. Glossary
- AD (Availability Domain): A physically isolated data center within an OCI region. Some resources are scoped to an AD.
- Block storage: Storage presented as fixed-size blocks accessed like a disk device (as opposed to files or objects).
- Boot Volume: The block storage device containing the operating system used to boot a compute instance.
- Compartment: OCI resource isolation boundary used for access control and governance.
- CSI (Container Storage Interface): Standard interface for Kubernetes to provision and attach storage.
- Encryption at rest: Data is encrypted while stored on disk/media.
- Filesystem: Structure on a block device to store files/directories (e.g., XFS, ext4).
- iSCSI: Protocol that allows SCSI commands over IP networks to access block devices.
- IAM Policy: Statement defining who can do what on which OCI resources.
- OCID: Oracle Cloud Identifier, a unique ID for OCI resources.
- Paravirtualized attachment: A virtualization-aware way to attach storage devices that often simplifies device discovery and performance.
- RPO (Recovery Point Objective): Maximum acceptable data loss measured in time.
- RTO (Recovery Time Objective): Target time to restore service after an outage.
- Snapshot/Backup: Point-in-time copy of volume state used for restore (OCI terminology commonly uses “backup” for Block Volumes).
- UUID: Unique identifier used to reliably reference filesystems in
/etc/fstab. - Volume Group: Logical grouping of multiple volumes for coordinated operations like group backup.
- VPU / performance units: OCI concept for performance configuration of block volumes (verify current definitions and pricing).
23. Summary
Oracle Cloud Block Volume is OCI’s core Storage service for provisioning durable, attachable block devices for compute instances and stateful workloads. It matters because it provides the practical “disk” abstraction needed by databases, enterprise apps, and Kubernetes persistent volumes—while adding managed features like encryption, backups, and automation.
Architecturally, Block Volume typically ties volumes to an availability domain for attachment, while backups are managed regionally and support restore workflows. Cost is driven by provisioned capacity, chosen performance options, and backup/DR retention—so governance (tags, quotas, cleanup) is essential. Security relies on IAM least privilege, encryption controls (including Vault for customer-managed keys), and Audit logging for traceability.
Use Block Volume when you need persistent disk semantics and predictable performance; choose File Storage for shared POSIX access and Object Storage for API-based object data. Next step: automate this tutorial with Terraform and implement a restore/DR drill so your backup strategy is proven, not assumed.