Skip to content
Commitpedia
Log in Join & edit

Block volumes on PCA 3.x: create, attach and mount a data disk

Add storage to a Private Cloud Appliance 3.x instance: create a block volume, attach it as paravirtualized, then format and mount it in Linux by its stable SCSI ID with _netdev,nofail.

Not checked by a trusted editor yet Last edited Outdated?

Edit history of Block volumes on PCA 3.x: create, attach and mount a data disk: 1 recorded edit
Edit history · 1 edit
Type
Article
Edits
1
Editors
1
First issued
15 Oct 2026
Last edit
15 Oct 2026
Reading
2 min

Block volumes are network disks that live on the appliance’s ZFS Storage Appliance and attach to compute instances. This guide covers Private Cloud Appliance 3.x and follows the PCA User Guide.

1. Create the volume

In the Compute Web UI the size range is 50 GB to 32768 GB (32 TB). With the CLI, the minimum is an availability domain and a compartment; usually you also set a name and size.

oci bv volume create \
  --availability-domain AD-1 \
  --compartment-id ocid1.compartment.unique_ID \
  --display-name data01 \
  --size-in-gbs 100 \
  --vpus-per-gb 10

PCA-specific settings documented by Oracle:

  • --vpus-per-gb: 10 (default, balanced) or 20 (high performance). It cannot be changed after creation.
  • PCA_blocksize free-form tag: block size as a power of two from 512 bytes to 1 MB, default 8192. It cannot be changed after creation.
  • OraclePCA defined tags logBias (LATENCY default, or THROUGHPUT) and secondaryCache (ALL default, METADATA or NONE).

Wait until the volume is AVAILABLE:

oci bv volume list --compartment-id ocid1.compartment.unique_ID --output table

2. Attach it to an instance

On PCA the attachment type for the CLI is paravirtualized, and --type is required.

oci compute volume-attachment attach \
  --instance-id ocid1.instance.unique_ID \
  --volume-id ocid1.volume.unique_ID \
  --type paravirtualized

The Web UI offers three access modes: Read/Write (default, one instance), Read/Write – Shareable, and Read Only – Shareable. With the CLI, add --is-shareable true for a shared attachment. Once a volume is attached read-only, it can only be attached to other instances read-only. Only share a read/write volume between instances if the file system or application is built for shared access (a cluster file system); ordinary ext4 or XFS will be corrupted by two writers.

3. Find the disk inside the guest

Log in to the instance. Do not rely on names like /dev/sdb: the docs warn they are not guaranteed to stay the same across reboots when there is more than one non-root volume. Use the stable ID instead.

Check before you run this

  • Runs with administrator rights. Make sure you understand every line.
sudo ls -l /dev/disk/by-id/
# example line:
# scsi-3600144f096933b92000061b1129e0037 -> ../../sdb

4. Create a file system and mount it

Warning: mkfs erases everything on the target device. Double-check that the by-id path points to the new, empty volume (compare its size with lsblk) before running it.

Check before you run this

  • Formats or repartitions a disk and erases its data.
  • Runs with administrator rights. Make sure you understand every line.
lsblk
sudo mkfs.ext4 /dev/disk/by-id/scsi-3600144f096933b92000061b1129e0037
sudo mkdir -p /mnt/data01

Add the volume to /etc/fstab using the SCSI ID. Oracle’s example uses _netdev (treat it as a network device) and nofail (boot continues if the volume is missing, which also matters when you create custom images from the instance):

/dev/disk/by-id/scsi-3600144f096933b92000061b1129e0037 /mnt/data01 ext4 _netdev,nofail 0 0

Check before you run this

  • Runs with administrator rights. Make sure you understand every line.
sudo mount -a
mount | grep /mnt/data01
df -h /mnt/data01

Detaching later

Unmount the file system in the guest and remove or comment out its /etc/fstab line before you detach the volume in the Compute Web UI or CLI. Detaching a mounted disk can lose data that has not been written yet.

Official documentation

See also

Repos in the wild

History

Every saved edit is kept. The plot on the sleeve draws one line per edit. Open any edit to see exactly what changed.

  1. Commitpedia +3,212 chars

Report a problem

Something wrong, unsafe or copied? Tell the editors.
What is wrong?