Enabling the Block Volume Management Plugin

This topic describes how to enable the Block Volume Management plugin a Compute instance, which is required for optimizing the performance of a volume configured for the Ultra High Performance level and attached to the instance with an iSCSI attachment.

The Block Volume Management plugin is managed by the Oracle Cloud Agent software.

Prerequisites

The Block Volume Management plugin is supported on Oracle Autonomous Linux and Oracle Linux images and on custom images that are based on those images.

The following steps are required for the Block Volume Management plugin.

  • Service gateways or public IP addresses: The compute instance must have either a public IP address or a service gateway to be able to connect to Oracle services.

    If the instance does not have a public IP address, set up a service gateway on the virtual cloud network (VCN). The service gateway lets your instance privately access Oracle services without exposing the data to the public internet. Here are special notes for setting up the service gateway for the Block Volume Management plugin:

    • When creating the service gateway, enable the service label called All <region> Services in Oracle Services Network.
    • When setting up routing for the subnet that contains the instance, set up a route rule with Target Type set to Service Gateway, and the Destination Service set to All <region> Services in Oracle Services Network.

    For detailed instructions, see Access to Oracle Services: Service Gateway.

  • Oracle Cloud Agent: The Oracle Cloud Agent software must be installed on the instance. Oracle Cloud Agent is installed by default on current platform images. For steps to manually install Oracle Cloud Agent on older images, see Installing the Oracle Cloud Agent Software. To update, see Updating the Oracle Cloud Agent Software.
  • Configure Permissions: These permissions authorize the instance to make API calls to Oracle Cloud Infrastructure services, allowing the Block Volume Management plugin to report the iSCSI setup results for multipath-enabled iSCSI attachments.

    To configure permissions:

    1. Create Dynamic Group: Create a dynamic group with the matching rules in the following code sample, to include all instances in the specified compartments:

      ANY {instance.compartment.id = 'ocid1.tenancy.oc1..<tenancy_ID>', instance.compartment.id = 'ocid1.compartment.oc1..<compartment_OCID>'
    2. Configure Policy for Dynamic Group: Configure a policy granting permissions to the dynamic group created in the previous step to enable the instance agent access to call the Block Volume service to retrieve the attachment configuration.:

      Allow dynamic-group InstantAgent to use instances in tenancy
      Allow dynamic-group InstantAgent to use volume-attachments in tenancy

Enabling Block Volume Management on New Instances

To enable Block Volume Management on a new compute instance, use the following steps.

To enable Block Volume Management on a new compute instance using the Console
  1. Follow the steps in Creating a Linux Instance, until the advanced options. Ensure that the instance has either a public IP address or a service gateway, as described in the Prerequisites.
  2. Click Show Advanced Options.
  3. On the Oracle Cloud Agent tab, select the Block Volume Management check box.

  4. Click Create.

To enable Block Volume Management on a new compute instance using the API
  1. Install the Oracle Cloud Agent software, if it is not already installed.
  2. Use the UpdateInstance operation. Include the following parameters:

    {
        "agentConfig": {
        "areAllPluginsDisabled": false,
        "pluginsConfig": [
        {
            "name": "Block Volume Management",
            "desiredState": "ENABLED"
        }
    ]
    }
  3. Ensure that the instance has either a public IP address or a service gateway, as described in the Prerequisites.

Enabling Block Volume Management on Existing Instances

To enable Block Volume Management on an existing compute instance, use the following steps.

To enable Block Volume Management on an existing compute instance using the API
  1. Install the Oracle Cloud Agent software, if it is not already installed.
  2. Use the UpdateInstance operation. Include the following parameters:

    {
        "agentConfig": {
        "areAllPluginsDisabled": false,
        "pluginsConfig": [
        {
            "name": "Block Volume Management",
            "desiredState": "ENABLED"
        }
    ]
    }
  3. Ensure that the instance has either a public IP address or a service gateway, as described in Prerequisites.

Manually Enabling Block Volume Management on an Instance

You can manually enable Block Volume Management on an existing compute instance using the CLI.

To manually enable the Block Volume Management plugin on Oracle Linux instances
  1. Install the Oracle Cloud Agent software on the instance, if it is not already installed.
  2. Log into the instance, see Connecting to an Instance.
  3. Run the following sed script to enable Block Volume Management:

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

    This script updates the disabled parameter for the oci-blockautoconfig configuration in /etc/oracle-cloud-agent/agent.yml from true to false.

  4. Run the following command to restart the Oracle Cloud Agent service:
    systemctl restart oracle-cloud-agent.service