Red Hat CLUSTER MANAGER - INSTALLATION AND Administration Manual

Download or browse on-line these Administration Manual for Red Hat CLUSTER MANAGER - INSTALLATION AND Other.

Red Hat CLUSTER MANAGER - INSTALLATION AND Manual Information:

This manual for Red Hat CLUSTER MANAGER - INSTALLATION AND, given in the PDF format, is available for free online viewing and download without logging on. The guide contains 190 pages, and the size of the file at download is . The document type is Administration Manual.

Download Manual

Summary of Contents:

[Page 1] Red Hat CLUSTER MANAGER - INSTALLATION AND

Red Hat Cluster Manager The Red Hat Cluster Manager Installation and Administration Guide ...

[Page 2] Red Hat CLUSTER MANAGER - INSTALLATION AND

ISBN: N/A Red Hat, Inc. 1801 Varsity Drive Raleigh, NC 27606 USA +1 919 754 3700 (Voice) +1 919 754 3701 (FAX) 888 733 4281 (Voice) P.O. Box 13588 Research Triangle Park, NC 27709 USA © 2002 Red Hat, Inc. © 2000 Mission Critical Linux, Inc. © 2000...

[Page 3] Red Hat CLUSTER MANAGER - INSTALLATION AND

iii Acknowledgments The Red Hat Cluster Manager software was originally based on the open source Kimberlite http://oss.missioncriticallinux.com/kimberlite/ cluster project which was developed by Mission Critical Linux, Inc. Subsequent to its inceptio...

[Page 4] Red Hat CLUSTER MANAGER - INSTALLATION AND

Contents Red Hat Cluster Manager Acknowledgments........................................................................ iii Chapter 1 Introduction to Red Hat Cluster Manager ........... 7 1.1 Cluster Overview ...........................................

[Page 5] Red Hat CLUSTER MANAGER - INSTALLATION AND

Chapter 5 Database Services.................................................. 83 5.1 Setting Up an Oracle Service ................................................... 83 5.2 Tuning Oracle Services .........................................................

[Page 6] Red Hat CLUSTER MANAGER - INSTALLATION AND

Appendix A Supplementary Hardware Information ................ 151 A.1 Setting Up Power Switches...................................................... 151 A.2 SCSI Bus Configuration Requirements ........................................ 160 A.3 SCSI B...

[Page 7] Red Hat CLUSTER MANAGER - INSTALLATION AND

Section 1.1:Cluster Overview 7 1 Introduction to Red Hat Cluster Manager The Red Hat Cluster Manager is a collection of technologies working together to provide data in- tegrity and the ability to maintain application availability in the event of a f...

[Page 8] Red Hat CLUSTER MANAGER - INSTALLATION AND

8 Chapter 1:Introduction to Red Hat Cluster Manager Figure 1–1 Example Cluster Figure 1–1, Example Cluster shows an example of a cluster in an active-active configuration. If a hardware or software failure occurs, the cluster will automatically r...

[Page 9] Red Hat CLUSTER MANAGER - INSTALLATION AND

Section 1.2:Cluster Features 9 1.2 Cluster Features A cluster includes the following features: • No-single-point-of-failure hardware configuration Clusters can include a dual-controller RAID array, multiple network and serial communication channels...

[Page 10] Red Hat CLUSTER MANAGER - INSTALLATION AND

10 Chapter 1:Introduction to Red Hat Cluster Manager the two systems from simultaneously accessing the same data and corrupting it. Although not required, it is recommended that power switches are used to guarantee data integrity under all failure co...

[Page 11] Red Hat CLUSTER MANAGER - INSTALLATION AND

Section 1.2:Cluster Features 11 Figure 1–2 Cluster Communication Mechanisms Figure 1–2, Cluster Communication Mechanisms shows how systems communicate in a cluster configuration. Note that the terminal server used to access system consoles via se...

[Page 12] Red Hat CLUSTER MANAGER - INSTALLATION AND

12 Chapter 1:Introduction to Red Hat Cluster Manager • Manual service relocation capability In addition to automatic service failover, a cluster enables administrators to cleanly stop services on one cluster system and restart them on the other sys...

[Page 13] Red Hat CLUSTER MANAGER - INSTALLATION AND

Section 2.1:Choosing a Hardware Configuration 13 2 Hardware Installation and Operating System Configuration To set up the hardware configuration and install the Linux distribution, follow these steps: • Choose a cluster hardware configuration that ...

[Page 14] Red Hat CLUSTER MANAGER - INSTALLATION AND

14 Chapter 2:Hardware Installation and Operating System Configuration Cost restrictions The hardware configuration chosen must meet budget requirements. For example, systems with multiple I/O ports usually cost more than low-end systems with less exp...

[Page 15] Red Hat CLUSTER MANAGER - INSTALLATION AND

Section 2.1:Choosing a Hardware Configuration 15 RAID units. These products require extensive testing to ensure reliable operation, especially if the shared RAID units are based on parallel SCSI buses. These products typically do not allow for online...

[Page 16] Red Hat CLUSTER MANAGER - INSTALLATION AND

16 Chapter 2:Hardware Installation and Operating System Configuration Problem Solution Power source failure Redundant uninterruptible power supply (UPS) systems. Data corruption under all failure conditions Power switches or hardware-based watchdog t...

[Page 17] Red Hat CLUSTER MANAGER - INSTALLATION AND

Section 2.1:Choosing a Hardware Configuration 17 2.1.3 Choosing the Type of Power Controller The Red Hat Cluster Manager implementation consists of a generic power management layer and a set of device specific modules which accommodate a range of pow...

[Page 18] Red Hat CLUSTER MANAGER - INSTALLATION AND

18 Chapter 2:Hardware Installation and Operating System Configuration with a power controller type of "None" is useful for simple evaluation purposes, but because it affords the weakest data integrity provisions, it is not recommended for u...

[Page 19] Red Hat CLUSTER MANAGER - INSTALLATION AND

Section 2.1:Choosing a Hardware Configuration 19 2.1.4 Cluster Hardware Tables Use the following tables to identify the hardware components required for your cluster configuration. In some cases, the tables list specific products that have been teste...

[Page 20] Red Hat CLUSTER MANAGER - INSTALLATION AND

20 Chapter 2:Hardware Installation and Operating System Configuration Table 2–4 Power Switch Hardware Table Hardware Quantity Description Required Serial power switches Two Power switches enable each cluster system to power-cycle the other cluster ...

[Page 21] Red Hat CLUSTER MANAGER - INSTALLATION AND

Section 2.1:Choosing a Hardware Configuration 21 Hardware Quantity Description Required Network power switch One Network attached power switches enable each cluster member to power cycle all others. Refer to Section 2.4.2, Configuring Power Switches ...

[Page 22] Red Hat CLUSTER MANAGER - INSTALLATION AND

22 Chapter 2:Hardware Installation and Operating System Configuration Table 2–5 Shared Disk Storage Hardware Table Hardware Quantity Description Required External disk storage enclosure One Use Fibre Channel or single-initiator parallel SCSI to con...

[Page 23] Red Hat CLUSTER MANAGER - INSTALLATION AND

Section 2.1:Choosing a Hardware Configuration 23 Hardware Quantity Description Required Host bus adapter Two To connect to shared disk storage, you must install either a parallel SCSI or a Fibre Channel host bus adapter in a PCI slot in each cluster ...

[Page 24] Red Hat CLUSTER MANAGER - INSTALLATION AND

24 Chapter 2:Hardware Installation and Operating System Configuration Hardware Quantity Description Required SCSI terminator Two For a RAID storage enclosure that uses "out" ports (such as FlashDisk RAID Disk Array) and is connected to sing...

[Page 25] Red Hat CLUSTER MANAGER - INSTALLATION AND

Section 2.1:Choosing a Hardware Configuration 25 Table 2–7 Point-To-Point Ethernet Heartbeat Channel Hardware Table Hardware Quantity Description Required Network interface Two for each channel Each Ethernet heartbeat channel requires a network int...

[Page 26] Red Hat CLUSTER MANAGER - INSTALLATION AND

26 Chapter 2:Hardware Installation and Operating System Configuration Table 2–8 Point-To-Point Serial Heartbeat Channel Hardware Table Hardware Quantity Description Required Serial card Two for each serial channel Each serial heartbeat channel requ...

[Page 27] Red Hat CLUSTER MANAGER - INSTALLATION AND

Section 2.1:Choosing a Hardware Configuration 27 Table 2–10 UPS System Hardware Table Hardware Quantity Description Required UPS system One or two Uninterruptible power supply (UPS) systems protect against downtime if a power outage occurs. UPS sys...

[Page 28] Red Hat CLUSTER MANAGER - INSTALLATION AND

28 Chapter 2:Hardware Installation and Operating System Configuration Hardware Quantity RAID storage enclosure The RAID storage enclosure contains one controller with at least two host ports. Two HD68 SCSI cables Each cable connects one HBA to one po...

[Page 29] Red Hat CLUSTER MANAGER - INSTALLATION AND

Section 2.1:Choosing a Hardware Configuration 29 Hardware Quantity One network crossover cable A network crossover cable connects a network interface on one cluster system to a network interface on the other system, creating a point-to-point Ethernet...

[Page 30] Red Hat CLUSTER MANAGER - INSTALLATION AND

30 Chapter 2:Hardware Installation and Operating System Configuration Figure 2–1 No-Single-Point-Of-Failure Configuration Example 2.2 Steps for Setting Up the Cluster Systems After identifying the cluster hardware components described in Section 2....

[Page 31] Red Hat CLUSTER MANAGER - INSTALLATION AND

Section 2.2:Steps for Setting Up the Cluster Systems 31 2.2.1 Installing the Basic System Hardware Cluster systems must provide the CPU processing power and memory required by applications. It is recommended that each system have a minimum of 450 MHz...

[Page 32] Red Hat CLUSTER MANAGER - INSTALLATION AND

32 Chapter 2:Hardware Installation and Operating System Configuration devices on one channel and the shared disks on the other channel. Using multiple SCSI cards is also possible. See the system documentation supplied by the vendor for detailed insta...

[Page 33] Red Hat CLUSTER MANAGER - INSTALLATION AND

Section 2.3:Steps for Installing and Configuring the Red Hat Linux Distribution 33 Set up the console switch according to the documentation provided by the vendor. After the console switch has been set up, connect it to each cluster system. The cable...

[Page 34] Red Hat CLUSTER MANAGER - INSTALLATION AND

34 Chapter 2:Hardware Installation and Operating System Configuration • Use the cat /proc/devices command to display the devices configured in the kernel. See Section 2.3.5, Displaying Devices Configured in the Kernel for more information about per...

[Page 35] Red Hat CLUSTER MANAGER - INSTALLATION AND

Section 2.3:Steps for Installing and Configuring the Red Hat Linux Distribution 35 • Do not place local file systems, such as /, /etc, /tmp, and /var on shared disks or on the same SCSI bus as shared disks. This helps prevent the other cluster memb...

[Page 36] Red Hat CLUSTER MANAGER - INSTALLATION AND

36 Chapter 2:Hardware Installation and Operating System Configuration point heartbeat connection on each cluster system (ecluster2 and ecluster3) as well as the IP alias clusteralias used for remote cluster monitoring. Verify correct formatting of th...

[Page 37] Red Hat CLUSTER MANAGER - INSTALLATION AND

Section 2.3:Steps for Installing and Configuring the Red Hat Linux Distribution 37 To modify the kernel boot timeout limit for a cluster system, edit the /etc/lilo.conf file and specify the desired value (in tenths of a second) for the timeout parame...

[Page 38] Red Hat CLUSTER MANAGER - INSTALLATION AND

38 Chapter 2:Hardware Installation and Operating System Configuration May 22 14:02:11 storage3 kernel: Detected scsi disk sde at scsi1, channel 0, id 3, lun 0 May 22 14:02:11 storage3 kernel: Vendor: SEAGATE Model: ST318203LC Rev: 0001 May 22 14:02:1...

[Page 39] Red Hat CLUSTER MANAGER - INSTALLATION AND

Section 2.4:Steps for Setting Up and Connecting the Cluster Hardware 39 19 ttyC 20 cub 128 ptm 136 pts 162 raw Block devices: 2fd 3 ide0 8sd 65 sd # The previous example shows: • Onboard serial ports (ttyS) • Serial expansion card (ttyC) • Raw ...

[Page 40] Red Hat CLUSTER MANAGER - INSTALLATION AND

40 Chapter 2:Hardware Installation and Operating System Configuration 4. Set up the shared disk storage according to the vendor instructions and connect the cluster systems to the external storage enclosure.See Section 2.4.4, Configuring Shared Disk ...

[Page 41] Red Hat CLUSTER MANAGER - INSTALLATION AND

Section 2.4:Steps for Setting Up and Connecting the Cluster Hardware 41 To set up a redundant Ethernet heartbeat channel, use a network crossover cable to connect a network interface on one cluster system to a network interface on the other cluster s...

[Page 42] Red Hat CLUSTER MANAGER - INSTALLATION AND

42 Chapter 2:Hardware Installation and Operating System Configuration If power switches are not used in cluster, and a cluster system determines that a hung system is down, it will set the status of the failed system to DOWN on the quorum partitions,...

[Page 43] Red Hat CLUSTER MANAGER - INSTALLATION AND

Section 2.4:Steps for Setting Up and Connecting the Cluster Hardware 43 It is not recommended to use a large UPS infrastructure as the sole source of power for the cluster. A UPS solution dedicated to the cluster itself allows for more flexibility in...

[Page 44] Red Hat CLUSTER MANAGER - INSTALLATION AND

44 Chapter 2:Hardware Installation and Operating System Configuration Figure 2–4 Single UPS System Configuration Many vendor-supplied UPS systems include Linux applications that monitor the operational status of the UPS system through a serial port...

[Page 45] Red Hat CLUSTER MANAGER - INSTALLATION AND

Section 2.4:Steps for Setting Up and Connecting the Cluster Hardware 45 Multi-initiator SCSI configurations are not supported due to the difficulty in obtaining proper bus termination. • The Linux device name for each shared storage device must be ...

[Page 46] Red Hat CLUSTER MANAGER - INSTALLATION AND

46 Chapter 2:Hardware Installation and Operating System Configuration two single-initiator SCSI buses to connect each cluster system to the RAID array is possible. If a log- ical unit can fail over from one controller to the other, the process must b...

[Page 47] Red Hat CLUSTER MANAGER - INSTALLATION AND

Section 2.4:Steps for Setting Up and Connecting the Cluster Hardware 47 Figure 2–6 Single-Controller RAID Array Connected to Single-Initiator SCSI Buses Figure 2–7 Dual-Controller RAID Array Connected to Single-Initiator SCSI Buses ...

[Page 48] Red Hat CLUSTER MANAGER - INSTALLATION AND

48 Chapter 2:Hardware Installation and Operating System Configuration Setting Up a Fibre Channel Interconnect Fibre Channel can be used in either single-initiator or multi-initiator configurations A single-initiator Fibre Channel interconnect has onl...

[Page 49] Red Hat CLUSTER MANAGER - INSTALLATION AND

Section 2.4:Steps for Setting Up and Connecting the Cluster Hardware 49 Figure 2–9 Dual-Controller RAID Array Connected to Single-Initiator Fibre Channel Interconnects If a dual-controller RAID array with two host ports on each controller is used, ...

[Page 50] Red Hat CLUSTER MANAGER - INSTALLATION AND

50 Chapter 2:Hardware Installation and Operating System Configuration partition. Data consistency is maintained through checksums and any inconsistencies between the partitions are automatically corrected. If a system is unable to write to both quoru...

[Page 51] Red Hat CLUSTER MANAGER - INSTALLATION AND

Section 2.4:Steps for Setting Up and Connecting the Cluster Hardware 51 1. Invoke the interactive fdisk command, specifying an available shared disk device. At the prompt, specify the p command to display the current partition table. # fdisk /dev/sde...

[Page 52] Red Hat CLUSTER MANAGER - INSTALLATION AND

52 Chapter 2:Hardware Installation and Operating System Configuration Syncing disks. 7. If a partition was added while both cluster systems are powered on and connected to the shared storage, reboot the other cluster system in order for it to recogni...

[Page 53] Red Hat CLUSTER MANAGER - INSTALLATION AND

Section 2.4:Steps for Setting Up and Connecting the Cluster Hardware 53 # service rawdevices restart Query all the raw devices by using the command raw -aq: # raw -aq /dev/raw/raw1 bound to major 8, minor 17 /dev/raw/raw2 bound to major 8, minor 18 N...

[Page 54] Red Hat CLUSTER MANAGER - INSTALLATION AND

54 Chapter 2:Hardware Installation and Operating System Configuration ...

[Page 55] Red Hat CLUSTER MANAGER - INSTALLATION AND

Section 3.1:Steps for Installing and Initializing the Cluster Software 55 3 Cluster Software Installation and Configuration After installing and configuring the cluster hardware, the cluster system software can be installed. The following sections de...

[Page 56] Red Hat CLUSTER MANAGER - INSTALLATION AND

56 Chapter 3:Cluster Software Installation and Configuration • Number of heartbeat connections (channels), both Ethernet and serial • Device special file for each heartbeat serial line connection (for example, /dev/ttyS1) • IP host name associa...

[Page 57] Red Hat CLUSTER MANAGER - INSTALLATION AND

Section 3.1:Steps for Installing and Initializing the Cluster Software 57 3.1.1 Editing the rawdevices File The /etc/sysconfig/rawdevices file is used to map the raw devices for the quorum parti- tions each time a cluster system boots. As part of the...

[Page 58] Red Hat CLUSTER MANAGER - INSTALLATION AND

58 Chapter 3:Cluster Software Installation and Configuration While running cluconfig, you will be prompted as to whether or not you wish to configure a cluster alias. This appears as the following prompt: Enter IP address for cluster alias [NONE]: 17...

[Page 59] Red Hat CLUSTER MANAGER - INSTALLATION AND

Section 3.1:Steps for Installing and Initializing the Cluster Software 59 /sbin/cluconfig Red Hat Cluster Manager Configuration Utility (running on storage0) - Configuration file exists already. Would you like to use those prior settings as defaults?...

[Page 60] Red Hat CLUSTER MANAGER - INSTALLATION AND

60 Chapter 3:Cluster Software Installation and Configuration Enter hostname of the cluster member on heartbeat channel 0 \ [storage1]: storage1 Looking for host storage1 (may take a few seconds)... Information about Quorum Partitions Enter Primary Qu...

[Page 61] Red Hat CLUSTER MANAGER - INSTALLATION AND

Section 3.1:Steps for Installing and Initializing the Cluster Software 61 Primary quorum partition: /dev/raw/raw1 Shadow quorum partition: /dev/raw/raw2 Heartbeat channels: 1 Channel type: net, Name: storage1 Power switch IP address or hostname: stor...

[Page 62] Red Hat CLUSTER MANAGER - INSTALLATION AND

62 Chapter 3:Cluster Software Installation and Configuration 3.2 Checking the Cluster Configuration To ensure that the cluster software has been correctly configured, use the following tools located in the /sbin directory: • Test the quorum partiti...

[Page 63] Red Hat CLUSTER MANAGER - INSTALLATION AND

Section 3.2:Checking the Cluster Configuration 63 /sbin/cludiskutil -p ----- Shared State Header ------ Magic# = 0x39119fcd Version = 1 Updated on Thu Sep 14 05:43:18 2000 Updated by node 0 -------------------------------- The Magic# and Version fiel...

[Page 64] Red Hat CLUSTER MANAGER - INSTALLATION AND

64 Chapter 3:Cluster Software Installation and Configuration invoked, it checks the status of the cluster software. If the cluster software is running, the command exits with a message to stop the cluster software. The format of the clustonith comman...

[Page 65] Red Hat CLUSTER MANAGER - INSTALLATION AND

Section 3.3:Configuring syslog Event Logging 65 – Verify that the network connection to network-based switches is operational. Most switches have a link light that indicates connectivity. – It should be possible to ping the network switch; if not...

[Page 66] Red Hat CLUSTER MANAGER - INSTALLATION AND

66 Chapter 3:Cluster Software Installation and Configuration The importance of an event determines the severity level of the log entry. Important events should be investigated before they affect cluster availability. The cluster can log messages with...

[Page 67] Red Hat CLUSTER MANAGER - INSTALLATION AND

Section 3.4:Using the cluadmin Utility 67 After configuring the cluster software, optionally edit the /etc/syslog.conf file to enable the cluster to log events to a file that is different from the default log file, /var/log/messages. The cluster util...

[Page 68] Red Hat CLUSTER MANAGER - INSTALLATION AND

68 Chapter 3:Cluster Software Installation and Configuration If another user holds the lock, a warning will be displayed indicating that there is already a lock on the database. The cluster software allows for the option of taking the lock. If the lo...

[Page 69] Red Hat CLUSTER MANAGER - INSTALLATION AND

Section 3.4:Using the cluadmin Utility 69 Table 3–1 cluadmin Commands clu- admin Com- mand cluadmin Subcom- mand Description Example help None Displays help for the specified cluadmin command or subcommand. help service add cluster status Displays ...

[Page 70] Red Hat CLUSTER MANAGER - INSTALLATION AND

70 Chapter 3:Cluster Software Installation and Configuration clu- admin Com- mand cluadmin Subcom- mand Description Example restore Restores the cluster configuration database from the backup copy in the /etc/cluster.conf.bak file. See Section 8.5, B...

[Page 71] Red Hat CLUSTER MANAGER - INSTALLATION AND

Section 3.4:Using the cluadmin Utility 71 clu- admin Com- mand cluadmin Subcom- mand Description Example relocate Causes a service to be stopped on the cluster member its currently running on and restarted on the other. Refer to Section 4.6, Relocati...

[Page 72] Red Hat CLUSTER MANAGER - INSTALLATION AND

72 Chapter 3:Cluster Software Installation and Configuration While using the cluadmin utility, press the [Tab] key to help identify cluadmin commands. For example, pressing the [Tab] key at the cluadmin> prompt displays a list of all the commands....

[Page 73] Red Hat CLUSTER MANAGER - INSTALLATION AND

Section 4.1:Configuring a Service 73 4 Service Configuration and Administration The following sections describe how to configure, display, enable/disable, modify, relocate, and delete a service, as well as how to handle services which fail to start. ...

[Page 74] Red Hat CLUSTER MANAGER - INSTALLATION AND

74 Chapter 4:Service Configuration and Administration • Section 5.4, Setting Up a DB2 Service • Section 6.1, Setting Up an NFS Service • Section 6.2, Setting Up a High Availability Samba Service • Section 7.1, Setting Up an Apache Service 4.1...

[Page 75] Red Hat CLUSTER MANAGER - INSTALLATION AND

Section 4.1:Configuring a Service 75 Service Property or Resource Description IP address One or more Internet protocol (IP) addresses may be assigned to a service. This IP address (sometimes called a "floating" IP address) is different from...

[Page 76] Red Hat CLUSTER MANAGER - INSTALLATION AND

76 Chapter 4:Service Configuration and Administration Service Property or Resource Description Service Check Interval Specifies the frequency (in seconds) that the system will check the health of the application associated with the service. For examp...

[Page 77] Red Hat CLUSTER MANAGER - INSTALLATION AND

Section 4.2:Displaying a Service Configuration 77 The /usr/share/cluster/doc/services/examples directory contains a template that can be used to create service scripts, in addition to examples of scripts. See Section 5.1, Setting Up an Oracle Service...

[Page 78] Red Hat CLUSTER MANAGER - INSTALLATION AND

78 Chapter 4:Service Configuration and Administration • Whether the service was disabled after it was added • Preferred member system • Whether the service will relocate to its preferred member when it joins the cluster • Service Monitoring i...

[Page 79] Red Hat CLUSTER MANAGER - INSTALLATION AND

Section 4.4:Enabling a Service 79 NFS export 0: /mnt/users/engineering/brown Client 0: brown, rw cluadmin> If the name of the service is known, it can be specified with the service show config ser- vice_name command. 4.3 Disabling a Service A runn...

[Page 80] Red Hat CLUSTER MANAGER - INSTALLATION AND

80 Chapter 4:Service Configuration and Administration 4.5 Modifying a Service All properties that were specified when a service was created can be modified. For example, specified IP addresses can be changed. More resources can also be added to a ser...

[Page 81] Red Hat CLUSTER MANAGER - INSTALLATION AND

Section 4.8:Handling Services that Fail to Start 81 4.7 Deleting a Service A cluster service can be deleted. Note that the cluster database should be backed up before deleting a service. See Section 8.5, Backing Up and Restoring the Cluster Database ...

[Page 82] Red Hat CLUSTER MANAGER - INSTALLATION AND

82 Chapter 4:Service Configuration and Administration 2. Use the cluadmin utility to attempt to enable or disable the service on the cluster system that owns the service. See Section 4.3, Disabling a Service and Section 4.4, Enabling a Service for mo...

[Page 83] Red Hat CLUSTER MANAGER - INSTALLATION AND

Section 5.1:Setting Up an Oracle Service 83 5 Database Services This chapter contains instructions for configuring Red Hat Linux Advanced Server to make database services highly available. Note The following descriptions present example database conf...

[Page 84] Red Hat CLUSTER MANAGER - INSTALLATION AND

84 Chapter 5:Database Services start and stop a Web application that has been written using Perl scripts and modules and is used to interact with the Oracle database. Note that there are many ways for an application to interact with an Oracle databas...

[Page 85] Red Hat CLUSTER MANAGER - INSTALLATION AND

Section 5.1:Setting Up an Oracle Service 85 # ORACLE_SID # # Specifies the Oracle system identifier or "sid", which is the name of # the Oracle Server instance. # ######################################################################## expo...

[Page 86] Red Hat CLUSTER MANAGER - INSTALLATION AND

86 Chapter 5:Database Services # Verify that the users search path includes $ORCLE_HOME/bin # ######################################################################## export PATH=$PATH:/u01/app/oracle/product/${ORACLE_RELEASE}/bin ###################...

[Page 87] Red Hat CLUSTER MANAGER - INSTALLATION AND

Section 5.1:Setting Up an Oracle Service 87 # Specifies the Oracle system identifier or "sid", which is the name # of the Oracle Server instance. # ###################################################################### export ORACLE_SID=TES...

[Page 88] Red Hat CLUSTER MANAGER - INSTALLATION AND

88 Chapter 5:Database Services ###################################################################### export PATH=$PATH:/u01/app/oracle/product/${ORACLE_RELEASE}/bin ###################################################################### # # This does...

[Page 89] Red Hat CLUSTER MANAGER - INSTALLATION AND

Section 5.1:Setting Up an Oracle Service 89 # # This line does the real work. # /usr/bin/dbiproxy --logfile /home/oracle/dbiproxy.log --localport 1100 & exit 0 The following is an example of the stopdbi script, which is used to stop a networking ...

[Page 90] Red Hat CLUSTER MANAGER - INSTALLATION AND

90 Chapter 5:Database Services c - Cancel and return to the top-level cluadmin command r - Restart to the initial prompt while keeping previous responses p - Proceed with the next prompt Preferred member [None]: ministor0 Relocate when the preferred ...

[Page 91] Red Hat CLUSTER MANAGER - INSTALLATION AND

Section 5.2:Tuning Oracle Services 91 Disable service (yes/no/?) [no]: no name: oracle disabled: no preferred node: ministor0 relocate: yes user script: /home/oracle/oracle IP address 0: 10.1.16.132 netmask 0: 255.255.255.0 broadcast 0: 10.1.16.255 d...

[Page 92] Red Hat CLUSTER MANAGER - INSTALLATION AND

92 Chapter 5:Database Services in the cluster environment. This will ensure that failover is transparent to database client application programs and does not require programs to reconnect. 5.3 Setting Up a MySQL Service A database service can serve h...

[Page 93] Red Hat CLUSTER MANAGER - INSTALLATION AND

Section 5.3:Setting Up a MySQL Service 93 # Mysql daemon start/stop script. # Usually this is put in /etc/init.d (at least on machines SYSV R4 # based systems) and linked to /etc/rc3.d/S99mysql. When this is done # the mysql server will be started wh...

[Page 94] Red Hat CLUSTER MANAGER - INSTALLATION AND

94 Chapter 5:Database Services else if test -d "$datadir" then pid_file=$datadir/‘hostname‘.pid fi fi if grep "^basedir" $conf > /dev/null then basedir=‘grep "^basedir" $conf | cut -f 2 -d= | tr -d ’ ’‘ bi...

[Page 95] Red Hat CLUSTER MANAGER - INSTALLATION AND

Section 5.3:Setting Up a MySQL Service 95 echo "No mysqld pid file found. Looked for $pid_file." fi ;; *) # usage echo "usage: $0 start|stop" exit 1 ;; esac The following example shows how to use cluadmin to add a MySQL service. c...

[Page 96] Red Hat CLUSTER MANAGER - INSTALLATION AND

96 Chapter 5:Database Services Broadcast (e.g. X.Y.Z.255 or None) [None]: [Return] Do you want to (a)dd, (m)odify, (d)elete or (s)how an IP address, or are you (f)inished adding IP addresses: f Do you want to add a disk device to the service (yes/no/...

[Page 97] Red Hat CLUSTER MANAGER - INSTALLATION AND

Section 5.4:Setting Up a DB2 Service 97 1. On both cluster systems, log in as root and add the IP address and host name that will be used to access the DB2 service to /etc/hosts file. For example: 10.1.16.182 ibmdb2.class.cluster.com ibmdb2 2. Choose...

[Page 98] Red Hat CLUSTER MANAGER - INSTALLATION AND

98 Chapter 5:Database Services ADMIN.HOME_DIRECTORY = /db2home/db2as ---------Administration Server Profile Registry Settings- --------------------------------------------------------- ADMIN.DB2COMM = TCPIP ---------Global Profile Registry Settings--...

[Page 99] Red Hat CLUSTER MANAGER - INSTALLATION AND

Section 5.4:Setting Up a DB2 Service 99 2>/dev/null & 14. Check for errors during the installation by examining the installation log file. Every step in the installation must be marked as SUCCESS except for the following: DB2 Instance Creation...

[Page 100] Red Hat CLUSTER MANAGER - INSTALLATION AND

100 Chapter 5:Database Services ;; esac 17. Modify the /usr/IBMdb2/V6.1/instance/db2ishut file on both cluster systems to forcefully disconnect active applications before stopping the database. For example: for DB2INST in ${DB2INSTLIST?}; do echo &qu...