Enabling or Disabling Automatic Storage Expansion

Enable automatic storage expansion on your DB system to avoid loss of service when the allocated storage space gets filled up.

Note

You cannot enable automatic storage expansion on an Always Free DB system.
You can use the following metrics to monitor the storage space of a DB system:
  • StorageAllocated: The maximum amount of space allocated to the DB system during the interval in GiB.
  • StorageUsed: The maximum amount of space used during the interval in GiB.
For more information about metrics, see Metrics.
If automatic storage expansion is enabled, the DB system storage is expanded when the remaining available storage is 10% or less of the currently allocated storage:
StorageUsed >= StorageAllocated * 0.90
When the storage used threshold is reached, the storage allocation is increased as follows:
If StorageAllocated < 150 GB:
  StorageAllocated = StorageAllocated + CEILING(8 + (StorageAllocated / 25))

If StorageAllocated >= 150 GB:
  StorageAllocated = CEILING(StorageAllocated * 1.115)
The result is rounded up to the next whole GB and cannot exceed the maximum storage size configured for the DB system.

The expanded storage size becomes the current storage size used to calculate the threshold for the next automatic expansion. After the configured maximum storage size is reached, the DB system does not expand its storage further.

Table 8-19 Examples of storage-used thresholds and resulting allocations

Storage allocated (GB) Storage used that triggers expansion (GB) Storage allocated after expansion (GB)
50 45 60
100 90 112
200 180 223
500 450 558
800 720 892
1,000 900 1,115
1,050 945 1,171
1,100 990 1,227

You can build a chart to monitor the metrics over a period of time and identify whether the value has changed or when the value has changed. See Using Metrics to Create Queries. If needed, you can also create an alarm based on the metrics. See Using Metrics to Create Alarms.

Use one of the following method to enable or disable automatic storage expansion:

Using the Console

You can enable or disable automatic storage expansion using the Update storage size console action of the DB system.

Do the following to enable or disable automatic storage expansion of a DB system:

  1. On the DB systems list page, select the DB system that you want to work with. If you need help finding the list page or the DB system, see Listing DB Systems - Using the Console.

    The details page opens and displays information about the DB system.

  2. Select Details tab.
  3. Select Edit in the Automatic storage expansion field:
  4. In the Update storage size dialog box, select the Automatic storage expansion toggle switch to enable or disable automatic storage expansion.
    Note

    Enabling or disabling automatic storage expansion does not cause any downtime to the DB system.

  5. When automatic storage expansion is enabled, the Maximum data storage size field is shown. Enter the maximum storage size that you want to allow the storage size to expand to.
    Note

    You will be billed the new allocated storage size whenever the storage has been expanded.
  6. (Optional) You can also increase the current allocated storage size of the DB system. In the Update storage size dialog box, enter the new data storage size in GiB. You can only increase the storage size.
  7. Select Update.

Using the CLI

Use the command-line interface to enable or disable automatic storage expansion.

This task requires the following:
  • A DB system Oracle Cloud Identifier (OCID).
  • A properly configured CLI installation and the requisite SSH keys. See Command Line Interface.
  1. Open a command prompt and run the following command:
    oci mysql db-system update --db-system-id <DBSystemOCID> --is-auto-expand-storage-enabled <Boolean> --max-storage-size-in-gbs <SizeInGiB>
    • db-system-id: Specify the OCID of the DB system.
    • is-auto-expand-storage-enabled: Set to true to enable automatic storage expansion or false to disable it.
    • max-storage-size-in-gbs: Specify the maximum storage size, in GiB.
The command updates the DB system and returns the work request information.