173_oracle rac from dream to production_1.0.0
TRANSCRIPT
-
8/7/2019 173_Oracle RAC From Dream To Production_1.0.0
1/31
In RAC We Trust
ORACLE - From Dream To Production
Plamen Zyumbyulev
,, Let someone k n o w
BGOUG Gabrovo 22.04.2005
-
8/7/2019 173_Oracle RAC From Dream To Production_1.0.0
2/31
Presentation Goals
Describe the major steps in RAC implementation
Show and explain the main problems and obstacles
Show and explain solution and workarounds
Give some practical ideas and variations
Try to look at the problems from different angles
Non-Goals Explain RAC concepts and fundamentals
Show ALL aspects of RAC
-
8/7/2019 173_Oracle RAC From Dream To Production_1.0.0
3/31
Agenda
Introduction
RAC Installation
High Availability Configuring
Testing and Tuning RAC
Implementing RAC in production
-
8/7/2019 173_Oracle RAC From Dream To Production_1.0.0
4/31
Introduction
-
8/7/2019 173_Oracle RAC From Dream To Production_1.0.0
5/31
RAC Installation
Problems
Solutions
-
8/7/2019 173_Oracle RAC From Dream To Production_1.0.0
6/31
Problems
Need to evaluate and purchase cluster hardware
Need of knowledgeable OS, High Availability,Network and Storage professionals
All this takes time
-
8/7/2019 173_Oracle RAC From Dream To Production_1.0.0
7/31
Solutions
RAC on Single Node
RAC on Single VMware Node RAC on Multiple VMware Nodes
RAC and Network Block Device
All of the solutions presented here are for testingpurposesONLY. These configurations are not
certified or supported by Oracle Support Services
Other Solutions
-
8/7/2019 173_Oracle RAC From Dream To Production_1.0.0
8/31
RAC on Single Node
Why not?
Metalink Note:241114.1 - Step-By-Step Installation ofRAC on Linux - Single Node (Oracle9i 9.2.0 with OCFS)
Key Points No need of fencing configuration No need of using clustered file system or raw devices No need of multiple oracle homes (ORACLE_HOME)
-
8/7/2019 173_Oracle RAC From Dream To Production_1.0.0
9/31
RAC on Single Node(contd)
Key Points (contd) One oracle user with 2 or more profiles one for every
instance. (e.g. .rac1, .rac2, )
zyumix:/# su - oracle
oracle@zyumix:~$ . rac1
oracle@zyumix:~$ echo $ORACLE_SIDrac1
zyumix:/# su - oracle
oracle@zyumix:~$ . rac2
oracle@zyumix:~$ echo $ORACLE_SID
rac2
-
8/7/2019 173_Oracle RAC From Dream To Production_1.0.0
10/31
RAC on Single Node(contd)
Key Points (contd) Oracle Universal Installer needs Clusterware software in
order to install RAC option.
Disadvantages
-
8/7/2019 173_Oracle RAC From Dream To Production_1.0.0
11/31
RAC on Single Node(contd)
Server A
Instance A
Server B
Instance B
DatabaseDatabase
Client sideload balancing
Server side
load balancing
Listener
A
Listener
B
-
8/7/2019 173_Oracle RAC From Dream To Production_1.0.0
12/31
RAC on Single VMware Node
Even easier !!! The Oracle-on-Linux VMware Cookbook -
http://www.oracle.com/technology/tech/linux/vmware/cookbook/index.html
An easy, hands-on, step-by-step guide describing how-toinstall VMware, Linux (RHEL/SLES) and Oracle RAC(again on single node)
VMware Workstation (90-day free eval; registration required)RHEL3 (not free) , SLES8 (not free)
Disadvantages
http://www.oracle.com/technology/tech/linux/vmware/cookbook/index.htmlhttp://www.oracle.com/technology/tech/linux/vmware/cookbook/index.html -
8/7/2019 173_Oracle RAC From Dream To Production_1.0.0
13/31
RAC on Multiple VMware Nodes
VMware GSX/ESX Server permits the sharing of plain diskswith multiple virtual machines running on the same host,
provided the disk in question is a SCSI disk.
This approach is very powerful but complex. You can createvery complex environments multiple NICs, switches, disksetc.
Now there are a number of nodes although virtual
Disadvantages
-
8/7/2019 173_Oracle RAC From Dream To Production_1.0.0
14/31
RAC and Network Block Device
This solution allows you to build scalable and high availabledatabase system only with common Intel PCs connected intoEthernet network.
In this solution, a standard shared disk subsystem is replacedby a native Linux technology - Network Block Device(NBD) that maps remote files to local block devices (e.g./dev/nb0) via TCP/IP network. One computer (notnecessarily Linux machine) serves as data storage for allcluster nodes (Linux machines) instead of expensive diskarray.
-
8/7/2019 173_Oracle RAC From Dream To Production_1.0.0
15/31
RAC and Network Block Device(contd)
With this thing compiled into the kernel, Linux can use a
remote server as one of its block devices. Every time the
client computer wants to read /dev/nd0, it will send a requestto the server via TCP, which will reply with the data
requested.
The remote resource doesn't need to be a whole disk or evena partition. It can be a file.
-
8/7/2019 173_Oracle RAC From Dream To Production_1.0.0
16/31
RAC and Network Block Device(contd)
Typical configuration Simple NBD configuration
-
8/7/2019 173_Oracle RAC From Dream To Production_1.0.0
17/31
RAC and Network Block Device(contd)
InstallationBoth client and server machines are with RHEL3
Download source from http://nbd.sourceforge.net/ As root do
bunzip2 nbd-2.7.3.tar.bz2
tar -xvf nbd-2.7.3.tar
cd nbd-2.7.3 ./configure
make
make install
http://nbd.sourceforge.net/http://nbd.sourceforge.net/ -
8/7/2019 173_Oracle RAC From Dream To Production_1.0.0
18/31
RAC and Network Block Device(contd)
Creating new empty files at NBD server[root@rac2 root]# dd if=/dev/zero of=/u01/oradata/rac/system.01 count=300 bs=1M300+0 records in
300+0 records out
314572800 bytes transferred in 1.683993 seconds (186801738 bytes/sec)
[root@rac2 root]#
Running NBD serverSyntax: nbd-server
[root@rac2 root]# nbd-server 4101 /u01/oradata/rac/system.01
[root@rac2 root]#
-
8/7/2019 173_Oracle RAC From Dream To Production_1.0.0
19/31
RAC and Network Block Device(contd)
NBD clientNBD client must be run as root (because of kernel parts of
NBD). Before starting NBD client you would have to installLinux kernel NBD module
Installing ndb module RHEL3
[root@rac3 root]# rpm -Uvh kernel-unsupported-2.4.21-4.EL.i686.rpm
warning: kernel-unsupported-2.4.21-4.EL.i686.rpm: V3 DSAsignature: NOKEY, key ID db42a60e
Preparing...########################################### [100%]
1:kernel-unsupported########################################### [100%]
[root@rac3 root]#
-
8/7/2019 173_Oracle RAC From Dream To Production_1.0.0
20/31
RAC and Network Block Device(contd)
NBD client (contd) Loading nbd module
[root@rac3 dev]# lsmod | grep nbd
[root@rac3 dev]# modprobe nbd[root@rac3 dev]# lsmod | grep nbd
nbd 16388 0 (unused)
[root@rac3 dev]#
running nbd clientSyntax: nbd-client /dev/nb
[root@rac3 dev]# nbd-client rac2 4101 /dev/nb0Negotiation: ..size = 307200KB
bs=1024, sz=307200
[root@rac3 dev]#
-
8/7/2019 173_Oracle RAC From Dream To Production_1.0.0
21/31
RAC and Network Block Device(contd)
Now block devices are configured and it is possible to access
remote data. Oracle Real application clusters need raw access
to shared disk subsystem so mapping raw devices to blockdevices is needed. This could by done with standard raw
command.
Syntax: raw /dev/raw/raw /dev/
[root@rac3 root]# raw /dev/raw/raw1 /dev/nb0
/dev/raw/raw1: bound to major 43, minor 0
[root@rac3 root]#
-
8/7/2019 173_Oracle RAC From Dream To Production_1.0.0
22/31
Other Solutions
RAC and FireWireBuild Your Own Oracle RAC 10gCluster on Linux
and FireWirehttp://www.oracle.com/technology/pub/articles/hunter_rac10g.html
RAC and NFS
LockingCaching
Write through cache
http://www.oracle.com/technology/pub/articles/hunter_rac10g.htmlhttp://www.oracle.com/technology/pub/articles/hunter_rac10g.html -
8/7/2019 173_Oracle RAC From Dream To Production_1.0.0
23/31
HA Configuration
-
8/7/2019 173_Oracle RAC From Dream To Production_1.0.0
24/31
Simplified RAC schema
DatabaseDatabase
NET
-
8/7/2019 173_Oracle RAC From Dream To Production_1.0.0
25/31
HA System
-
8/7/2019 173_Oracle RAC From Dream To Production_1.0.0
26/31
Maximum Availability
Architecture
Dedicated Network
Primary Site
Application Server
Secondary Site
Application Server
Data Guard
-
8/7/2019 173_Oracle RAC From Dream To Production_1.0.0
27/31
Extended Distance Clusters
Dedicated Network
Primary Site
RAC
Application Server
Secondary Site
Application Server
Virtualization storage layer
What about the Quorum Server???
-
8/7/2019 173_Oracle RAC From Dream To Production_1.0.0
28/31
Extended Distance Clusters(contd)
Resolving Distance Problems Application partitioning
gc_files_to_locks
Wavelength Division Multiplexing Dense Wavelength Division Multiplexing DWDM
Coarse Wavelength Division Multiplexing CWDM
ACTIVE_INSTANCE_COUNT *.active_instance_count = 1
*.cluster_database_instances = 2
-
8/7/2019 173_Oracle RAC From Dream To Production_1.0.0
29/31
Testing and Tuning RAC
Introduction
RAC testing steps
Functional Application Tests RAC High Availability tests
Scalability tests
Digging into RAC performance problems
-
8/7/2019 173_Oracle RAC From Dream To Production_1.0.0
30/31
Introduction
Testing isnt trivial !!!
Classical testing/tuning methods. Always tune single instance first!
Specific RAC issues
RAC aware tools
-
8/7/2019 173_Oracle RAC From Dream To Production_1.0.0
31/31
RAC testing steps
Functional Application Tests
RAC High Availability tests Be aware about the timeouts!!!
Scalability tests