Configuring your private cloud for installing Oracle RAC

You can deploy Oracle Real Application Clusters (RAC) in your private cloud. This document describes how to deploy a new cluster and optimize a virtual machine (VM) for the Oracle RAC solution. After completing these steps, you can install and configure Oracle RAC.

Storage policy

Successful implementation of Oracle RAC requires an adequate number of nodes in the cluster. In vSAN storage policy, a failure to tolerate (FTT) calculation is applied to data disks that are used for storing the database, log, and redo disks. The required number of nodes to effectively tolerate failures is 2N+1, where N is the value of FTT.

For example, if the desired FTT is 2, then the total number of nodes in the cluster must be 2*2+1 = 5.

Overview of deployment

The following sections describe how to set up your private cloud environment for Oracle RAC.

Best practices for disk configuration

The recommended disk configuration includes both dedicated and shared disks. Mount the operating system and software installation disks only on the individual virtual machines (VMs). Share other disks that perform specific functions across the Oracle RAC cluster.

Oracle disk overview.

The following table describes the disks that are used in the example configurations shown later in this document.

Disk Purpose Shared disk
OS Operating system disk No
GRID Install location for Oracle Grid software No
DATABASE Install location for Oracle database software No
ORAHOME Base location for Oracle database binaries No
DATA1, DATA2, DATA3, DATA4 Disk where Oracle database files are stored Yes
REDO1, REDO2, REDO3, REDO4, REDO5, REDO6 Redo log disks Yes
OCR1, OCR2, OCR3, OCR4, OCR5 Voting disks Yes
FRA1, FRA2 Fast recovery area disks Yes

Virtual machine configuration

  • Configure each VM with four SCSI controllers.
  • Set the SCSI controller type to VMware paravirtual.
  • Create multiple virtual disks (.vmdk).
  • Mount each disk on a different SCSI controller.
  • Set the multi-writer sharing type for shared cluster disks.
  • Define a vSAN storage policy to ensure high availability of disks.

Operating system and software disk configuration

Configure each Oracle VM with multiple disks for the host operating system, swap, software installation, and other OS functions. These disks are not shared among the VM.

  • For each Oracle RAC VM, configure and mount three virtual disks:
    1. OS disk
    2. Disk for storing Oracle Grid installation files
    3. Disk for storing Oracle database installation files
  • Configure disks as Thin Provisioned.
  • Mount each disk on the first SCSI controller (SCSI0).
  • Set sharing to No sharing.
  • Use vSAN policies to define redundancy on the storage.

Oracle RAC physical disk.

Data disk configuration

Data disks are primarily used for storing database files.

  • For each Oracle RAC VM, configure and mount four virtual disks.
  • Mount each disk on a different SCSI controller.
  • Configure each virtual disk as Thick Provision Eager Zeroed.
  • Set sharing to Multi-writer.
  • Configure the disks as an Automatic Storage Management (ASM) disk group.
  • Use vSAN policies to define redundancy on the storage.
  • Set ASM redundancy to External.

Oracle RAC data disk.

Redo log disk configuration

Redo-log files store copies of the changes made to the database. Use the log files when you need to recover data after any failure.

  • For each Oracle RAC VM, configure and mount six disks.
  • Mount each disk on a different SCSI controller.
  • Configure each virtual disk as Thick Provision Eager Zeroed.
  • Set sharing to Multi-writer.
  • Configure redo log disks as two ASM disk groups, with three disks per group.
  • Set ASM redundancy to Normal.
  • Create five redo-log files in each ASM redo log group.
SQL > alter database add logfile thread 1 ('+ORCLRAC_REDO1','+ORCLRAC_REDO2') size 1G;
SQL > alter database add logfile thread 1 ('+ORCLRAC_REDO1','+ORCLRAC_REDO2') size 1G;
SQL > alter database add logfile thread 1 ('+ORCLRAC_REDO1','+ORCLRAC_REDO2') size 1G;
SQL > alter database add logfile thread 1 ('+ORCLRAC_REDO1','+ORCLRAC_REDO2') size 1G;
SQL > alter database add logfile thread 1 ('+ORCLRAC_REDO1','+ORCLRAC_REDO2') size 1G;
SQL > alter database add logfile thread 2 ('+ORCLRAC_REDO1','+ORCLRAC_REDO2') size 1G;
SQL > alter database add logfile thread 2 ('+ORCLRAC_REDO1','+ORCLRAC_REDO2') size 1G;
SQL > alter database add logfile thread 2 ('+ORCLRAC_REDO1','+ORCLRAC_REDO2') size 1G;
SQL > alter database add logfile thread 2 ('+ORCLRAC_REDO1','+ORCLRAC_REDO2') size 1G;
SQL > alter database add logfile thread 2 ('+ORCLRAC_REDO1','+ORCLRAC_REDO2') size 1G;

Oracle RAC redo disk.

Oracle voting disk configuration

Problems can occur in an Oracle RAC cluster if two nodes lose connectivity with each other while continuing to operate independently under the mistaken assumption that the other node isn't functioning. Voting disks provide an additional communication channel that helps to avoid this problem.

  • For each Oracle RAC VM, configure and mount five disks.
  • Mount all disks on one SCSI controller.
  • Configure each virtual disk as Thick Provision Eager Zeroed.
  • Set sharing to Multi-writer.
  • Configure the disks as an ASM disk group.
  • Set ASM redundancy to High.

Oracle RAC voting disk.

Oracle fast recovery area disk configuration (optional)

The fast recovery area (FRA) file system is managed by the Oracle ASM disk group. FRA provides a shared storage location for backup and recovery files. Oracle creates archived logs and flashback logs in the FRA. Oracle Recovery Manager (RMAN) can optionally store its backup sets and image copies in the FRA for restoring files during media recovery.

  • For each Oracle RAC VM, configure and mount two disks.
  • Mount each disk on a different SCSI controller.
  • Configure each virtual disk as Thick Provision Eager Zeroed.
  • Set sharing to Multi-writer.
  • Configure the disks as an ASM disk group.
  • Set ASM redundancy to External.

Oracle RAC FRA disk.

Deploy private cloud vSphere cluster

To deploy a vSphere cluster on your private cloud, follow this process:

  1. Create the primary management cluster for your private cloud. From the Google Cloud VMware Engine portal, create a private cloud. Google creates a default vCenter user named CloudOwner in the new private cloud. For information about the default private cloud user and permission model, see Private cloud permission model.
  2. From the portal, add nodes to the private cloud by adding a cluster. This cluster is used to deploy Oracle RAC. Select the number of nodes based on the FTT you want. Use a minimum of three nodes.

Set up networking for Oracle RAC

  1. In your private cloud, create two subnets, one for the Oracle public network and one for the Oracle private network. Assign the appropriate subnet CIDRs.
  2. In the private cloud vCenter, create the distributed port groups.
  3. Set up a DHCP and DNS server VM on your management cluster for the Oracle environment.
  4. Configure DNS forwarding on the DNS server installed in the private cloud.

Set up vSAN storage policies

vSAN policies define the FTT and disk striping for the data stored on the VM disks. The storage policy you create must be applied to the VM disks while creating the VM.

  1. Sign in to the vSphere client of your private cloud.
  2. Select Policies and Profiles.
  3. Select VM Storage Policies, and then select Create a VM storage Policy.
  4. Enter a meaningful name for the policy and click Next.
  5. Under Policy structure, select Enable rules for vSAN storage and click Next.
  6. In the vSAN > Availability section, select None for Site disaster tolerance.
  7. For Failures to tolerate, select the RAID - Mirroring option for the FTT you want.
  8. Under Advanced, select the number of disk stripes per object.
  9. For the Object space reservation, select Thick Provisioned.
  10. Select Disable object checksum. Click Next.
  11. Follow the on-screen instructions to view the list of compatible vSAN datastores, review the settings, and finish the setup.

Create Oracle VMs and create shared VM disks for Oracle

To create a VM for Oracle, you can clone an existing VM or create a new one. This section describes how to create a new VM and then clone it to create a second one after installing the base operating system. After the VMs are created, you can create and add disks to them. Oracle cluster uses shared disks for storing data, logs, and redo logs.

Create VMs

  1. In vCenter, click the Hosts and Clusters icon. Select the cluster that you created for Oracle.
  2. Right-click the cluster and select New Virtual Machine.
  3. Select Create new virtual machine and click Next.
  4. Name the machine, select the Oracle VM's location, and click Next.
  5. Select the cluster resource and click Next.
  6. Select the vSAN datastore for the cluster and click Next.
  7. Keep the default ESXi 6.5 compatibility selection and click Next.
  8. Select the guest OS of the ISO for the VM that you are creating and click Next.
  9. Select the hard disk size that is required for installing the OS.
  10. To install the application on a different device, click Add new device.
  11. Select network options and assign the distributed port group that you created for the public network.
  12. To add network interfaces, click Add new device and select the distributed port group that you created for the private network.
  13. For New DC/DVD Drive, select the datastore ISO file that contains the ISO for the preferred operating system installation. Select the file you previously uploaded to the ISOs and Templates folder and click OK.
  14. Review the settings and click OK to create the new VM.
  15. Start the VM. Install the operating system and any required updates.

After the operating system is installed, you can clone a second VM. Right-click the VM entry and select the clone option.

Create shared disks for VMs

Oracle uses shared disks to store the data, log, and redo-log files. You can create a shared disk on vCenter and mount it on both of the VMs. For higher performance, place the data disks on different SCSI controllers. The following steps show how to create a shared disk on vCenter and then attach it to a VM. Use the vCenter Flash client to modify the VM properties.

Create disks on the first VM

  1. In vCenter, right-click one of the Oracle VMs and select Edit settings.
  2. In the New device section, select SCSI controller and click Add.
  3. In the New device section, select New Hard disk and click Add.
  4. Expand the properties of New Hard disk.
  5. Specify the size of the hard disk.
  6. Specify the VM storage policy to be the vSAN storage policy that you defined in Set up vSan storage policies.
  7. Select the location as a folder on vSAN datastore. The location helps with browsing and attaching the disks to a second VM.
  8. For disk provisioning, select Thick provision eager zeroed.
  9. For sharing, specify Multi-writer.
  10. For the virtual device node, select the new SCSI controller that was created in step 2.

Repeat steps 2‑10 for all the new disks required for the Oracle data, logs, and redo-log files.

Attach disks to second VM

  1. In vCenter, right-click one of the Oracle VMs and select Edit settings.
  2. In the New device section, select SCSI controller and click Add.
  3. In the New device section, select Existing Hard disk and click Add.
  4. Browse to the location where the disk was created for the first VM and select the VMDK file.
  5. Specify the VM storage policy to be the vSAN storage policy that you defined in Set up vSan storage policies.
  6. For disk provisioning, select Thick provision eager zeroed.
  7. For sharing, specify Multi-writer.
  8. For the virtual device node, select the new SCSI controller that was created in step 2.

Repeat steps 2‑7 for all the new disks required for the Oracle data, logs, and redo-log files.

Set up VM-to-host affinity rules

VM-to-host affinity rules ensure that the VM runs on the desired host. You can define rules on vCenter so that Oracle VM runs on a host with adequate resources and meets any specific licensing requirements.

  1. In the VMware Engine portal, elevate the privileges of the CloudOwner user.
  2. Sign in to the vSphere client of your private cloud.
  3. In the vSphere client, select the cluster where Oracle VMs are deployed and click Configure.
  4. Under Configure, select VM/Host Groups.
  5. Click + Add.
  6. Add a VM group.
    1. Select VM group as the type.
    2. Enter the name of the group.
    3. Select the VMs and then click OK to create the group.
  7. Add a host group.
    1. Select Host Group as the type.
    2. Enter the name of the group.
    3. Select the hosts where the VMs will run and then click OK to create the group.
  8. To create a rule, click VM/Host rules.
  9. Click + Add.
    1. Enter a name for the rule and check Enable.
    2. For the rule type, select Virtual Machines to Host.
    3. Select the VM group that contains the Oracle VMs.
    4. Select Must run on hosts in this group.
    5. Select the host group that you created.
  10. Click OK to create the rule.

References

What's next