<Insert Picture Here>
Oracle VM Templates for Oracle Database
Saar Maoz
Linux Development, Oracle Updated: 27-AUG-2013
Sin...
2
Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved.
Agenda
• Oracle VM Templates
– Why?
– History
...
3
Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved.
Start-Up in
Oracle VM Pool
VM 1
RAC
VM 2
RAC
V...
4
Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved.
Oracle VM Templates for Oracle Database
Histor...
5
Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved.
• The new Oracle VM Templates for Oracle Datab...
6
Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved.
• Oracle RAC has two types of deployments
– Pr...
7
Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved.
Oracle VM Templates for Oracle Database
Availa...
8
Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved.
Oracle VM Templates for Oracle Database
Delive...
9
Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved.
Oracle VM Templates for Oracle Database
Featur...
10
Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved.
Oracle VM Templates for Oracle Database
Featu...
11
Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved.
Oracle VM Templates for Oracle Database
Featu...
12
Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved.
Oracle VM Templates for Oracle Database
Highl...
13
Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved.
Oracle VM Templates for Oracle Database
Singl...
14
Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved.
What is Oracle Real Application Clusters ?
• ...
15
Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved.
Service
public network
Node1
Operating System...
16
Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved.
Oracle VM Templates for Oracle Database
RAC n...
17
Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved.
Guest VM
Guest OS
Service
Operating System
Or...
18
Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved.
Simple 2 Node Interview
Manual Deployment
19
Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved.
Building Single Instance or a Cluster
• After...
20
Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved.
DeployCluster Tool Features
Automated Deploym...
21
Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved.
DeployCluster Tool Features (Cont’d)
• Allow ...
22
Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved.
DeployCluster – What’s NEW
2013 release
• Ful...
23
Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved.
DeployCluster Options
Oracle VM Login Options...
24
Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved.
DeployCluster Options
DB/RAC OVM Template Opt...
25
Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved.
DeployCluster Options
DB/RAC OVM Template Opt...
26
Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved.
DeployCluster
Examples
• List all VMs with a ...
27
Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved.
Oracle RAC OneCommand (v1.1.0) for Oracle VM ...
28
Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved.
OSRevert
Switching RPMs made easy
• OSRevert ...
29
Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved.
Configuration parameters
• netconfig.ini (Net...
30
Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved.
Building Clusters with more than 2 nodes
• Cu...
31
Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved.
OVM2: Building a Cluster from DOM-0
• Stamp n...
32
Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved.
Running individual operations
• List all step...
33
Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved.
Running individual operations (Cont’d)
• Each...
34
Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved.
Usage: racovm.sh (v2.0.12) DB/RAC OVM main dr...
35
Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved.
Adding or Removing Node(s) / Instance(s)
• Fu...
36
Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved.
diskconfig.sh – Configures disks in VMs
• Ver...
37
Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved.
netconfig.sh – Configures network in VMs
• Fu...
38
Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved.
doall.sh – Run command on all nodes
doall.sh ...
39
Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved.
Oracle VM Templates for Oracle Database
Usefu...
41
Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved.
Q U E S T I O N SQ U E S T I O N S
A N S W E ...
42
Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved.
Upcoming SlideShare
Loading in …5
×

Oracle VM Templates for Oracle Database

527 views

Published on

Oracle VM Templates for Oracle Database

Saar Maoz
Linux Development, Oracle Updated: 27-AUG-2013
Single Instance and Oracle RAC, DeployCluster Tool & OneCommand Automation

Published in: Technology, News & Politics
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
527
On SlideShare
0
From Embeds
0
Number of Embeds
8
Actions
Shares
0
Downloads
0
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Oracle VM Templates for Oracle Database

  1. 1. <Insert Picture Here> Oracle VM Templates for Oracle Database Saar Maoz Linux Development, Oracle Updated: 27-AUG-2013 Single Instance and Oracle RAC, DeployCluster Tool & OneCommand Automation
  2. 2. 2 Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved. Agenda • Oracle VM Templates – Why? – History – What’s New: Single Instance & 12c Support • DeployCluster tool • Demo / Discussion – DeployCluster demos: • Single Instance or Oracle Restart (Single Instance HA) • 4-Nodes Flex Cluster or Flex ASM • 4-Nodes NFS Cluster • Mix Match OS & Oracle disks • OSRevert functionality – OneCommand demos: • Add / Remove Nodes / Instances – Live Migration
  3. 3. 3 Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved. Start-Up in Oracle VM Pool VM 1 RAC VM 2 RAC VM NAS, SAN, iSCSI Oracle VM Servers Oracle VM Server Pool VM VM Oracle VM Templates Rapid Application Deployment E-Delivery Download from Oracle • Pre-built, pre-configured VM • Complete Single Instance OR Clusterware, ASM, RAC installation (11gR2 or 12c) • Enterprise Manager DBControl or DBExpress in 12c Import to Oracle VM Manager File DB/ RAC VM Customize & Save as Golden Images VM Save days or weeks in installation and configuration time VM SI
  4. 4. 4 Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved. Oracle VM Templates for Oracle Database History • 2010: Initial release with Oracle VM 2 deployment options only. • May 2012: The deploycluster tool was released making Oracle VM 3 deployments extremely easy. • August 2013: The templates support Single Instance, Oracle Restart and the most talked about Oracle 12c features: – Flex Cluster – Flex ASM – Container/Pluggable Database
  5. 5. 5 Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved. • The new Oracle VM Templates for Oracle Database support three deployment modes: – Single Instance Database • Database on filesystem – Oracle Restart (formerly known as Single Instance/HA) • Database on ASM or filesystem (in 12c can be in ACFS) – Oracle RAC • Database on ASM or shared filesystem (in 12c can be in ACFS) • In addition, Clusterware-only mode available – Applicable to Oracle RAC and Oracle Restart – No Database installed, DB Home may be removed (reduced memory/disk) Deployment Modes New in 2013 releases
  6. 6. 6 Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved. • Oracle RAC has two types of deployments – Production Oracle RAC OVM Configurations [Supported] • Each RAC node must be deployed on a separate physical server • Shared database disks must be on physical disks – Test Oracle RAC OVM Configurations • Above requirements are relaxed –Templates support both configurations, each has its own installation guide to help with steps • Single Instance deployment has no such requirements Deployment Configuration Oracle RAC
  7. 7. 7 Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved. Oracle VM Templates for Oracle Database Availability • Currently available for 12.1.0.1.0 (64bit only), 11.2.0.4.0, 11.2.0.3.7, 11.2.0.2.11, 11.2.0.3.2, 11.2.0.2.6, 11.2.0.3.0, 11.2.0.2.2, 11.2.0.2.0, 11.2.0.1.4, 11.2.0.1.2 ,11.1.0.7.6, 11.1.0.7.2 on Oracle Linux 32 and 64 bits – Download from e-delivery or My Oracle Support Note:1185244.1: https://support.oracle.com/oip/faces/secure/km/DocumentDisplay.jspx?id=1185244.1 • Templates are distributed as archive files containing two disk images – Oracle Linux 5 U4/U5/U6/U7/U8/U9 & OL6U2/U4 system disk • OL5U8, OL6U2 and higher are OVMAPI enabled (Deploycluster) • 11.2.0.2.11, 11.2.0.3.7, 11.2.0.4.0, 12.1.0.1.0 and higher have Single Instance support – Oracle disk image (Clusterware, Database, ASM) • Suitable for Single Instance or RAC • All homes updated to latest Bundle / CPU Patch level • Entire install is automated, with the user only providing minimal input
  8. 8. 8 Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved. Oracle VM Templates for Oracle Database Delivery Mechanism • 32 bit and 64bit versions • Image files are built with ‘sparse file’ support • Inside each zip are tgz/tbz archives with the following files: – VM Config file (text file) – Opatch lsinventory sample output – README / PDFs for installing – Disk 1 image file: Operating System – Disk 2 image file: Oracle Software • Includes Clusterware, ASM & RAC (suitable for Single Instance) • Follow the instructions in provided PDF files or document for the new DeployCluster tool
  9. 9. 9 Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved. Oracle VM Templates for Oracle Database Features (2013 releases) • Builds production ready Single Instance or Oracle RAC (Cluster) in several minutes! • Single Instance & Oracle Restart support 11gR2/12c (including Deploycluster) • In 12c Only: – Full automation of Flex Cluster and/or Flex ASM including adding/removing N-number of Hub/Leaf nodes – Support for dedicated ASM network interface – Support creation/deletion of Container DB with Pluggable Databases
  10. 10. 10 Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved. Oracle VM Templates for Oracle Database Features (2013 releases, Cont’d) • Database files may reside in: – ASM, CFS (NFS/OCFS2) or local filesystem (Single Instance) – ACFS filesystem (12c only) • In both 12c & 11gR2: – Support for Administrator or Policy Managed Databases – OCR/Voting may reside in ASM or CFS (NFS/OCFS2) – OS disks ship with OSRevert fully integrated into first boot • Allows reduced OS footprint pre/post deployment • Support for DB EXPRESS during DB creation (12c only) • All OS templates boot latest UEK2 (seamless transition to HVM mode)
  11. 11. 11 Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved. Oracle VM Templates for Oracle Database Features (Cont’d) • The 11.2 Templates (prior to 2013 releases) – OVM3: Network & N-node build using DeployCluster tool – OVM2: Automatic network & N-node build directly from Dom0 – Mixing & matching any OS and Oracle disks – Automatic add/remove any number of nodes or instances – Run as root, oracle/grid users (w/sudo configured on build node only) – Support for role separation or non-role separation (default) – Options to modify environment before/after a build (Create DB, DB Console, ACFS filesystem, etc) – Post deployment supports RAC One Node, Policy Managed, etc. • The 11.1 Templates: – Simple 2-node interview, then manual add node
  12. 12. 12 Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved. Oracle VM Templates for Oracle Database Highlevel Workflow • Step 1 Download Template 32/64bits 11.1/11.2/12.1 • Step 2 Register/Import Template with Oracle VM Manager • Step 3 Create VM(s); Single Instance: 1 VM, RAC: 2+ VMs • Step 4 (Shared) Storage; Single Instance disks are optional – For Non Production: Create Shared Disk using OVM Manager • Assigned Shared disk to all Guest VMs using OVM Manager – For Production Deployment: Identify Physical Shared Disk • OVM2: Update all Guest VM’s vm.cfg files with location of shared disk • OVM3: Attach physical disks using Oracle VM Manager • Step 5 Boot all VMs or use Deploycluster tool and skip Step 6 • Step 6 Run buildcluster/buildsingle to Configure and build the environment
  13. 13. 13 Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved. Oracle VM Templates for Oracle Database Single Instance deployment DM-0 What do I need to try this myself ? Single Instance • Minimum Requirements • One core • 2GB of memory or more • 30GB of disk or more X86/64 Bare-Metal Server DOM-0 Hypervisor CPU Mem I/OCPU CPU Mem Mem I/O Guest VM Dom0 OS DOM 0 Single Instance Database Operating System Listener
  14. 14. 14 Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved. What is Oracle Real Application Clusters ? • Allows a Shared Database to run on 2 or more nodes • Requires – Shared Disk for Database Files – Public and Private Networks – Common OS version across nodes • Whitepaper: Oracle Real Application Clusters in Oracle VM Environments http://www.oracle.com/technetwork/products/clustering/ oracle-rac-in-oracle-vm-environment-131948.pdf
  15. 15. 15 Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved. Service public network Node1 Operating System Oracle Clusterware instance 1 ASM VIP1 Listener Node 2 Operating System Oracle Clusterware instance 2 ASM VIP2 Listener Service Node n Operating System Oracle Clusterware instance n ASM VIPn Listener Service /…/ Redo / Archive logs all instances shared storage Database / Control files OCR and Voting Disks Managed by ASM Oracle RAC Architecture
  16. 16. 16 Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved. Oracle VM Templates for Oracle Database RAC non-Production deployment DM-0 What do I need to try this myself ? 2-node Test 11gR2 RAC • Minimum Requirements • Two or more cores • 4GB of memory or more • 30GB of disk or more Guest VM Guest OS Service Operating System Oracle Clusterware instance 1 Oracle ASM Listener X86/64 Bare-Metal Server DOM-0 Hypervisor CPU Mem I/OCPU CPU Mem Mem I/O Guest VM Dom0 OS DOM 0 Guest OS Service Operating System Oracle Clusterware instance 2 Oracle ASM Listener
  17. 17. 17 Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved. Guest VM Guest OS Service Operating System Oracle Clusterware instance 1 Oracle ASM Listener X86/64 Bare-Metal Server DOM-0 Hypervisor Oracle VM Templates for Oracle Database RAC Production deployment X86/64 Bare-Metal Server DOM-0Hypervisor CPU Mem I/OCPU CPU Mem Mem I/O CPU Mem I/OCPU CPU Mem Mem I/O Dom0 OS DOM 0Guest VM Dom0 OS DOM 0 Guest OS Service Operating System Oracle Clusterware instance 2 Oracle ASM Listener
  18. 18. 18 Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved. Simple 2 Node Interview Manual Deployment
  19. 19. 19 Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved. Building Single Instance or a Cluster • After initial boot, to build Single Instance or a Cluster, run: /u01/racovm/buildsingle.sh OR: /u01/racovm/buildcluster.sh – Automatically builds Single Instance or a cluster based on netconfig.ini & params.ini – Automatically writes a build log and progress log • Internal testers report: – Single Instance ~11minutes, w/o relink: 6minutes – 2 node RAC, 18 minutes – 4 node RAC, 23 minutes – End-to-end, including Database Creation (DBCA) – 101-Node Flex Cluster done in ~10 hours (including OVM installation)
  20. 20. 20 Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved. DeployCluster Tool Features Automated Deployment • Allows for fully automated end-to-end cluster deployment of N- node clusters – Assuming VMs are pre-created w/NICs & shared disks • No Dom0 access or login to VMs is needed • All previously released templates are fully compatible – As long as the OVMAPI enabled OS disk is used • Works on Oracle VM 3 versions (3.2, 3.1 and 3.0) • Option to simulate a deployment attempt – Use the --dryrun (-D) flag • Allows sending any random key(s) to VMs – Use the --extrakeys (-K) flag • Tool options available in: deploycluster.ini
  21. 21. 21 Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved. DeployCluster Tool Features (Cont’d) • Allow ANY build configuration (SID name, user name, passwords, ports, etc.) to be modified from outside the guests at deploy time – Supply a custom params.ini using --params (-P) flag • VMs can be identified by UUID or simple name – Simple name may include the "*" and "?" wildcard characters – Duplicate or illegal names detected on actual command line or on Oracle VM Manager • All exceptions are trapped showing a default of 4 lines from it • Automated logfile written upon each invocation • Easy to re-attempt a failed deployment – Only fix what failed, and leave other VMs running
  22. 22. 22 Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved. DeployCluster – What’s NEW 2013 release • Full support for Flex Cluster and/or Flex ASM deployments – Allows for optional 3rd network adapter (NIC) • Support for Single Instance or Single Instance/HA (Oracle Restart) deployments • Exclusively used to deploy the 101-Node Flex Cluster
  23. 23. 23 Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved. DeployCluster Options Oracle VM Login Options -u <username>, --username=<username> Username to connect to Oracle VM Manager -p <password>, --password=<password> Password to connect to Oracle VM Manager -H <host>, --host=<host> Manager hostname (use either -H or -U or none) -U <url>, --url=<url> Login URL to Manager (default: tcp://localhost:54321 or tcps://host:54322 when -H used to remote node) To configure secure connection to Manager, see Note#1456338.1 https://support.oracle.com/oip/faces/secure/km/DocumentDisplay.jspx?id=1456338.1
  24. 24. 24 Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved. DeployCluster Options DB/RAC OVM Template Options -L, --list_vms_only List VMs seen via Oracle VM Manager; Honors -M flag -M <List of VMs>, --vms=<List of VMs> List of existing VM names or IDs to deploy cluster on. Supports "*" & "?" wildcard characters -P <params.ini>, --params=<params.ini> Location of params.ini file (sent to VMs) -N <netconfig.ini>, --netconfig=<netconfig.ini> Location of netconfig.ini file (sent to VMs)
  25. 25. 25 Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved. DeployCluster Options DB/RAC OVM Template Options (Cont’d) -B <yes|no>, --buildcluster=<yes|no> Start a buildcluster/buildsingle post-network setup (default: yes. [If netconfig_args passed then default: no]) -G <args>, --netconfig_args=<args> Advanced: Arguments to netconfig; override defaults -K <zip file>, --kitfile=<zip file> Advanced: Unzip new (partial) kitfile inside the VMs -X <file>, --extrakeys=<file> Advanced: File containing extra keys to send all VMs -D, --dryrun Show what will be done (do not start VMs or send msgs)
  26. 26. 26 Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved. DeployCluster Examples • List all VMs with a simple name of “racnode.?” on Manager – $ deploycluster.py –u admin –N netconf.ini –M racnode.? -L • Deploy all VMs with a simple name of “racnode.?”: – $ deploycluster.py –u admin –N netconf.ini –M racnode.? – See output on following slide • Deploy a VM as the 3rd node in an existing cluster – $ deploycluster.py –u admin –N netconf.ini –M racnode3 –G –n3
  27. 27. 27 Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved. Oracle RAC OneCommand (v1.1.0) for Oracle VM - deploy cluster - (c) 2011-2012 Oracle Corporation (com: 26700:v1.1.0, lib: 126247:v1.1.0, var: 1100:v1.1.0) - v2.4.3 – server1.us.oracle.com (x86_64) Invoked as root at Sun Jun 3 23:28:53 2012 (size: 37500, mtime: Wed May 16 00:13:19 2012) Using: ./deploycluster.py -u admin -p **** -M racnode.? -P params-sample.ini -N netconfig30-3nodes.ini INFO: Attempting to connect to Oracle VM Manager... INFO: Oracle VM Client (3.1.1.305) protocol (1.8) CONNECTED (tcp) to Oracle VM Manager (3.1.1.212) protocol (1.8) IP (141.22.242.50) UUID (0004fb0000010000f2b5b95576e2c301) INFO: Inspecting /home/oracle/netconfig30-3nodes.ini for number of nodes defined.... INFO: Detected 3 nodes in: /home/oracle/netconfig30-3nodes.ini INFO: Located a total of (3) VMs; 3 VMs with a simple name of: ['racnode.0', 'racnode.2', 'racnode.1'] INFO: Verifying all (3) VMs are in Running state INFO: VM with a simple name of "racnode.0" is in a Stopped state, attempting to start it...OK. INFO: VM with a simple name of "racnode.2" is in a Stopped state, attempting to start it...OK. INFO: VM with a simple name of "racnode.1" is in a Stopped state, attempting to start it...OK. INFO: Detected that all (3) VMs specified on command have (3) common shared disks between them (ASM_MIN_DISKS=3) INFO: The (3) VMs passed basic sanity checks and in Running state, sending cluster details as follows: netconfig.ini (Network setup): /home/oracle/netconfig30-3nodes.ini params.ini (Overall build options): /home/oracle/params-sample.ini buildcluster: yes INFO: Starting to send cluster details to all (3) VM(s)...... INFO: Sending to VM with a simple name of "racnode.0".............. INFO: Sending to VM with a simple name of "racnode.2"..... INFO: Sending to VM with a simple name of "racnode.1"...... INFO: Cluster details sent to (3) VMs... Check log (default location /u01/racovm/buildcluster.log) on build VM (racnode.0)... INFO: deploycluster.py completed successfully at 23:30:26 in 92.6 seconds (01m:32s) Logfile at: /home/oracle/deploycluster/deploycluster1.log
  28. 28. 28 Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved. OSRevert Switching RPMs made easy • OSRevert installed on all DB/RAC templates since 2013 – ‘basic’ & ‘db-minimum’ saved by default • Allows saving/deleting/listing of “RPM Targets” – Dependencies resolved “implicitly” on running-system • Allows “reverting” to any previously saved RPM Target – Uses rpm & yum exclusively to install/remove rpms • Fully integrated into Deploycluster – Selected RPM Target (NETCONFIG_OSREVERT_TARGET) is reverted to prior to buildsingle/buildcluster on all nodes
  29. 29. 29 Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved. Configuration parameters • netconfig.ini (Network information) – Node name/IP, (6 items per node) – In 12c: Node Roles (Hub, Leaf) – NIC information – Mostly fixed data – Deployment Mode (Single Instance/Oracle Restart) – Cluster name (required for RAC) • params.ini (Build related options) – Database name, user names, disks, etc. – More dynamic data
  30. 30. 30 Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved. Building Clusters with more than 2 nodes • Customer supplies an initialisation file. (netconfig.ini) • OVM2: Stamp file into shared storage • OVM3: Deploycluster passes network information to all VMs • Repeat this section, identifying the 6 attributes for each node netconfig.ini # Node specific information NODE1ROLE=HUB (For Flex Cluster) NODE1=test170 NODE1IP=192.168.1.170 NODE1PRIV=test170-priv NODE1PRIVIP=10.10.10.170 NODE1VIP=test170-vip NODE1VIPIP=192.168.1.172 NODE2=test171 NODE2IP=192.168.1.171 NODE2PRIV=test171-priv NODE2PRIVIP=10.10.10.171 NODE2VIP=test171-vip NODE2VIPIP=192.168.1.173
  31. 31. 31 Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved. OVM2: Building a Cluster from DOM-0 • Stamp netconfig.ini to shared disk: # ./netconfig.sh -W -c /dev/sdxyz – If filesystem disk, use “losetup –vf” to loop mount the disk, then stamp the loop device. • Boot VMs with node number hint (on Dom0): # xm create -c vm.cfg extra="console=hvc0 template-reconfig-args=’-R -n1 -b’" (node 1) # xm create -c vm.cfg extra="console=hvc0 template-reconfig-args=’-R -n2’" (node 2) -R read network config -n1 node 1 -b build node • Above will automatically configure the network on the new VMs and build a 2 node cluster
  32. 32. 32 Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved. Running individual operations • List all steps: /u01/racovm/racovm.sh -l • Running individual steps in sequence: /u01/racovm/racovm.sh -S setsshroot,checklocal • Most steps can be run global or local (add ‘local’ to step) • Any failure of any step will stop execution • Combination of common steps are also available as special steps, e.g. ‘buildcluster’ or command line flags, e.g. -c • To cleanup run: /u01/racovm/racovm.sh -S clean
  33. 33. 33 Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved. Running individual operations (Cont’d) • Each invocation prints this banner: • Timing for each operation: Invoking on test125 as root... Oracle RAC 11gR2 OneCommand (v1.1) for Oracle VM - (c) 2010 Oracle Cksum: [4028880687 234100 racovm.sh] at Mon Oct 4 14:14:14 EDT 2010 Kernel: 2.6.18-164.0.0.0.1.el5xen (i686) [2 processor(s)] 1800 MB Step(s): setsshroot,checklocal 2010-10-04 14:48:16:[buildcluster:Start:test235] Build 11gR2 RAC Cluster 2010-10-04 15:32:36:[buildcluster:Done :test235] Build 11gR2 RAC Cluster 2010-10-04 15:32:36:[buildcluster:Time :test235] Completed successfully in 2660 seconds (0h:44m:20s)
  34. 34. 34 Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved. Usage: racovm.sh (v2.0.12) DB/RAC OVM main driver - RAC Mode Oracle DB/RAC 12c/11gR2 OneCommand (v2.0.12) for Oracle VM - (c) 2010-2013 -c : Builds a RAC cluster including database [buildcluster] -g : Configures & starts Grid Infrastructure on all nodes calls: setsshroot,copykit,usrsgrps,printparams,setsshora,diskconfig,check, creategrid,cvupostcrs,clusterstate -r : Configures RAC Home by running clone.pl on all nodes (no DBCA) [racclone] -d : Run DBCA to create the RAC database [createdb] -p : Setup passwordless ssh for Oracle users between all nodes [setsshora] -P : Setup passwordless ssh for root user between all nodes [setsshroot] -S <stepname>,<stepname> ... : Run individual steps (comma separated list) stops execution on first error -N <node3>,<node4> .. : List of nodes to add or remove Required for 'addnodes' 'removenodes' 'addinstances' 'deleteinstances' Optional for 'createdb' -l : List all available steps -s : Skip confirmations -h : Prints this help message NOTE: Specify one of the above options in each invocation (-S flags allows multiple steps) The -c flag is equivalent to -g, -r, -d called in sequence. See params.ini configuration file for further options RACOVM Command Line Options
  35. 35. 35 Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved. Adding or Removing Node(s) / Instance(s) • Fully automated addition and removal of nodes or instances • Simply run: ./racovm.sh -S addnodes -N node2,node3 Or: ./racovm.sh -S removenodes -N node2,node3 Or: ./racovm.sh -S addinstances -N node2,node3 Or: ./racovm.sh -S deleteinstances -N node2,node3
  36. 36. 36 Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved. diskconfig.sh – Configures disks in VMs • Verifies disks are not held on any node by – ASM, ASMLib, RAID device, PowerPath, Device Mapper, User Application, Filesystem, Swap Device • Stamps and discovers disks on all nodes (verify sharedness) • Auto-partition & align data to 1MB offset (default) • Supports MSDOS or GPT partition table • Merges needed udev rules to /etc/udev/… – Supports EL4, OL5/OL6 & SLES10, SLES11 • Supports but does not do the initial creation of – ASMLib – Multipath
  37. 37. 37 Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved. netconfig.sh – Configures network in VMs • Full validation on user input, NIC names, IP/subnet masks • Checks for duplicate IPs on subnet (arping) • Writes /etc/hosts and related ifcfg-*, resolv.conf, etc. files to fully configure network • Allows stamping of netconfig.ini to shared storage; helps in N-node network configuration, useful for Oracle VM 2 (from dom0 or inside guests) • Supports and configures bonding (not needed inside guests)
  38. 38. 38 Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved. doall.sh – Run command on all nodes doall.sh [options] <command> | "<command1>;<command2>;..<commandX>" -l <user> : Login as user (default: current user) -x : Run commands in sequence (default: run in parallel) -c <#> : Allow only <#> concurrent operations (default: unlimited) -P : Print commands as they are executed (default: noprint) -p : Setup passwordless SSH for <user> on all nodes listed in netconfig.ini -s : Skip confirmation for passwordless SSH setup -u : Skip unreachable nodes -U : Skip nodes that are unreachable or without passwordless SSH configured -L first|last|skip : Local node execution order -N <node1>,<node2> .. : Nodes to run on (default: all nodes in netconfig.ini)Examples: ./doall.sh -L last reboot ./doall.sh -ps /u01/app/11.2.0/grid/bin/diagcollection.sh
  39. 39. 39 Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved. Oracle VM Templates for Oracle Database Useful Links • OTN Home pages: – 12c/11gR2: http://www.oracle.com/technetwork/server-storage/vm/database- templates-12c-11gr2-1972804.html – 11.1:http://www.oracle.com/technetwork/database/clustering/overview/rac- 092962.html • Download Locations: – From https://edelivery.oracle.com/oraclevm: 12.1.0.1, 11.2.0.1.* & 11.1.0.7.* – From My Support http://support.oracle.com/ (support subscription): • 11.2.0.4.0 Patch# 14000094 11.2.0.3.7 Patch# 14000092 (new) • 11.2.0.3.2 Patch# 13818831 11.2.0.2.11 Patch# 14000021 (new) • 11.2.0.3.0 Patch# 12694014 11.2.0.2.6 Patch# 14000016 • 11.2.0.2.0 Patch# 10113572 11.2.0.2.2 Patch# 11836831 – All described in Note:1185244.1: https://support.oracle.com/oip/faces/secure/km/DocumentDisplay.jspx?id=1185244.1 • Training Video on RAC Special Interest Group (SIG): – Dates: 9-Dec-2010, 8-DEC-2011, 19-JUL-2012, 29-AUG-2013 – http://www.oracleracsig.org/pls/apex/f?p=105:206:::NO
  40. 40. 41 Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved. Q U E S T I O N SQ U E S T I O N S A N S W E R SA N S W E R S
  41. 41. 42 Copyright © 2012-2013, Oracle and/or its affiliates. All rights reserved.

×