high availability and consolidation with se1 / se2 ... availability and consolidation with se1 / se2...

28
High Availability and Consolidation with SE1 / SE2 (without Virtualisation) Susanne Jahr DOAG-Konferenz Nürnberg 19.11.2015

Upload: phungdien

Post on 14-Mar-2018

245 views

Category:

Documents


8 download

TRANSCRIPT

Page 1: High Availability and Consolidation with SE1 / SE2 ... Availability and Consolidation with SE1 / SE2 ... •Virtual environment with ESX-Cluster already ... •One config file per

High Availability and Consolidation with SE1 / SE2

(without Virtualisation)

Susanne Jahr

DOAG-Konferenz Nürnberg 19.11.2015

Page 2: High Availability and Consolidation with SE1 / SE2 ... Availability and Consolidation with SE1 / SE2 ... •Virtual environment with ESX-Cluster already ... •One config file per

Herrmann & Lenz Services GmbH Herrmann & Lenz Solutions GmbH • Successful in the market since 1996 • Head Office: Burscheid (near Leverkusen) • Consulting, training and operation/remote maintenance on

the topic of the Oracle Database • Focus: High availability, tuning, migrations and

troubleshooting / monitoring • Herrmann & Lenz Solutions GmbH

– Products: Monitoring Module, Taskzone – Booth on level 2 (236)

2 2

Page 3: High Availability and Consolidation with SE1 / SE2 ... Availability and Consolidation with SE1 / SE2 ... •Virtual environment with ESX-Cluster already ... •One config file per

Overview

• Initial Situation

• Idea

• Realisation

• Conclusion

3

Page 4: High Availability and Consolidation with SE1 / SE2 ... Availability and Consolidation with SE1 / SE2 ... •Virtual environment with ESX-Cluster already ... •One config file per

Initial Situation

4

Page 5: High Availability and Consolidation with SE1 / SE2 ... Availability and Consolidation with SE1 / SE2 ... •Virtual environment with ESX-Cluster already ... •One config file per

Situation

• Multiple databases SE1

• Virtual environment with ESX-Cluster already in place

• Requirements: High Availability, databases are needed for production control

Page 6: High Availability and Consolidation with SE1 / SE2 ... Availability and Consolidation with SE1 / SE2 ... •Virtual environment with ESX-Cluster already ... •One config file per

Problem: Licensing Oracle and VM

Environment with Vsphere version Oracle-Licensing

6

Entire VCenter

Entire Environment…?

Entire Cluster

< 5.0: Migration within a cluster

>= 5.0: Migration within a Vcenter (cross-cluster)

>= 6.0: cross-Vcenter-migration possible

Page 7: High Availability and Consolidation with SE1 / SE2 ... Availability and Consolidation with SE1 / SE2 ... •Virtual environment with ESX-Cluster already ... •One config file per

Idea

7

Page 8: High Availability and Consolidation with SE1 / SE2 ... Availability and Consolidation with SE1 / SE2 ... •Virtual environment with ESX-Cluster already ... •One config file per

What if we provided HA without Virtualisation?

• We used to do that, didn't we…?

• High Availability of the database

• As little down time as possible during a maintenance window

• License costs not growing incontrollably

8

Page 9: High Availability and Consolidation with SE1 / SE2 ... Availability and Consolidation with SE1 / SE2 ... •Virtual environment with ESX-Cluster already ... •One config file per

Alternative: HA with Oracle GI

• Cluster consisting of 2 or more phsyical servers with Oracle Grid Infrastructure

• No RAC installation but single-instance installations on each node

• Prerequisite: Hardware restrictions in SE1 / SE2 must be met

Page 10: High Availability and Consolidation with SE1 / SE2 ... Availability and Consolidation with SE1 / SE2 ... •Virtual environment with ESX-Cluster already ... •One config file per

Alternative: HA with Oracle GI (2)

• Advantages

– Database(s) as cluster resource(s)

– Further use of existing SE1-licenses

„…Oracle Clusterware may be used to protect any application (restarting or failing over

the application in the event of a failure) on any server, free of charge. Oracle will provide support for Clusterware only if the server is running an Oracle product, which

may include Oracle Linux or Oracle Solaris, that is also under Oracle support. …“

Source: Oracle Database Licensing Information 12c Release 1

Page 11: High Availability and Consolidation with SE1 / SE2 ... Availability and Consolidation with SE1 / SE2 ... •Virtual environment with ESX-Cluster already ... •One config file per

Realisation

11

Page 12: High Availability and Consolidation with SE1 / SE2 ... Availability and Consolidation with SE1 / SE2 ... •Virtual environment with ESX-Cluster already ... •One config file per

Test Scenario

• Grid Infrastructure configuration with two blades

• Flex-ASM (no GNS subdomain)

• Single instance installations SE1 on each Server

12

Page 13: High Availability and Consolidation with SE1 / SE2 ... Availability and Consolidation with SE1 / SE2 ... •Virtual environment with ESX-Cluster already ... •One config file per

Test Scenario (2)

13

Source: Oracle Clusterware Administration and Deployment Guide

Page 14: High Availability and Consolidation with SE1 / SE2 ... Availability and Consolidation with SE1 / SE2 ... •Virtual environment with ESX-Cluster already ... •One config file per

Test-Szenario (3)

14

Page 15: High Availability and Consolidation with SE1 / SE2 ... Availability and Consolidation with SE1 / SE2 ... •Virtual environment with ESX-Cluster already ... •One config file per

Database Configuration

• CREATE DATABASE as Single Instance on one node with ASM (Shared Storage) and OMF

• Entry in /etc/oratab on both nodes

• Pointer to spfile within ASM in $ORACLE_HOME/dbs/init<SID>.ora on both nodes

15

Page 16: High Availability and Consolidation with SE1 / SE2 ... Availability and Consolidation with SE1 / SE2 ... •Virtual environment with ESX-Cluster already ... •One config file per

Database Configuration (2)

• Database is NOT registered in the clusterware with srvctl add database

• Registration as a cluster resource is necessary to benefit from the advantages of the GI configuration

• Registration with crsctl add resource • Prerequisites:

– Action Script definition of actions for start, stop and check events

– Configuration file resource creation and administration

16

Page 17: High Availability and Consolidation with SE1 / SE2 ... Availability and Consolidation with SE1 / SE2 ... •Virtual environment with ESX-Cluster already ... •One config file per

Action Script

• Accessible from any node

• More scripts may be called from here

• This means: Storage

– On every node or

– Within Shared Storage (ACFS-Volume)

17

Page 18: High Availability and Consolidation with SE1 / SE2 ... Availability and Consolidation with SE1 / SE2 ... •Virtual environment with ESX-Cluster already ... •One config file per

Action Script (2)

• Creation of separate disk group acfsdg and ACFS-Volume acfsvol1

18

ASMCMD [+] > volinfo -G acfsdg acfsvol1

Diskgroup Name: ACFSDG

Volume Name: ACFSVOL1

Volume Device: /dev/asm/acfsvol1-265

State: ENABLED

Size (MB): 5120

Resize Unit (MB): 64

Redundancy: UNPROT

Stripe Columns: 8

Stripe Width (K): 1024

mkfs -t acfs /dev/asm/acfsvol1-265

mkfs.acfs: version = 12.1.0.2.0

mkfs.acfs: on-disk version = 39.0

mkfs.acfs: volume = /dev/asm/acfsvol1-265

mkfs.acfs: volume size = 5368709120 (5.00 GB)

mkfs.acfs: Format complete.

[root@test-ora12-rac1 ~]# acfsutil registry -a /dev/asm/acfsvol1-265

/acfsmounts/acfsvol1

acfsutil registry: mount point /acfsmounts/acfsvol1 successfully added to Oracle

Registry

Page 19: High Availability and Consolidation with SE1 / SE2 ... Availability and Consolidation with SE1 / SE2 ... •Virtual environment with ESX-Cluster already ... •One config file per

Action Script (3) … 'start') $SWITCH_USER "$ACTION_SRC/crs_res/start_oracle.sh"

RET=$?

;;

'stop') $SWITCH_USER "$ACTION_SRC/crs_res/stop_oracle.sh"

RET=$?

;;

'clean') $SWITCH_USER "$ACTION_SRC/crs_res/stop_oracle_abort.sh"

RET=$?

;;

'check') EXISTS=`ps -ef | grep pmon | grep $ORA_SID | wc -l`

if [ $EXISTS = 0 ]; then

RET=1

else

RET=0

fi

;;

… 19

Page 20: High Availability and Consolidation with SE1 / SE2 ... Availability and Consolidation with SE1 / SE2 ... •Virtual environment with ESX-Cluster already ... •One config file per

Database Resource

• Dependencies: – (SCAN-)Listener

– Disk Group(s)

• Start on max. one node

• List of potential hosts

• Permissions for the oracle-User

• Storage location of the action script

20

Page 21: High Availability and Consolidation with SE1 / SE2 ... Availability and Consolidation with SE1 / SE2 ... •Virtual environment with ESX-Cluster already ... •One config file per

Configuration Database Resource TYPE=cluster_resource ACL=owner:oracle:rwx,pgrp:dba:rwx,other::r-- ACTION_SCRIPT=/acfsmounts/acfsvol1/crs_res/ora12_action.scr ACTIVE_PLACEMENT=0 AUTO_START=restore CARDINALITY=1 CHECK_INTERVAL=10 DEGREE=1 DESCRIPTION=Resource ORA12 DB ENABLED=1 HOSTING_MEMBERS=test-ora12-rac1 test-ora12-rac2 LOAD=1 LOGGING_LEVEL=1 PLACEMENT=restricted RESTART_ATTEMPTS=1 START_DEPENDENCIES=hard(ora.DATA.dg,ora.acfsdg.acfsvol1.acfs) weak(type:ora.listener.type,global:type:ora.scan_listener.type,uniform:ora.ons,global:ora.gns) pullup(ora.DATA.dg,ora.acfsdg.acfsvol1.acfs) START_TIMEOUT=600 STOP_DEPENDENCIES=hard(intermediate:ora.asm,shutdown:ora.DATA.dg) STOP_TIMEOUT=600 UPTIME_THRESHOLD=1h

21

Page 22: High Availability and Consolidation with SE1 / SE2 ... Availability and Consolidation with SE1 / SE2 ... •Virtual environment with ESX-Cluster already ... •One config file per

Anlage der Ressource app.ora12.db

crsctl add resource app.ora12.db -type

cluster_resource -file

/acfsmounts/acfsvol1/crs_res/ora.ora12.conf

• Important:

– Don't try to use a name like ora.xxx

– Use some other prefix like app.xxx instead – the ora.xxx prefix is reserved for Oracle resources

22

Page 23: High Availability and Consolidation with SE1 / SE2 ... Availability and Consolidation with SE1 / SE2 ... •Virtual environment with ESX-Cluster already ... •One config file per

Start of the Resource app.ora12.db

crsctl start res app.ora12.db

• Check with:

crsctl stat res app.ora12.db –p

or

crsctl stat res -t

---------------------------------------------------- Name Target State Server State details …

---------------------------------------------------- Cluster Resources ---------------------------------------------------- …

app.ora12.db 1 ONLINE ONLINE test-ora12-rac2 STABLE

23

Page 24: High Availability and Consolidation with SE1 / SE2 ... Availability and Consolidation with SE1 / SE2 ... •Virtual environment with ESX-Cluster already ... •One config file per

Extended Configuration

• Multiple Server • Multiple Databases • Load distribution by defining different hosts in

the host list of each resource • One config file per resource • HA also for applications • …

24

Page 25: High Availability and Consolidation with SE1 / SE2 ... Availability and Consolidation with SE1 / SE2 ... •Virtual environment with ESX-Cluster already ... •One config file per

Conclusion

25

Page 26: High Availability and Consolidation with SE1 / SE2 ... Availability and Consolidation with SE1 / SE2 ... •Virtual environment with ESX-Cluster already ... •One config file per

Test Results

• Resource administration passed the tests – Start

– Stop

– Manual relocation

– Autostart after system reboot

• Transparent for the application due to registration with the SCAN listeners

26

Page 27: High Availability and Consolidation with SE1 / SE2 ... Availability and Consolidation with SE1 / SE2 ... •Virtual environment with ESX-Cluster already ... •One config file per

Conclusion

Implementation is operational Requirements in terms of licensing are met Can't compete with a complex VMWare environment technically as these are able to do a (planned) live migration between physically different hardware without any application downtime Is a low cost alternative to RAC, however some restrictions Can be an alternative to VMWare if a short downtime in case of relocation / failover is acceptable

27

Page 28: High Availability and Consolidation with SE1 / SE2 ... Availability and Consolidation with SE1 / SE2 ... •Virtual environment with ESX-Cluster already ... •One config file per

Questions & Contact

• Mail: [email protected] • Web: www.hl-services.de • Blog: blog.hl-services.de • Twitter: @soesa69 • Live: Exhibition, booth 236 Level 2 (yellow), 2. booth on the left from the

escalator

28