Beruflich Dokumente
Kultur Dokumente
Installing and Configuring Oracle Real Application Clusters on EMC Symmetrix DMX Storage A Guide to Best Practices
Oracle Version 9i Release 2/Linux 2.1
Abstract
This paper provides step-by-step configuration and installation instructions, and best practices when installing Oracle Real Application Clusters on EMC Symmetrix DMX storage systems.
Published 4/29/2005
4/29/2005
Copyright 2005 EMC Corporation. All rights reserved. EMC believes the information in this publication is accurate as of its publication date. The information is subject to change without notice. THE INFORMATION IN THIS PUBLICATION IS PROVIDED AS IS. EMC CORPORATION MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WITH RESPECT TO THE INFORMATION IN THIS PUBLICATION, AND SPECIFICALLY DISCLAIMS IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Use, copying, and distribution of any EMC software described in this publication requires an applicable software license.
Installing and Configuring Oracle Real Application Clusters on EMC Symmetrix DMX Storage A Guide to Best Practices
4/29/2005
Table of Contents
Introduction ......................................................................................................... 5
Related Documentation ............................................................................................................... 5
4/29/2005 Use Server Parameter File (spfile) ............................................................................................ 40 Use Async I/O ............................................................................................................................ 40 Use Oracle Cluster File System................................................................................................. 40 Place Archive Logs on the Oracle Cluster Files System ........................................................... 40 Isolate Private Network .............................................................................................................. 40 Use the Linux hangcheck-timer Module .................................................................................... 41 Use a hosts File ......................................................................................................................... 41 Use Automatic Undo Management............................................................................................ 41 Undo Tablespaces ................................................................................................................. 41 Undo Management................................................................................................................. 41
Installing and Configuring Oracle Real Application Clusters on EMC Symmetrix DMX Storage A Guide to Best Practices
4/29/2005
Introduction
This paper describes the setup, installation, and configuration of Oracle9i Database Release 2 Real Application Clusters for Linux with EMC Symmetrix DMX SAN-based storage. The Linux operating system is Red Hat Linux Advanced Server 2.1. It is assumed that readers are familiar with the Oracle9i Database software, Linux operating system, and basic networking. As such, readers already should be familiar with the installation and administration of Linux and the Oracle9i Database, including network interface configurations and applying patches. It also is assumed that readers are familiar with EMC products. For detailed information about setting up the Symmetrix DMX, consult your EMC Representatives, or refer to product guides and manuals bundled with your system.
Related Documentation
Oracle Best Practices: Pre-Requisites for Real Application Clusters Installation with SAN Storage Oracle Real Application Clusters Administration Guide
Environment Setup
Software Components
Red Hat Linux Advanced Server 2.1 (Kernel Version 2.4.9-e.34smp) running on each Oracle9i RAC cluster node Oracle9i Database Release 2 Enterprise Edition (Version 9.2.0.1.0) for Linux running on each Oracle9i RAC cluster node Oracle9i RAC 9.2.0.2 patch set, applied on each node
Installing and Configuring Oracle Real Application Clusters on EMC Symmetrix DMX Storage A Guide to Best Practices
4/29/2005
Installing and Configuring Oracle Real Application Clusters on EMC Symmetrix DMX Storage A Guide to Best Practices
4/29/2005 For servers configured with more than 4 GB of RAM, use the enterprise kernel. Load theses rpms by executing the following commands: # su root # rpm ivh ocfs-support-1.0.10-1.i386.rpm # rpm -ivh ocfs-2.4.9-e-enterprise-1.0.12-1.i686.rpm # rpm -ivh ocfs-tools-1.0.10-1.i386.rpm For single CPU servers, use the uniprocessor kernel. Load these rpms by executing the following commands: # su root # rpm ivh ocfs-support-1.0.10-1.i386.rpm # rpm -ivh ocfs-2.4.9-e-1.0.12-1.i686.rpm # rpm -ivh ocfs-tools-1.0.10-1.i386.rpm
Kernel Parameters
Using a vi editor, add the following entries to the end of the /etc/sysctl.conf file. The /etc/sysctl.conf file must be modified on all nodes in the cluster. After the file has been modified, execute the sysctrl p command for the parameters to take effect or reboot the servers.
Semaphores
Set the semaphores kernel parameters: kernel.sem = 100 32000 32 128
File Handles
Set the maximum number of file handles: fs.file-max=65536
Installing and Configuring Oracle Real Application Clusters on EMC Symmetrix DMX Storage A Guide to Best Practices
4/29/2005
Network Parameters
Set the default and maximum send buffer size to 256 KB, and set the default and maximum receive buffer size to 256 KB. net.core.rmem_default=262144 net.core.wmem_default=262144 net.core.rmem_max=262144 net.core.wmem_max=262144
Creating Users
In order to install the Oracle Real Application Cluster software, the following users and groups must be created. When using OCFS, the UID of the oracle user and GID of the oinstall group are required to be the same across all nodes. If the UID and GID are not the same, the OCFS file systems will not be properly owned by each node. # groupadd g 700 dba # groupadd g 701 oinstall # useradd u 700 g oinstall G dba oracle
Recommended Value
/opt/oracle /opt/oracle/product/9.2.0 ora1 xterm AMERICAN $ORACLE_HOME/ocommon/nls/admin/data $ORACLE_HOME/lib:$ORACLE_HOME/oracm/lib:/lib:/usr/lib native $PATH:$ORACLE_HOME/bin:$ORACLE_HOME/oracm/bin $ORACLE_HOME/sqlj/lib/translator.zip:$CLASSPATH $ORACLE_HOME/network/admin (must be unique for each node)
Installing and Configuring Oracle Real Application Clusters on EMC Symmetrix DMX Storage A Guide to Best Practices
4/29/2005
# mkdir /var/opt/oracle # chown oracle.dba /var/opt/oracle # chmod 755 /var/opt/oracle Oracle Universal Installer does not properly replicate the following directories to other nodes in the cluster. The following directories must be created manually on all nodes: # su - oracle $ mkdir -p $ORACLE_HOME/oracm/log $ mkdir -p $ORACLE_HOME/network/log $ mkdir -p $ORACLE_HOME/network/trace $ mkdir -p $ORACLE_HOME/rdbms/log $ mkdir -p $ORACLE_HOME/rdbms/audit $ mkdir -p $ORACLE_HOME/network/agent/log $ mkdir -p $ORACLE_HOME/network/agent/reco
To load the hangcheck-timer and set the recommended parameters, edit the /etc/modules.conf file and add the following line: options hangcheck-timer hangcheck_tick=30 hangcheck_margin=180 Now run modprobe to load the module. The hangcheck-module will now be loaded automatically; it is not necessary to run modeprobe after a reboot. Installing and Configuring Oracle Real Application Clusters on EMC Symmetrix DMX Storage A Guide to Best Practices
4/29/2005
Figure 1. OCFS Tool Window 2. Select Tasks, Generate Config. The OCFS Generate Config dialog box appears (Figure 2).
Installing and Configuring Oracle Real Application Clusters on EMC Symmetrix DMX Storage A Guide to Best Practices
10
4/29/2005
Figure 2. OCFS Generate Config Dialog Box 3. 4. Select the private network interface (rac-01) for the respective node; then click OK. Cat the /etc/ocfs.conf file to verify it exists and contents are similar to below output: node_name = rac-01 node_number = ip_address = 192.168.1.1 ip_port = 7000 guid = AA0EC11FF549D1E2CD470050568A1649 5. After the ocfs.conf file has been generated, load the ocfs module on each node: # /sbin/load_ocfs /sbin/insmod ocfs node_name=rac-01 ip_address=192.168.1.1 cs=1829 guid=AA0EC11FF549D1E2CD470050568A1649 comm_voting=1 ip_port=7000 Using /lib/modules/2.4.9-e-smp-ABI/ocfs/ocfs.o
For optimal performance, each OCFS file system should be configured using different metagroups. If metagroups are not available or storage is constrained, then at a minimum configure separate partitions for each file system. On one node, use the fdisk utility to format the devices.
Installing and Configuring Oracle Real Application Clusters on EMC Symmetrix DMX Storage A Guide to Best Practices
11
4/29/2005 After the disks have been partitioned, create the mount points for the OCFS file system: # mkdir -p /data /index /ctrl-redo1 /ctrl-redo2 /undo-node-1 /undo-node-2 \ /archive1a /archive1b /archive2a /archive2b
Description
Block size in kilobytes Clear all data blocks Force format existing OCFS volume GID for the root directory Volume label Path where this device will be mounted Query only Permissions for the root directory Quiet execution UID for the root directory Print version and exit
To create an OCFS file system for /data, issue the following commands. Use these commands to create the remaining OCFS file systems as well: # su - root # mkfs.ocfs -F -b 128 -L /data -m /oracle -u `id -u /data` -g `id -g oracle` -p 0775 /dev/sdb2 The OCFS file systems are ready to be mounted using the following command: # mount -t ocfs /dev/sdb2 /data
Set the pfile DISK_ASYNC_IO parameter to TRUE (the default). Installing and Configuring Oracle Real Application Clusters on EMC Symmetrix DMX Storage A Guide to Best Practices
12
4/29/2005
Network Setup
This section describes how to create and configure a public and private network for each node in the cluster. Although it is not necessary to configure a private network, it is highly recommended. The private network carries node participation and state information used by the Oracle Cluster Manager, as well as Cache Fusion traffic. The network setup must be done on all nodes in the cluster as the root user.
Figure 3. Configuring the Public Network To configure the private network, select eth1 and edit the parameters as shown in the previous figure. Enter the IP address, netmask, and default gateway as supplied by the Network Administrator. Be sure to select Activate device when computer starts. You may also use your favorite vi editor to configure the public and private networks by editing the respective public and private ifcgf-xxxx files: Public /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 BOOTPROTO=static IPADDR=137.69.8.185 NETMASK=255.255.0.0 ONBOOT=yes Private /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth1 ONBOOT=yes
Installing and Configuring Oracle Real Application Clusters on EMC Symmetrix DMX Storage A Guide to Best Practices
13
4/29/2005
Figure 4. Adding Entries to the hosts File You can also use your favorite vi editor to configure the /etc/hosts file: # Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 node-1 localhost.localdomain localhost 192.168.1.1 rac-01 192.168.1.2 rac-02 137.69.8.185 node-1 137.69.8.183 node-2
14
4/29/2005 # rsh on As root, enter the public and private hostnames and oracle user to the /etc/hosts.equiv file: # vi /etc/hosts.equiv rac-01 oracle rac-02 oracle node-1 oracle node-2 oracle
Check node-2 using the ping command: # # # # ping ping ping ping rac-01 node-1 192.168.1.1 137.69.8.183 Remote private hostname Remote public node name Remote private IP address Remote public IP address
3.
To test remote copy equivalency, create a temporary file in each nodes /tmp directory and execute the following commands: $ touch /tmp/rcp1 When logged in to node-1 $ rcp /tmp/rcp1 rac-02:/tmp/
4.
Log on to node-2 and verify that the file has been copied to the /tmp directory. $ touch /tmp/rcp2 When logged in to node-2 $ rcp /tmp/rcp2 rac-02:/tmp/
5. 6.
Log on to node-1 and verify that the file has been copied to the /tmp directory. To test remote shell host equivalency, log on as the oracle user and execute the following command. The remote hostname should be returned. $ rsh rac-02 hostname $ node-2 $ rsh rac-01 hostname $ node-1 When logged on to node-1
Installing and Configuring Oracle Real Application Clusters on EMC Symmetrix DMX Storage A Guide to Best Practices
15
4/29/2005
Figure 5. Welcome Screen 2. Click Next. The File Locations screen appears.
Installing and Configuring Oracle Real Application Clusters on EMC Symmetrix DMX Storage A Guide to Best Practices
16
4/29/2005
Figure 6. File Locations Screen 3. Click Next for the inventory file location and You will be prompted to run the orainstRoot.sh script. 4. Open another window as root and execute the script.
Figure 7. Available Products Screen 5. Select Oracle Cluster Manager 9.2.0.2.0 from the Available Products screen, and click Next. The Public Node Information screen appears.
Installing and Configuring Oracle Real Application Clusters on EMC Symmetrix DMX Storage A Guide to Best Practices
17
4/29/2005
Figure 8. Public Node Information 6. In the Public Information screen, enter node-1 and node-2, and click Next. The Private Node Information screen appears, as shown in Figure 9.
Figure 9. Private Node Information 7. In the Private Node Information screen, enter hostnames rac-01 and rac-02, and click Next. The WatchDog Parameter Information screen appears.
Installing and Configuring Oracle Real Application Clusters on EMC Symmetrix DMX Storage A Guide to Best Practices
18
4/29/2005
Figure 10. WatchDog Parameter Information 8. Enter the WatchDog parameter value, and click Next (this will be changed a later step). The Quorum Disk Information screen appears, as shown next.
Figure 11. Quorum Disk Information 9. Enter the location of the disk quorum file and click Next. The Summary screen appears.
Installing and Configuring Oracle Real Application Clusters on EMC Symmetrix DMX Storage A Guide to Best Practices
19
4/29/2005
Figure 12. Oracle Universal Installer Summary 10. Click Install. The Oracle Universal Installer installs the necessary files for the Oracle Cluster Manager on all the Oracle9i RAC cluster nodes in the $ORACLE_HOME/oracm directory, using rsh over the network the private nodes reside in.
Installing and Configuring Oracle Real Application Clusters on EMC Symmetrix DMX Storage A Guide to Best Practices
20
4/29/2005
Figure 13. Oracle Universal Installer Welcome Screen 4. Click Next. The File Locations screen appears, as shown next.
Figure 14. File Locations Screen 5. For the source file location, navigate to /tmp/Disk1/stage, which is the location of the patch set. Then select the products.jar file, click OK, and click Next. The Available Products screen appears.
Installing and Configuring Oracle Real Application Clusters on EMC Symmetrix DMX Storage A Guide to Best Practices
21
4/29/2005
Figure 15. Available Products Screen 6. Select Oracle Cluster Manager 9.2.0.4.0 from the Available Products screen and click Next. The Public Node Information screen appears.
Figure 16. Public Node Information 7. In the Public Node Information screen, enter node-1 and node-2, and click Next. The Private Node Information screen appears.
Installing and Configuring Oracle Real Application Clusters on EMC Symmetrix DMX Storage A Guide to Best Practices
22
4/29/2005
Figure 17. Private Node Information 8. 9. In the Private Node Information screen, enter hostname rac-01 and rac-02, and click Next. Click Install. The Oracle Universal Installer installs the necessary files for the Oracle Cluster Manager patch on all the Oracle9i RAC cluster nodes in the $ORACLE_HOME/oracm directory, using rsh over the network the private nodes reside in.
23
4/29/2005 CmDiskFile=/data/quorum HostName=rac-01 KernelModuleName=hangcheck-timer 5. Comment out or remove the following lines from the ocstart.sh file: WATCHDOGD_LOG_FILE=$ORACLE_HOME/oracm/log/wdd.log WATCHDOGD_BAK_FILE=$ORACLE_HOME/oracm/log/wdd.log.bak watchdogd_args=`grep '^watchdogd' $OCMARGS_FILE |\ sed -e 's+^watchdogd *++'` if watchdogd status | grep 'Watchdog daemon active' >/dev/null then echo 'ocmstart.sh: Error: watchdogd is already running' exit 1 fi if test -r $WATCHDOGD_LOG_FILE then mv $WATCHDOGD_LOG_FILE $WATCHDOGD_BAK_FILE fi Startup watchdogd echo watchdogd $watchdogd_args watchdogd $watchdogd_args
After a few seconds, verify that the oracle processes are still running. If the processes have died, execute the follow command: su oracle $ dd if=/dev/zero of=/data/quorum bs=4096 count=96
4.
Restart the Cluster Manager on node-1; then start the Cluster Manager on all nodes in the cluster. It is not necessary to perform step 3 on all nodes.
Installing and Configuring Oracle Real Application Clusters on EMC Symmetrix DMX Storage A Guide to Best Practices
24
4/29/2005
Figure 18. Welcom Screen 2. Click Next. The Cluster Node Selection screen appears. The screen should show node-1 and node-2. If a node does not appear on the selection screen, then the cluster manager is not running on that node.
Installing and Configuring Oracle Real Application Clusters on EMC Symmetrix DMX Storage A Guide to Best Practices
25
4/29/2005
Figure 19. Cluster Node Selection 3. Select all nodes, and then click Next. The Available Products screen appears, as shown next.
Figure 20. Available Products Screen 4. Select Oracle9i Database 9.2.0.1.0, and click Next. The Installation Types screen appears.
Installing and Configuring Oracle Real Application Clusters on EMC Symmetrix DMX Storage A Guide to Best Practices
26
4/29/2005
Figure 21. Installation Types Screen 5. Select the Enterprise Edition, and click Next. The Database Configuration screen appears, as shown next.
Figure 22. Database Configuration Screen 6. Select Software Only, and click Next. The Shared Configuration File Name screen appears.
Installing and Configuring Oracle Real Application Clusters on EMC Symmetrix DMX Storage A Guide to Best Practices
27
4/29/2005
Figure 23. Shared Configuration File Name Screen 7. Enter the name of the shared configuration file, and click Next. The Summary window appears, as shown next.
Figure 24. Oracle Universal Installer Summary 8. 9. Click Install. During the installation, you will be prompted to run the root.sh script. Open a window on each server and execute the script. After the installation successfully completes, click Exit.
Installing and Configuring Oracle Real Application Clusters on EMC Symmetrix DMX Storage A Guide to Best Practices
28
4/29/2005
Figure 25. Oracle Net Configuration Assistant Welcome Screen 2. Select Cluster configuration, and click Next. The Nodes screen appears.
Installing and Configuring Oracle Real Application Clusters on EMC Symmetrix DMX Storage A Guide to Best Practices
29
4/29/2005
Figure 26. Nodes Screen 3. Click Select all nodes, and then click Next. The Welcome screen prompts you for the configuration you want (Figure 27).
Figure 27. Selecting a Configuration 4. Select Listener configuration, and click Next. The Listener Configuration screen appears.
Installing and Configuring Oracle Real Application Clusters on EMC Symmetrix DMX Storage A Guide to Best Practices
30
4/29/2005 5. Select Add, and click Next. The Listener Name screen appears, as shown next.
Figure 30. Select Protocols Screen 7. In the Available Protocols list, select the protocols you want to configure for the listener. Click the right arrow to move the protocols to the Selected Protocols list, then click Next. The TCP/IP Protocol screen appears.
Installing and Configuring Oracle Real Application Clusters on EMC Symmetrix DMX Storage A Guide to Best Practices
31
4/29/2005
Figure 31. TCP/IP Protocol Screen 8. Select Use the standard port number of 1521, and click Next. You can now choose whether you want to configure another listener (Figure 32).
Figure 32. Choosing to Configure Another Listener 9. Select Yes to configure a second listener for node-2. Repeat steps 5 through 8 using the following example parameters: Listener Name: Port Number: LISTENER_ORA2 1522
10. Start the listener using the following command: $ lsnrctl start
Installing and Configuring Oracle Real Application Clusters on EMC Symmetrix DMX Storage A Guide to Best Practices
32
4/29/2005
Figure 33. Database Configuration Assistant Welcome Screen 2. Select Oracle cluster database, and click Next. The Operations screen appears.
3.
Select Create a database, and click Next. The Node Selection screen appears.
Installing and Configuring Oracle Real Application Clusters on EMC Symmetrix DMX Storage A Guide to Best Practices
33
4/29/2005
Figure 34. Node Selection Screen 4. Click Select All, and then click Next. The Database Templates screen appears.
5.
Select the database type suitable for your application, and then click Next. The Database Identification screen appears, as shown next.
Installing and Configuring Oracle Real Application Clusters on EMC Symmetrix DMX Storage A Guide to Best Practices
34
4/29/2005
Figure 35. Database Identification Screen 6. Enter a global database name ,and click Next. The Network Configuration screen appears.
Figure 36. Network Configuration for the Database 7. Select Register this database with all the listeners, and then click Next. The Database Connection Options screen appears.
Installing and Configuring Oracle Real Application Clusters on EMC Symmetrix DMX Storage A Guide to Best Practices
35
4/29/2005
Figure 37. Database Connection Options 8. Select Dedicated Server Mode, and click Next. The Initialization Parameters screen appears.
Installing and Configuring Oracle Real Application Clusters on EMC Symmetrix DMX Storage A Guide to Best Practices
36
4/29/2005 9. In the Initialization Parameters screen, do the following: a. b. c. d. Click the Archive tab. Select Archive Log Mode. Enter the Archive Log destination locations defined in the sample layout. Click Next.
Figure 39. Database Storage Screen 10. Select Controlfile and delete control03.ctl. Enter the control file locations as defined in the sample layout. 11. In the Database Storage screen, select Datafiles (as shown in Figure 40), and enter the file locations as defined in the sample layout.
Installing and Configuring Oracle Real Application Clusters on EMC Symmetrix DMX Storage A Guide to Best Practices
37
4/29/2005
Figure 40. Working with Datafiles in the Database Storage Screen 12. In the Database Storage screen, select Redo Log Groups (Figure 41). Use Redo Log Groups 1 and 2 for node-1; place these redo logs in /ctrl-redo1. Use Redo Log Groups 3 and 4 for node-2; place these redo logs in /ctrl-redo2 as defined in the sample layout.
Figure 41. Working with Redo Log Groups 13. Click Next.
Installing and Configuring Oracle Real Application Clusters on EMC Symmetrix DMX Storage A Guide to Best Practices
38
4/29/2005 The Creation Options screen appears. The Create Database option will automatically be selected, as shown next.
Figure 42. Creation Options 14. Click Finish to create the database.
Installing and Configuring Oracle Real Application Clusters on EMC Symmetrix DMX Storage A Guide to Best Practices
39
4/29/2005
Best Practices
Use Striped Metavolumes
Configure metavolumes with eight or 16 members. Using eight- or 16-member metavolumes ensures that the members are placed on disks that are controlled by different DA processors. Therefore, the Symmetrix system will be able to utilize the full potential of the back end. Build striped metavolumes using the default stripe depth of two disk cylinders (960 KB).
Installing and Configuring Oracle Real Application Clusters on EMC Symmetrix DMX Storage A Guide to Best Practices
40
4/29/2005
Undo Management
When UNDO_MANGEMENT is set to AUTO, Oracle manages the segment free and used spaces with bitmaps, as opposed to free lists and free-list groups. Using bitmaps provides a simpler and more efficient way of managing segment free space. They not only provide better space utilization, but eliminate any need to specify and tune PCTUSED, PCTFREE, FREELISTS, and FREELIST GROUPS parameters. By default, DBCA will set UNDO_MANGEMENT to AUTO.
Installing and Configuring Oracle Real Application Clusters on EMC Symmetrix DMX Storage A Guide to Best Practices
41