Increasing the Size of Guest VM Local File Systems on Exadata Cloud

Whether it is Oracle Exadata Database Service on Dedicated Infrastructure, formerly ExaCS or Oracle Exadata Cloud@Customer, both are specially designed Engineered systems where Oracle manages the Exadata hardware and firmware and the client manages the Exadata operating system and the database. Both of these comes with what all customers can change unlike the customer hosted Exadata machines where customers have more power to control, configure, and manage the machines.

Until recently, on ExaCC, you could only manage the size of /u02 filesystem. In my personal experience, this was kind of troublesome as Oracle prebuilt the infrastructure with only 20G of space allocated to /u01. This is where the grid infrastructure logs are stored (includes ASM logs) and the filesystem quickly used to reach capacity. Patching on ExaCC itself required 15Gb of free space. The only way out was to perform housekeeping and trying to keep the filesystem size in check.

On May 9th, Oracle announced the ability to increase the size of guest VM local file systems on both Exadata Database Service on Dedicated Infrastructure and Oracle Exadata Database Service on Cloud@Customer. This enhancement addresses the need for greater flexibility in managing storage resources, crucial for maintaining optimal database performance and supporting growing applications.

Key Features and Benefits

  1. Flexible File System Expansion: The new capability allows for resizing of various file systems such as /, /u01, /var, /var/log, /var/log/audit, /tmp, and /home. This can be done either during the provisioning of a VM cluster or post-provisioning through the Oracle Cloud Infrastructure (OCI) Console, API, SDK, or Terraform​​​. The process to increase the guest filesystems using UI is well-documented here.
  2. Enhanced Storage Management: With this feature, DBAs can dynamically manage storage allocation based on current needs, providing the ability to handle sudden increases in storage demand without the need for downtime.
  3. Support for More VMs: Another welcome enhancement On Exadata Database Service on Dedicated Infrastructure is the number of supported VMs per database server that has increased from 4 to 8, thanks to a new lower default VM image size of 244GB. This allows for greater consolidation and efficient resource utilization​.

How to Increase File System Size

During Provisioning

  1. Log into OCI Console:
    • Navigate to Oracle Database > Oracle Exadata Database Service on Dedicated Infrastructure > Create Exadata VM cluster.
  2. Configure Storage:
    • Enter the necessary information and select the Exadata Infrastructure and Version.
    • View allocated and available storage.
    • Click on “Scale VM Cluster” and show additional local file system configuration options.
    • Select and adjust the size of the desired file system. For example, you can expand the / (root) file system from the default 15GB to a larger size as needed.
  3. Finalize Configuration:
    • Complete the configuration and create the VM cluster. The system will provision the VM cluster with the specified file system sizes​

After Provisioning

  1. Access VM Cluster Details:
    • In the OCI Console, navigate to the VM cluster details page.
  2. Adjust Storage:
    • Click “Scale VM Cluster” and show additional local file system configuration options.
    • Increase the size of the required file systems, such as expanding /u01 from 20GB to 100GB or /u02 from 60GB to 100GB.
  3. Apply Changes:
    • Save the changes. The VM cluster will enter an “UPDATING” state and, once completed, will reflect the new storage allocations​

Please note that these “additional filesystems” can only be expanded and the size once allocated cannot be decreased so, plan ahead.

Additional possible options

Ansible

Below is an example playbook to resize the /u01 file system. Ensure you have Ansible installed and configured to manage your Oracle Cloud Infrastructure.

---
- name: Increase File System Size on Exadata Cloud at Customer
  hosts: exadata
  become: yes
  vars:
    oci_config_file: "~/.oci/config"
    oci_profile: "DEFAULT"
    vm_cluster_id: "ocid1.vmcluster.oc1..exampleuniqueID"
    new_size: 50  # Size in GB

  tasks:
    - name: Install oci-cli
      pip:
        name: oci-cli

    - name: Ensure the oci_config_file exists
      stat:
        path: "{{ oci_config_file }}"
      register: config_file

    - name: Increase /u01 file system size
      command: >
        oci db vm-cluster update --vm-cluster-id {{ vm_cluster_id }}
        --update-details '{{ {"compartmentId":"{{ vm_cluster_id }}","additionalLocalFileSystems":[{"fileSystem":"/u01","sizeInGBs":{{ new_size }}}]}}'
      when: config_file.stat.exists

Terraform

Here’s an example code snippet to resize the /u01 file system.

provider "oci" {
  tenancy_ocid = "ocid1.tenancy.oc1..exampleuniqueID"
  user_ocid    = "ocid1.user.oc1..exampleuniqueID"
  fingerprint  = "your_fingerprint"
  private_key_path = "/path/to/your/private_key.pem"
  region       = "us-phoenix-1"
}

resource "oci_database_vm_cluster" "example_vm_cluster" {
  vm_cluster_id = "ocid1.vmcluster.oc1..exampleuniqueID"

  lifecycle {
    ignore_changes = [
      "additional_local_file_systems"
    ]
  }
}

resource "oci_database_vm_cluster_update" "resize_fs" {
  vm_cluster_id = oci_database_vm_cluster.example_vm_cluster.id

  additional_local_file_systems {
    file_system = "/u01"
    size_in_gbs = 50  # Size in GB
  }

  depends_on = [oci_database_vm_cluster.example_vm_cluster]
}

As always, before executing any code in your production environment, analyze what the code is doing and how, test it in a non-production environment. Hope it helps!

Leave a comment