Creating a Storage Volume on the External Storage Appliance

If you have a subscription to the Database Cloud Service (DBCS), a tenant user can create storage volumes on the external storage appliance.

An external storage appliance is included in the DBCS subscription of Oracle Public Cloud Machine. You can create storage volumes on this external storage appliance to attach to Oracle Compute Cloud Service instances.

Note:

You can run all the commands in this procedure as a tenant user.

Note:

You can only run single node Oracle databases on Oracle Compute Cloud Service on OPCM using customer-owned externally connected storage over 10 GbE. The internal block storage of OPCM cannot be used for databases running on Oracle Compute Cloud Service instances.
  1. Verify that the machine has the required storage properties on the external storage appliance:
    1. Verify that the latency storage property exists by running the list property command:
      oracle-compute list property storage /oracle/public/storage/latency

      Sample output:

      uri                                                                  name                                     description
      https://api/property/storage/oracle/public/storage/latency           /oracle/public/storage/latency           Latency Optimized
      
    2. Verify that the throughput storage property exists by running the list property command:
      oracle-compute list property storage /oracle/public/storage/throughput

      Sample output:

      uri                                                                  name                                     description
      https://api/property/storage/oracle/public/storage/throughput        /oracle/public/storage/throughput        Throughput Optimized
      
  2. In the orchestration JSON section that specifies the storage volume, set the properties field to /oracle/public/storage/latency or /oracle/public/storage/throughput.

    Example:

    {
        "objects": [
            {
                "name": "/mytenant/public/data",
                "properties": [
                    "/oracle/public/storage/throughput"
                ],
                "size": "50G",
                "bootable": "False"
            }
        ],
        "label": "data",
        "obj_type": "storage/volume"
    }
    

    In this orchestration, you are creating a storage volume of size 50 GB called /mytenant/public/data on the external storage appliance with throughput write-bias.

  3. Add the orchestration to your tenant using the add orchestration command:
    oracle-compute add orchestration filename

    For more information, see CLI Reference for Oracle Compute Cloud Service.

  4. Start the orchestration using the start orchestration command:
    oracle-compute start orchestration OrchestrationName

    The OrchestrationName should be the hierarchal name of the orchestration specified in the JSON file.

    For more information, see CLI Reference for Oracle Compute Cloud Service.

Mapping Database Storage Volumes to Storage Properties

If you are deploying a legacy database instance on an Oracle Compute Cloud Service instance, Oracle recommends that you follow this mapping when creating storage volumes.

The following table lists the storage volumes created for a DBCS instance and the storage property that is associated with each volume. Oracle recommends that you similarly map the storage volumes for your instance.

Storage Volume Description Storage Property

boot

Boot disk that hosts the Operating System.

/oracle/public/storage/latency

bits

Hosts the Oracle database software.

/oracle/public/storage/latency

redo

Hosts the redo log.

/oracle/public/storage/latency

data

Used for the files of the database.

/oracle/public/storage/throughput

fra

Used for flash recovery.

/oracle/public/storage/throughput

Sample JSON files for a Database Deployment:

In the following samples, we will use two orchestrations to deploy a database:

  • Resources orchestration: Deploys the storage volumes and instance for the database.

  • Launch plan orchestration: Links and launches the objects.

Sample Resources Orchestration

{
  "name": "/tenant1/public/sample1-resources",
  "oplans": [
    {
      "objects": [
        {
          "imagelist_entry": "1",
          "name": "/tenant1/public/sample1-boot",
          "imagelist": "/oracle/public/linux6_16.3.1_64",
          "properties": [
            "/oracle/public/storage/default"
          ],
          "size": "32GB",
          "bootable": "True"
        }
      ],
      "label": "sample1-boot",
      "obj_type": "storage/volume"
    },
    {
      "objects": [
        {
          "name": "/tenant1/public/sample1-data",
          "properties": [
            "/oracle/public/storage/throughput"
          ],
          "size": "25G",
          "bootable": "False"
        }
      ],
      "label": "sample1-data",
      "obj_type": "storage/volume"
    },
    {
      "objects": [
        {
          "name": "/tenant1/public/sample1-fra",
          "properties": [
            "/oracle/public/storage/throughput"
          ],
          "size": "10G",
          "bootable": "False"
        }
      ],
      "label": "sample1-fra",
      "obj_type": "storage/volume"
    },
    {
      "objects": [
        {
          "name": "/tenant1/public/sample1-bits",
          "properties": [
            "/oracle/public/storage/latency"
          ],
          "size": "30G",
          "bootable": "False"
        }
      ],
      "label": "sample1-bits",
      "obj_type": "storage/volume"
    },
    {
      "objects": [
        {
          "name": "/tenant1/public/sample1-redo",
          "properties": [
            "/oracle/public/storage/latency"
          ],
          "size": "10G",
          "bootable": "False"
        }
      ],
      "label": "sample1-redo",
      "obj_type": "storage/volume"
    }
  ],
  "description": "Resources orch for instance sample1"
}

Sample Launch Plan JSON

{
  "relationships": [],
  "name": "/tenant1/public/sample1-launch",
  "oplans": [
    {
      "ha_policy": "monitor",
      "objects": [
        {
          "instances": [
            {
              "name": "/tenant1/public/sample1_instname",
              "virtio": "false",
              "storage_attachments": [
                {
                  "index": 1,
                  "volume": "/tenant1/public/sample1-boot"
                },
                {
                  "index": 2,
                  "volume": "/tenant1/public/sample1-bits"
                },
                {
                  "index": 3,
                  "volume": "/tenant1/public/sample1-data"
                },
                {
                  "index": 4,
                  "volume": "/tenant1/public/sample1-fra"
                },
                {
                  "index": 5,
                  "volume": "/tenant1/public/sample1-redo"
                }
              ],
              "tags": [],
              "boot_order": [
                1
              ],
              "shape": "oc3",
              "label": "sample1",
              "networking": {
                "net0": {
                  "vnet": "/tenant1/public/eoib-network",
                  "options": {
                    "default_gateway": "true",
                    "hostname": "sample1",
                    "dns": {
                      "search_domains": "example.com",
                      "servers": "10.10.10.7,10.10.10.8"
                    }
                  }
                }
              }
            }
          ],
          "relationships": []
        }
      ],
      "label": "sample1-launch",
      "obj_type": "launchplan"
    }
  ],
  "description": "Orchestration for instance sample1"
}

Creating a Storage Volume on the External Storage Appliance Using the CLI or API

You can create a storage volume on the external storage volume using the CLI by specifying one of the following storage properties:

  • To create a storage volume on the latency pool of the external storage appliance, use the following command:

    oracle-compute add storagevolume name size /oracle/public/storage/latency [--description] [--source_storagevolume_name] [--imagelist] [--imagelist_entry] [--tags] [--quota]

  • To create a storage volume on the throughput pool of the external storage appliance, use the following command:

    oracle-compute add storagevolume name size /oracle/public/storage/throughput [--description] [--source_storagevolume_name] [--imagelist] [--imagelist_entry] [--tags] [--quota]

For more information, see CLI Reference for Oracle Compute Cloud Service.

To create a storage volume using the API, use the POST https://api.oc.example.com/storage/volume/ method. In the properties parameter, specify either /oracle/public/storage/latency or /oracle/public/storage/throughput.

For more information, see REST API Reference for Oracle Compute Cloud Service.