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.
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:
- OS disk
- Disk for storing Oracle Grid installation files
- 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.
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.
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 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 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.
Deploy private cloud vSphere cluster
To deploy a vSphere cluster on your private cloud, follow this process:
- Create the primary management cluster for your private cloud. From the Google Cloud console, 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.
- 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
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.
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.
- Sign in to the vSphere client of your private cloud.
- Select Policies and Profiles.
- Select VM Storage Policies, and then select Create a VM storage Policy.
- Enter a meaningful name for the policy and click Next.
- Under Policy structure, select Enable rules for vSAN storage and click Next.
- In the vSAN > Availability section, select None for Site disaster tolerance.
- For Failures to tolerate, select the RAID - Mirroring option for the FTT you want.
- Under Advanced, select the number of disk stripes per object.
- For the Object space reservation, select Thick Provisioned.
- Select Disable object checksum. Click Next.
- 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
- In vCenter, click the Hosts and Clusters icon. Select the cluster that you created for Oracle.
- Right-click the cluster and select New Virtual Machine.
- Select Create new virtual machine and click Next.
- Name the machine, select the Oracle VM's location, and click Next.
- Select the cluster resource and click Next.
- Select the vSAN datastore for the cluster and click Next.
- Keep the default ESXi 6.5 compatibility selection and click Next.
- Select the guest OS of the ISO for the VM that you are creating and click Next.
- Select the hard disk size that is required for installing the OS.
- To install the application on a different device, click Add new device.
- Select network options and assign the distributed port group that you created for the public network.
- To add network interfaces, click Add new device and select the distributed port group that you created for the private network.
- 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.
- Review the settings and click OK to create the new VM.
- 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
- In vCenter, right-click one of the Oracle VMs and select Edit settings.
- In the New device section, select SCSI controller and click Add.
- In the New device section, select New Hard disk and click Add.
- Expand the properties of New Hard disk.
- Specify the size of the hard disk.
- Specify the VM storage policy to be the vSAN storage policy that you defined in Set up vSan storage policies.
- Select the location as a folder on vSAN datastore. The location helps with browsing and attaching the disks to a second VM.
- For disk provisioning, select Thick provision eager zeroed.
- For sharing, specify Multi-writer.
- 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
- In vCenter, right-click one of the Oracle VMs and select Edit settings.
- In the New device section, select SCSI controller and click Add.
- In the New device section, select Existing Hard disk and click Add.
- Browse to the location where the disk was created for the first VM and select the VMDK file.
- Specify the VM storage policy to be the vSAN storage policy that you defined in Set up vSan storage policies.
- For disk provisioning, select Thick provision eager zeroed.
- For sharing, specify Multi-writer.
- 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.
- In the Google Cloud console, elevate the privileges of the CloudOwner user.
- Sign in to the vSphere client of your private cloud.
- In the vSphere client, select the cluster where Oracle VMs are deployed and click Configure.
- Under Configure, select VM/Host Groups.
- Click + Add.
- Add a VM group.
- Select VM group as the type.
- Enter the name of the group.
- Select the VMs and then click OK to create the group.
- Add a host group.
- Select Host Group as the type.
- Enter the name of the group.
- Select the hosts where the VMs will run and then click OK to create the group.
- To create a rule, click VM/Host rules.
- Click + Add.
- Enter a name for the rule and check Enable.
- For the rule type, select Virtual Machines to Host.
- Select the VM group that contains the Oracle VMs.
- Select Must run on hosts in this group.
- Select the host group that you created.
- Click OK to create the rule.
References
- About vSAN Policies
- Enabling or disabling simultaneous write protection provided by VMFS using the multi-writer flag
What's next
- Learn about support for Oracle workloads running in VMware Engine.
- Learn about VMware on your private cloud.