Home / OCI

OCIHow-toAdvanced

Attaching OCI Ultra High Performance block volumes with multipath - prerequisites, verification and silent fallbacks

A UHP block volume reaches its rated IOPS only on a multipath attachment, and OCI falls back to a single path without an error if a prerequisite is missing. How to set it up, prove it and fix the fallback.

Deepak Bhardwaj7 min read

Applies toOCI Block Volume (Ultra High Performance, VPUs/GB 30-120), iSCSI and paravirtualized attachments, Oracle Linux with UEK6U1+, Oracle Cloud Agent Block Volume Management plugin

Goal

You set a database volume to Ultra High Performance (UHP, 30–120 VPUs/GB), but fio shows roughly Higher Performance numbers. The usual cause is that the attachment isn't multipath-enabled. OCI tries to enable multipath at attach time. If any prerequisite is missing, it attaches the volume on a single path and doesn't raise an error. This guide covers how to attach UHP volumes so that multipath is actually in use, and how to prove it.

How UHP multipath works

  • An iSCSI UHP attachment exposes several iSCSI targets for the same volume. device-mapper-multipath combines them into one /dev/mapper/mpathX device and spreads I/O across the paths.
  • On iSCSI, the Block Volume Management plugin (oci-blockautoconfig) of Oracle Cloud Agent does the iSCSI logins, installs device-mapper-multipath, writes /etc/multipath.conf and reports back to the service. Don't run iscsiadm login commands by hand for these volumes.
  • Paravirtualized UHP attachments don't need the plugin. The per-volume ceiling is lower than with iSCSI, so check the current UHP performance table for both numbers.
  • Boot volumes don't use multipath.

Prerequisites

Requirement iSCSI Paravirtualized
Shape VM with 16+ OCPUs, or bare metal. Check the "Supports UHP" column for your shape Same (bare metal is iSCSI only)
Image Oracle Linux platform image, or a custom image based on it, with UEK6U1+ (5.4.17-2036 or later). Not Windows or Autonomous Linux Oracle Linux, Ubuntu, CentOS, Windows (not Autonomous Linux)
Block Volume Management plugin Enabled Not needed
Path to Oracle services Public IP or service gateway Not needed
IAM for the plugin Dynamic group + policy below Not needed
Consistent device path Required Recommended
Attachment count Up to 32 UHP attachments. More than one needs Oracle Cloud Agent 1.39+ Up to 32, with shape exceptions

Warning

The volume must already be at UHP before you attach it. If you raise an attached volume to UHP, you have to detach and reattach it to get a multipath attachment. The same applies after you change the instance's shape or image. Plan this as downtime for whatever uses the volume.

Steps

1. IAM for the plugin

# Dynamic group (e.g. bv-agent-instances)
ANY {instance.compartment.id = 'ocid1.compartment.oc1..dbcompartment'}

# Policy
Allow dynamic-group bv-agent-instances to use instances in compartment db-prod
Allow dynamic-group bv-agent-instances to use volume-attachments in compartment db-prod

Oracle's example grants these at tenancy scope. Scoping them to the compartment works and is tighter.

2. Enable the plugin

cat > agent.json <<'EOF'
{"is-agent-disabled": false,
 "plugins-config": [{"name": "Block Volume Management", "desiredState": "ENABLED"}]}
EOF
oci compute instance update --instance-id "$INSTANCE" --agent-config file://agent.json --force

Check that the plugin is running. Give it a few minutes after you enable it:

oci instance-agent plugin get --instanceagent-id "$INSTANCE" \
  --compartment-id "$COMP" --plugin-name "Block Volume Management" \
  --query 'data.status'

On custom images where the plugin is disabled locally, enable it in the agent config on the host:

sudo sed -i.saved -e '/^  oci-blockautoconfig:/,/^  [a-z]*:/{s/\(.*disabled:.*\)true/\1false/}' \
  /etc/oracle-cloud-agent/agent.yml
sudo systemctl restart oracle-cloud-agent.service

3. Set the performance level, then attach

# 30 VPUs/GB is the UHP entry point; values up to 120 are allowed
oci bv volume update --volume-id "$VOL" --vpus-per-gb 30 --force
oci bv volume get --volume-id "$VOL" --query 'data."lifecycle-state"'   # wait for AVAILABLE

oci compute volume-attachment attach \
  --instance-id "$INSTANCE" --volume-id "$VOL" \
  --type iscsi --device /dev/oracleoci/oraclevdb \
  --wait-for-state ATTACHED

The volume shows PROVISIONING while the performance change applies, and you can't attach it until it is AVAILABLE again.

4. Verify on the control plane

oci compute volume-attachment list -c "$COMP" --instance-id "$INSTANCE" --all \
  --query 'data[].{dev:device, state:"lifecycle-state", multipath:"is-multipath", type:"attachment-type"}' \
  --output table

is-multipath must be true. A false here means the service decided on a single-path attachment. See the troubleshooting table.

5. Verify on the host

The control plane can say true while the host isn't using multipath, so check the host as well:

sudo multipath -ll                          # expect an mpath device with several active paths
ls -l /dev/oracleoci/oraclevdb              # should resolve to a /dev/dm-* device
lsblk -o NAME,TYPE,SIZE,MOUNTPOINT

# Every node for the volume's IQN must be manual-startup (the plugin owns login)
sudo grep -Hrn 'node.startup' /var/lib/iscsi/nodes/<volume-iqn>/

Any node.startup = automatic means the OS logged in on its own, outside the plugin. That attachment isn't using multipath correctly.

6. Filesystem and fstab

Mount on the consistent device path, never on /dev/sdX. The mount has to wait for multipathd:

/dev/oracleoci/oraclevdb1  /u02  xfs  defaults,_netdev,nofail,x-systemd.requires=multipathd.service  0 2

Caution

Don't mix tools on one volume. If you have used oci-iscsi-config (oci-utils) on a volume, keep using it for that volume, and let the plugin handle volumes it attached. Using both on the same volume can leave an attachment that the console reports as multipath while the host does single-path I/O, or that logs in twice after a reboot.

Benchmark properly

A single-threaded dd can't push a UHP volume. Use parallel jobs and queue depth:

sudo fio --name=uhp-randread --filename=/dev/oracleoci/oraclevdb --direct=1 \
  --rw=randread --bs=4k --ioengine=libaio --iodepth=64 --numjobs=8 \
  --time_based --runtime=120 --group_reporting --readonly

Compare the result with the UHP table for your volume size and VPUs/GB, and with the instance's block storage bandwidth. A small VM can reach its own limit before the volume reaches its limit. Running fio against a raw device with a write workload destroys data, so keep --readonly unless the volume is scratch.

Troubleshooting

Symptom Cause Fix
is-multipath: false Missing prerequisite (shape, image, plugin, volume wasn't UHP when attached) Fix it, then detach and reattach
Plugin log shows NotAuthorizedOrNotFound (404) Dynamic group or policy missing Add the IAM in step 1
Plugin log shows user agent can not be blank No public IP and no service gateway route Service gateway for "All Services" plus a route rule
multipath -ll is empty Host never set up multipath Check plugin status and the log, then reattach
Volume missing after reboot, emergency mode fstab doesn't wait for multipathd Add x-systemd.requires=multipathd.service and nofail
Good IOPS, poor throughput Instance bandwidth limit, or too few jobs Larger shape, raise numjobs/bs

The plugin log is at /var/log/oracle-cloud-agent/plugins/oci-blockautoconfig/oci-blockautoconfig.log. Read it before you open a support request.

Prevent it next time

  • Gate UHP volumes in Terraform or CI. After every attach, fail the pipeline if is-multipath is false.
  • Bake the IAM, the service gateway route and the plugin's enabled state into the instance module, so new database hosts meet the prerequisites from the start.
  • Add multipath -ll path counts to your host monitoring. A path that drops from active to failed shows up as latency before it shows up as an outage.
  • Write the detach and reattach steps into the change process for VPU increases and shape changes on UHP hosts.