Dernièrement un client m’a confié la délicate mission à ses yeux d’ajouter des noeuds supplémentaires au cluster RAC de pré-production, la principale motivation de cette demande provenait du fait que le contrat ULA (Unlimited License Agreement) arrivait prochainement à terme. Aussi pour bénéficier des conditions financières tout particulièrement avantageuses de ce contrat, il nous a fallu déployer dans les plus brefs délais de nouveaux noeuds pour pouvoir anticiper des futurs besoins de scalabilité des applications.
La procédure d’ajout d’un noeud dans un cluster RAC demeure somme toute assez simple mais certaines précautions doivent être prises pour être le plus efficace possible et surtout le plus productif.
Roadmap de la procédure
Pour illustrer cette procédure, nous ajouterons un noeud supplémentaire rac3-test au cluster déjà constitué par deux noeuds (rac1-test, rac2-test)
Mais avant de dérouler la procédure d’ajout de noeud proprement dite, il y a quelques précautions à prendre pour garantir le bon déroulement de cette opération qui se décompose de la manière suivante :
- Précautions d’usage sur le noeud supplémentaire
- Déploiement de Grid Infrastructure
- Déploiement de la distribution Oracle Database Enterprise Edition
- Création de la nouvelle instance
Précautions d’usage sur le noeud supplémentaire
Pour des raisons de simplicité d’installation, nous sommes partis d’un clone du système Linux d’un des noeuds existants pour déployer la distribution Linux sur le nouveau serveur, il nous a suffit ensuite d’adapter les adresses IP et le nom du serveur pour être en conformité avec la cible désirée.
Ces précautions concernent la déclaration des adresses IP (privée et virtuelle) du nouveau noeud, la visibilité des disques ASM et la création des répertoires d’accueil des binaires de grid infrastructure. Mais avant tout il est indispensable que le répertoire de l’inventaire Oracle OraInventory soit présent et respecte la même arborescence que celle définie sur les autres noeuds du cluster (rac1-test, rac2-test).
- Se connecter sous le compte root du nouveau nœud rac3-test
[root@rac3-test ~]# su -
- Vérifier l’existence des adresses privées et virtuelles dans le fichier /etc/hosts, dans le cas où celles-ci n’existeraient pas il faudrait les initialiser dans le fichier
[root@rac3-test ~]# cat /etc/hosts # Adresses virtuelles 10.xxx.xx.53 rac1-test-vip 10.xxx.xx.54 rac2-test-vip 10.xxx.xx.55 rac3-test-vip # Adresses privées 10.xxx.xx.103 rac1-test-priv 10.xxx.xx.104 rac2-test-priv 10.xxx.xx.105 rac3-test-priv
- Vérifier l’existence des packages Oracle asmlib
[root@rac3-test ~]# rpm -qa | grep asm oracleasm-2.6.18-238.el5-2.0.5-1.el5 oracleasm-support-2.1.4-1.el5 oracleasmlib-2.0.4-1.el5
- Vérifier la configuration ASMLIB
[root@rac3-test ~]# oracleasm configure ORACLEASM_ENABLED=true ORACLEASM_UID=oracle ORACLEASM_GID=oinstall ORACLEASM_SCANBOOT=true ORACLEASM_SCANORDER="" ORACLEASM_SCANEXCLUDE=""
- Initialisation de la librairie ASMLIB et découverte des disques ASM
[root@rac3-test ~]# oracleasm init Loading module "oracleasm": oracleasm Mounting ASMlib driver filesystem: /dev/oracleasm [root@rac3-test ~]# oracleasm scandisks Reloading disk partitions: done Cleaning any stale ASM disks... Scanning system for ASM disks... Instantiating disk "ASM_ARCH_01" Instantiating disk "ASM_ARCH_02" Instantiating disk "ASM_DATA_01" Instantiating disk "ASM_DATA_02" Instantiating disk "ASM_DATA_03" Instantiating disk "ASM_DATA_04" Instantiating disk "ASM_DATA_05" Instantiating disk "ASM_DATA_06" Instantiating disk "ASM_DATA_07" Instantiating disk "ASM_DATA_08" Instantiating disk "ASM_DATA_09" Instantiating disk "ASM_DATA_10" Instantiating disk "ASM_DATA_11" Instantiating disk "ASM_DATA_12" Instantiating disk "ASM_GRID_01" Instantiating disk "ASM_GRID_02" Instantiating disk "ASM_GRID_03" Instantiating disk "ASM_REDO_01" Instantiating disk "ASM_REDO_02"
- Vérifier la déclaration des disques ASM au niveau du système
[root@rac3-test ~]# ls -l /dev/oracleasm/disks total 0 brw-rw---- 1 oracle oinstall 8, 1 mai 22 12:03 ASM_ARCH_01 brw-rw---- 1 oracle oinstall 8, 17 mai 22 12:03 ASM_ARCH_02 brw-rw---- 1 oracle oinstall 8, 33 mai 22 12:03 ASM_DATA_01 brw-rw---- 1 oracle oinstall 8, 49 mai 22 12:03 ASM_DATA_02 brw-rw---- 1 oracle oinstall 8, 65 mai 22 12:03 ASM_DATA_03 brw-rw---- 1 oracle oinstall 8, 81 mai 22 12:03 ASM_DATA_04 brw-rw---- 1 oracle oinstall 8, 97 mai 22 12:03 ASM_DATA_05 brw-rw---- 1 oracle oinstall 8, 113 mai 22 12:03 ASM_DATA_06 brw-rw---- 1 oracle oinstall 8, 129 mai 22 12:03 ASM_DATA_07 brw-rw---- 1 oracle oinstall 8, 145 mai 22 12:03 ASM_DATA_08 brw-rw---- 1 oracle oinstall 8, 161 mai 22 12:03 ASM_DATA_09 brw-rw---- 1 oracle oinstall 8, 177 mai 22 12:03 ASM_DATA_10 brw-rw---- 1 oracle oinstall 8, 193 mai 22 12:03 ASM_DATA_11 brw-rw---- 1 oracle oinstall 8, 209 mai 22 12:03 ASM_DATA_12 brw-rw---- 1 oracle oinstall 8, 225 mai 22 12:03 ASM_GRID_01 brw-rw---- 1 oracle oinstall 8, 241 mai 22 12:03 ASM_GRID_02 brw-rw---- 1 oracle oinstall 65, 1 mai 22 12:03 ASM_GRID_03 brw-rw---- 1 oracle oinstall 65, 17 mai 22 12:03 ASM_REDO_01 brw-rw---- 1 oracle oinstall 65, 33 mai 22 12:03 ASM_REDO_02
- Création du répertoire d’accueil pour Grid infrastructure sur le nouveau nœud et tout particulièrement du répertoire oraInventory, pour cela nous allons nous positionner dans le répertoire /app qui est le répertoire racine de l’installation de tous les composants Oracle
[root@rac3-test app]# mkdir grid [root@rac3-test app]# chmod 770 grid [root@rac3-test app]# chown root:oinstall grid [root@rac3-test app]# mkdir oraInventory [root@rac3-test app]# chmod 770 oraInventory # Répertoire de l'inventaire Oracle sous le compte root [root@rac3-test app]# chown root:oinstall oraInventory [root@rac3-test app]# mkdir oracle [root@rac3-test app]# chmod 770 oracle [root@rac3-test app]# chown oracle:oinstall oracle [root@rac3-test app]# mkdir -p grid/11.2.0 [root@rac3-test app]# chown root:oinstall grid/11.2.0 # ORACLE_HOME de Grid Infrastructure [root@rac3-test app]# chmod 770 grid/11.2.0
Déploiement de Grid Infrastructure
L’avantage principal du script fourni par Oracle ‘addNode.sh‘ est le fait que la distribution Grid Infrastructure est automatiquement déployée sur le nouveau noeud à travers le réseau à l’identique de celle du noeud d’origine en terme d’arborescence et de binaires, dans notre cas de figure le propriétaire de la distribution grid infrastructure est ‘oracle’ aussi il est impératif que cet utilisateur puisse établir une connexion ‘ssh’ sur le nouveau noeud.
- Avant d’effectuer le déploiement de la distribution Grid Infrastructure il est recommandé de vérifier avec ‘cluvfy’ les prérequis de l’installation d’un nouveau noeud à partir du node 1 rac1-test.
oracle@rac1-test:+ASM1:/app/grid] . oraenv ORACLE_SID = [+ASM1] ? +ASM1 The Oracle base remains unchanged with value /app/oracle oracle@rac1-test:+ASM1:/app/grid/11.2.0/bin] cluvfy stage -pre nodeadd -n rac3-test.easyteam.fr Performing pre-checks for node addition Checking node reachability... Node reachability check passed from node "rac1-test" Checking user equivalence... User equivalence check passed for user "oracle" Checking node connectivity... Checking hosts config file... Verification of the hosts config file successful Check: Node connectivity for interface "bond0" Node connectivity passed for interface "bond0" Node connectivity check passed Checking CRS integrity... CRS integrity check passed Checking shared resources... Checking CRS home location... The location "/app/grid/11.2.0" is not shared but is present/creatable on all nodes Shared resources check for node addition passed Checking node connectivity... Checking hosts config file... Verification of the hosts config file successful Check: Node connectivity for interface "bond0" Node connectivity passed for interface "bond0" Check: Node connectivity for interface "bond1" Node connectivity passed for interface "bond1" Node connectivity check passed Total memory check passed Available memory check passed Swap space check passed Free disk space check passed for "rac3-test:/tmp" Free disk space check passed for "rac1-test:/tmp" Check for multiple users with UID value 1100 passed User existence check passed for "oracle" Run level check passed Hard limits check passed for "maximum open file descriptors" Soft limits check passed for "maximum open file descriptors" Hard limits check passed for "maximum user processes" Soft limits check passed for "maximum user processes" System architecture check passed Kernel version check passed Kernel parameter check passed for "semmsl" Kernel parameter check passed for "semmns" Kernel parameter check passed for "semopm" Kernel parameter check passed for "semmni" Kernel parameter check passed for "shmmax" Kernel parameter check passed for "shmmni" Kernel parameter check passed for "shmall" Kernel parameter check passed for "file-max" Kernel parameter check passed for "ip_local_port_range" Kernel parameter check passed for "rmem_default" Kernel parameter check passed for "rmem_max" Kernel parameter check passed for "wmem_default" Kernel parameter check passed for "wmem_max" Kernel parameter check passed for "aio-max-nr" Package existence check passed for "make-3.81( x86_64)" Package existence check passed for "binutils-2.17.50.0.6( x86_64)" Package existence check passed for "gcc-4.1.2 (x86_64)( x86_64)" Package existence check passed for "libaio-0.3.106 (x86_64)( x86_64)" Package existence check passed for "glibc-2.5-24 (x86_64)( x86_64)" Package existence check passed for "compat-libstdc++-33-3.2.3 (x86_64)( x86_64)" Package existence check passed for "elfutils-libelf-0.125 (x86_64)( x86_64)" Package existence check passed for "elfutils-libelf-devel-0.125( x86_64)" Package existence check passed for "glibc-common-2.5( x86_64)" Package existence check passed for "glibc-devel-2.5 (x86_64)( x86_64)" Package existence check passed for "glibc-headers-2.5( x86_64)" Package existence check passed for "gcc-c++-4.1.2 (x86_64)( x86_64)" Package existence check passed for "libaio-devel-0.3.106 (x86_64)( x86_64)" Package existence check passed for "libgcc-4.1.2 (x86_64)( x86_64)" Package existence check passed for "libstdc++-4.1.2 (x86_64)( x86_64)" Package existence check passed for "libstdc++-devel-4.1.2 (x86_64)( x86_64)" Package existence check passed for "sysstat-7.0.2( x86_64)" Package existence check passed for "ksh-20060214( x86_64)" Check for multiple users with UID value 0 passed Current group ID check passed Checking OCR integrity... OCR integrity check passed Checking Oracle Cluster Voting Disk configuration... Oracle Cluster Voting Disk configuration check passed Time zone consistency check passed Starting Clock synchronization checks using Network Time Protocol(NTP)... NTP Configuration file check started... NTP Configuration file check passed Checking daemon liveness... Liveness check passed for "ntpd" Check for NTP daemon or service alive passed on all nodes NTP daemon slewing option check passed NTP daemon's boot time configuration check for slewing option passed NTP common Time Server Check started... Check of common NTP Time Server passed Clock time offset check from NTP Time Server started... Clock time offset check passed Clock synchronization check using Network Time Protocol(NTP) passed User "oracle" is not part of "root" group. Check passed Checking consistency of file "/etc/resolv.conf" across nodes WARNING: PRVF-5640 : Both search and domain entries are present in file "/etc/resolv.conf" on the following nodes: rac1-test,rac3-test domain entry in file "/etc/resolv.conf" is consistent across nodes All nodes have one domain entry defined in file "/etc/resolv.conf" Checking all nodes to make sure that domain is "easyteam.fr" as found on node "rac1-test" All nodes of the cluster have same value for 'domain' search entry in file "/etc/resolv.conf" is consistent across nodes All nodes have one search entry defined in file "/etc/resolv.conf" The DNS response time for an unreachable node is within acceptable limit on all nodes File "/etc/resolv.conf" is consistent across nodes Pre-check for node addition was successful.
- Le contrôle des prérequis ayant été effectué avec succès maintenant nous pouvons ajouter le nouveau noeud à partir du noeud 1 rac1-test
oracle@rac1-test:+ASM1:/app/grid/11.2.0/bin] cd $ORACLE_HOME/oui/bin oracle@rac1-test:+ASM1:/app/grid/11.2.0/oui/bin] ./addNode.sh -silent "CLUSTER_NEW_NODES={rac3-test}" "CLUSTER_NEW_VIRTUAL_HOSTNAMES={rac3-test-vip}" Starting Oracle Universal Installer... Checking swap space: must be greater than 500 MB. Actual 74431 MB Passed Oracle Universal Installer, Version 11.2.0.2.0 Production Copyright (C) 1999, 2010, Oracle. All rights reserved. Performing tests to see whether nodes rac2-test,rac3-test are available ............................................................... 100% Done.. ----------------------------------------------------------------------------- Cluster Node Addition Summary Global Settings Source: /app/grid/11.2.0 New Nodes Space Requirements New Nodes rac3-test /: Required 13.29GB : Available 56.35GB Installed Products Product Names Oracle Grid Infrastructure 11.2.0.2.0 Sun JDK 1.5.0.24.08 Installer SDK Component 11.2.0.2.0 Oracle One-Off Patch Installer 11.2.0.0.2 Oracle Universal Installer 11.2.0.2.0 Oracle USM Deconfiguration 11.2.0.2.0 Oracle Configuration Manager Deconfiguration 10.3.1.0.0 Enterprise Manager Common Core Files 10.2.0.4.3 Oracle DBCA Deconfiguration 11.2.0.2.0 Oracle RAC Deconfiguration 11.2.0.2.0 Oracle Quality of Service Management (Server) 11.2.0.2.0 Installation Plugin Files 11.2.0.2.0 Universal Storage Manager Files 11.2.0.2.0 Oracle Text Required Support Files 11.2.0.2.0 Automatic Storage Management Assistant 11.2.0.2.0 Oracle Database 11g Multimedia Files 11.2.0.2.0 Oracle Multimedia Java Advanced Imaging 11.2.0.2.0 Oracle Globalization Support 11.2.0.2.0 Oracle Multimedia Locator RDBMS Files 11.2.0.2.0 Oracle Core Required Support Files 11.2.0.2.0 Bali Share 1.1.18.0.0 Oracle Database Deconfiguration 11.2.0.2.0 Oracle Quality of Service Management (Client) 11.2.0.2.0 Expat libraries 2.0.1.0.1 Oracle Containers for Java 11.2.0.2.0 Perl Modules 5.10.0.0.1 Secure Socket Layer 11.2.0.2.0 Oracle JDBC/OCI Instant Client 11.2.0.2.0 Oracle Multimedia Client Option 11.2.0.2.0 LDAP Required Support Files 11.2.0.2.0 Character Set Migration Utility 11.2.0.2.0 Perl Interpreter 5.10.0.0.1 PL/SQL Embedded Gateway 11.2.0.2.0 OLAP SQL Scripts 11.2.0.2.0 Database SQL Scripts 11.2.0.2.0 Oracle Extended Windowing Toolkit 3.4.47.0.0 SSL Required Support Files for InstantClient 11.2.0.2.0 SQL*Plus Files for Instant Client 11.2.0.2.0 Oracle Net Required Support Files 11.2.0.2.0 Oracle Database User Interface 2.2.13.0.0 RDBMS Required Support Files for Instant Client 11.2.0.2.0 RDBMS Required Support Files Runtime 11.2.0.2.0 XML Parser for Java 11.2.0.2.0 Oracle Security Developer Tools 11.2.0.2.0 Oracle Wallet Manager 11.2.0.2.0 Enterprise Manager plugin Common Files 11.2.0.2.0 Platform Required Support Files 11.2.0.2.0 Oracle JFC Extended Windowing Toolkit 4.2.36.0.0 RDBMS Required Support Files 11.2.0.2.0 Oracle Ice Browser 5.2.3.6.0 Oracle Help For Java 4.2.9.0.0 Enterprise Manager Common Files 10.2.0.4.3 Deinstallation Tool 11.2.0.2.0 Oracle Java Client 11.2.0.2.0 Cluster Verification Utility Files 11.2.0.2.0 Oracle Notification Service (eONS) 11.2.0.2.0 Oracle LDAP administration 11.2.0.2.0 Cluster Verification Utility Common Files 11.2.0.2.0 Oracle Clusterware RDBMS Files 11.2.0.2.0 Oracle Locale Builder 11.2.0.2.0 Oracle Globalization Support 11.2.0.2.0 Buildtools Common Files 11.2.0.2.0 Oracle RAC Required Support Files-HAS 11.2.0.2.0 SQL*Plus Required Support Files 11.2.0.2.0 XDK Required Support Files 11.2.0.2.0 Agent Required Support Files 10.2.0.4.3 Parser Generator Required Support Files 11.2.0.2.0 Precompiler Required Support Files 11.2.0.2.0 Installation Common Files 11.2.0.2.0 Required Support Files 11.2.0.2.0 Oracle JDBC/THIN Interfaces 11.2.0.2.0 Oracle Multimedia Locator 11.2.0.2.0 Oracle Multimedia 11.2.0.2.0 HAS Common Files 11.2.0.2.0 Assistant Common Files 11.2.0.2.0 PL/SQL 11.2.0.2.0 HAS Files for DB 11.2.0.2.0 Oracle Recovery Manager 11.2.0.2.0 Oracle Database Utilities 11.2.0.2.0 Oracle Notification Service 11.2.0.2.0 SQL*Plus 11.2.0.2.0 Oracle Netca Client 11.2.0.2.0 Oracle Net 11.2.0.2.0 Oracle JVM 11.2.0.2.0 Oracle Internet Directory Client 11.2.0.2.0 Oracle Net Listener 11.2.0.2.0 Cluster Ready Services Files 11.2.0.2.0 Oracle Database 11g 11.2.0.2.0 ----------------------------------------------------------------------------- Instantiating scripts for add node (Tuesday, May 22, 2012 3:17:46 PM CEST) . 1% Done. Instantiation of add node scripts complete Copying to remote nodes (Tuesday, May 22, 2012 3:17:48 PM CEST) ............................................................................................... 96% Done. Home copied to new nodes Saving inventory on nodes (Tuesday, May 22, 2012 4:41:14 PM CEST) . 100% Done. Save inventory complete WARNING:A new inventory has been created on one or more nodes in this session. However, it has not yet been registered as the central inventory of this system. To register the new inventory please run the script at '/app/oraInventory/orainstRoot.sh' with root privileges on nodes 'rac3-test'. If you do not register the inventory, you may not be able to update or patch the products you installed. The following configuration scripts need to be executed as the "root" user in each cluster node. /app/oraInventory/orainstRoot.sh #On nodes rac3-test /app/grid/11.2.0/root.sh #On nodes rac3-test To execute the configuration scripts: 1. Open a terminal window 2. Log in as "root" 3. Run the scripts in each cluster node
- Pour finaliser l’installation, nous devons exécuter les commandes sous le compte root sur le nouveau nœud
[root@rac3-test app]# su - [root@rac3-test oraInventory]# /app/oraInventory/orainstRoot.sh Creating the Oracle inventory pointer file (/etc/oraInst.loc) Changing permissions of /app/oraInventory. Adding read,write permissions for group. Removing read,write,execute permissions for world. Changing groupname of /app/oraInventory to oinstall. The execution of the script is complete. [root@rac3-test oraInventory]# [root@rac3-test oraInventory]# /app/grid/11.2.0/root.sh Running Oracle 11g root script... The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /app/grid/11.2.0 Enter the full pathname of the local bin directory: [/usr/local/bin]: The contents of "dbhome" have not changed. No need to overwrite. The contents of "oraenv" have not changed. No need to overwrite. The contents of "coraenv" have not changed. No need to overwrite. Creating /etc/oratab file... Entries will be added to the /etc/oratab file as needed by Database Configuration Assistant when a database is created Finished running generic part of root script. Now product-specific root actions will be performed. Using configuration parameter file: /app/grid/11.2.0/crs/install/crsconfig_params Creating trace directory LOCAL ADD MODE Creating OCR keys for user 'root', privgrp 'root'.. Operation successful. OLR initialization – successful Adding daemon to inittab ACFS-9200: Supported ACFS-9300: ADVM/ACFS distribution files found. ACFS-9312: Existing ADVM/ACFS installation detected. ACFS-9314: Removing previous ADVM/ACFS installation. ACFS-9315: Previous ADVM/ACFS components successfully removed. ACFS-9307: Installing requested ADVM/ACFS software. ACFS-9308: Loading installed ADVM/ACFS drivers. ACFS-9321: Creating udev for ADVM/ACFS. ACFS-9323: Creating module dependencies - this may take some time. ACFS-9327: Verifying ADVM/ACFS devices. ACFS-9309: ADVM/ACFS installation correctness verified. CRS-4402: The CSS daemon was started in exclusive mode but found an active CSS daemon on node rac1-test, number 1, and is terminating An active cluster was found during exclusive startup, restarting to join the cluster clscfg: EXISTING configuration version 5 detected. clscfg: version 5 is 11g Release 2. Successfully accumulated necessary OCR keys. Creating OCR keys for user 'root', privgrp 'root'.. Operation successful. Configure Oracle Grid Infrastructure for a Cluster ... succeeded
- Maintenant nous pouvons vérifier que les ressources cluster ont bien été crées et sont bien actives (State ONLINE)
oracle@rac3-test:+ASM3:/app/grid/11.2.0/dbs] crs_stat -t Name Type Target State Host ------------------------------------------------------------ ora.ARCH.dg ora....up.type ONLINE ONLINE rac1-test ora.DATA1.dg ora....up.type ONLINE ONLINE rac1-test ora.DATA2.dg ora....up.type ONLINE ONLINE rac1-test ora.DATA3.dg ora....up.type ONLINE ONLINE rac1-test ora.DATA4.dg ora....up.type ONLINE ONLINE rac1-test ora.DG_GRID.dg ora....up.type ONLINE ONLINE rac1-test ora....ER.lsnr ora....er.type ONLINE ONLINE rac1-test ora....N1.lsnr ora....er.type ONLINE ONLINE rac1-test ora....N2.lsnr ora....er.type ONLINE ONLINE rac3-test ora....N3.lsnr ora....er.type ONLINE ONLINE rac2-test ora.REDO.dg ora....up.type ONLINE ONLINE rac1-test ora.asm ora.asm.type ONLINE ONLINE rac1-test ora.cvu ora.cvu.type ONLINE ONLINE rac2-test ora....SM1.asm application ONLINE ONLINE rac1-test ora....O2.lsnr application ONLINE ONLINE rac1-test ora....so2.gsd application OFFLINE OFFLINE ora....so2.ons application ONLINE ONLINE rac1-test ora....so2.vip ora....t1.type ONLINE ONLINE rac1-test ora....SM2.asm application ONLINE ONLINE rac2-test ora....O2.lsnr application ONLINE ONLINE rac2-test ora....so2.gsd application OFFLINE OFFLINE ora....so2.ons application ONLINE ONLINE rac2-test ora....so2.vip ora....t1.type ONLINE ONLINE rac2-test ora....so2.gsd application OFFLINE OFFLINE ora....SM3.asm application ONLINE ONLINE rac3-test ora....O2.lsnr application ONLINE ONLINE rac3-test ora....so2.gsd application OFFLINE OFFLINE ora....so2.ons application ONLINE ONLINE rac3-test ora....so2.vip ora....t1.type ONLINE ONLINE rac3-test ora....serv.db ora....se.type ONLINE ONLINE rac1-test ora.gsd ora.gsd.type OFFLINE OFFLINE ora....network ora....rk.type ONLINE ONLINE rac1-test ora.oc4j ora.oc4j.type ONLINE ONLINE rac2-test ora.ons ora.ons.type ONLINE ONLINE rac1-test ora....ry.acfs ora....fs.type ONLINE ONLINE rac1-test ora.scan1.vip ora....ip.type ONLINE ONLINE rac1-test ora.scan2.vip ora....ip.type ONLINE ONLINE rac3-test ora.scan3.vip ora....ip.type ONLINE ONLINE rac2-test oracle@rac3-test:+ASM3:/app/grid/11.2.0/dbs] crsctl check cluster -all ************************************************************** rac1-test: CRS-4537: Cluster Ready Services is online CRS-4529: Cluster Synchronization Services is online CRS-4533: Event Manager is online ************************************************************** rac2-test: CRS-4537: Cluster Ready Services is online CRS-4529: Cluster Synchronization Services is online CRS-4533: Event Manager is online ************************************************************** rac3-test: CRS-4537: Cluster Ready Services is online CRS-4529: Cluster Synchronization Services is online CRS-4533: Event Manager is online **************************************************************
Déploiement de Oracle Database Enterprise Edition
Comme pour le déploiement de Grid Infrastructure, l’installation de Database Enterprise Edition s’effectue par le script fourni par Oracle ‘addNode.sh‘ qui automatiquement déploie la distribution sur le nouveau noeud à travers le réseau à l’identique de celle du noeud d’origine en terme d’arborescence et de binaires.
- Se connecter sous le compte oracle sur le nœud 1 du cluster
oracle@rac1-test:RACDB1:/app/grid/11.2.0/oui/bin] . oraenv RACDB1 RACDB1 oracle@rac1-test:RACDB1:/app/grid/11.2.0/oui/bin] cd $ORACLE_HOME/oui/bin oracle@rac1-test:RACDB1:/app/oracle/11.2.0/db/oui/bin] ./addNode.sh -silent "CLUSTER_NEW_NODES={rac3-test}" Starting Oracle Universal Installer... Checking swap space: must be greater than 500 MB. Actual 74431 MB Passed Oracle Universal Installer, Version 11.2.0.2.0 Production Copyright (C) 1999, 2010, Oracle. All rights reserved. Performing tests to see whether nodes rac2-test,rac3-test are available ............................................................... 100% Done.. ----------------------------------------------------------------------------- Cluster Node Addition Summary Global Settings Source: /app/oracle/11.2.0/db New Nodes Space Requirements New Nodes rac3-test /: Required 5.46GB : Available 48.80GB Installed Products Product Names Oracle Database 11g 11.2.0.2.0 Sun JDK 1.5.0.24.08 Installer SDK Component 11.2.0.2.0 Oracle One-Off Patch Installer 11.2.0.0.2 Oracle Universal Installer 11.2.0.2.0 Oracle USM Deconfiguration 11.2.0.2.0 Oracle Configuration Manager Deconfiguration 10.3.1.0.0 Oracle DBCA Deconfiguration 11.2.0.2.0 Oracle RAC Deconfiguration 11.2.0.2.0 Oracle Database Deconfiguration 11.2.0.2.0 Oracle Configuration Manager Client 10.3.2.1.0 Oracle Configuration Manager 10.3.3.1.1 Oracle ODBC Driverfor Instant Client 11.2.0.2.0 LDAP Required Support Files 11.2.0.2.0 SSL Required Support Files for InstantClient 11.2.0.2.0 Bali Share 1.1.18.0.0 Oracle Extended Windowing Toolkit 3.4.47.0.0 Oracle JFC Extended Windowing Toolkit 4.2.36.0.0 Oracle Real Application Testing 11.2.0.2.0 Oracle Database Vault J2EE Application 11.2.0.2.0 Oracle Label Security 11.2.0.2.0 Oracle Data Mining RDBMS Files 11.2.0.2.0 Oracle OLAP RDBMS Files 11.2.0.2.0 Oracle OLAP API 11.2.0.2.0 Platform Required Support Files 11.2.0.2.0 Oracle Database Vault option 11.2.0.2.0 Oracle RAC Required Support Files-HAS 11.2.0.2.0 SQL*Plus Required Support Files 11.2.0.2.0 Oracle Display Fonts 9.0.2.0.0 Oracle Ice Browser 5.2.3.6.0 Oracle JDBC Server Support Package 11.2.0.2.0 Oracle SQL Developer 11.2.0.2.0 Oracle Application Express 11.2.0.2.0 XDK Required Support Files 11.2.0.2.0 RDBMS Required Support Files for Instant Client 11.2.0.2.0 SQLJ Runtime 11.2.0.2.0 Database Workspace Manager 11.2.0.2.0 RDBMS Required Support Files Runtime 11.2.0.2.0 Oracle Globalization Support 11.2.0.2.0 Exadata Storage Server 11.2.0.1.0 Provisioning Advisor Framework 10.2.0.4.3 Enterprise Manager Database Plugin -- Repository Support 11.2.0.2.0 Enterprise Manager Repository Core Files 10.2.0.4.3 Enterprise Manager Database Plugin -- Agent Support 11.2.0.2.0 Enterprise Manager Grid Control Core Files 10.2.0.4.3 Enterprise Manager Common Core Files 10.2.0.4.3 Enterprise Manager Agent Core Files 10.2.0.4.3 RDBMS Required Support Files 11.2.0.2.0 regexp 2.1.9.0.0 Agent Required Support Files 10.2.0.4.3 Oracle 11g Warehouse Builder Required Files 11.2.0.2.0 Oracle Notification Service (eONS) 11.2.0.2.0 Oracle Text Required Support Files 11.2.0.2.0 Parser Generator Required Support Files 11.2.0.2.0 Oracle Database 11g Multimedia Files 11.2.0.2.0 Oracle Multimedia Java Advanced Imaging 11.2.0.2.0 Oracle Multimedia Annotator 11.2.0.2.0 Oracle JDBC/OCI Instant Client 11.2.0.2.0 Oracle Multimedia Locator RDBMS Files 11.2.0.2.0 Precompiler Required Support Files 11.2.0.2.0 Oracle Core Required Support Files 11.2.0.2.0 Sample Schema Data 11.2.0.2.0 Oracle Starter Database 11.2.0.2.0 Oracle Message Gateway Common Files 11.2.0.2.0 Oracle XML Query 11.2.0.2.0 XML Parser for Oracle JVM 11.2.0.2.0 Oracle Help For Java 4.2.9.0.0 Installation Plugin Files 11.2.0.2.0 Enterprise Manager Common Files 10.2.0.4.3 Expat libraries 2.0.1.0.1 Deinstallation Tool 11.2.0.2.0 Oracle Quality of Service Management (Client) 11.2.0.2.0 Perl Modules 5.10.0.0.1 JAccelerator (COMPANION) 11.2.0.2.0 Oracle Containers for Java 11.2.0.2.0 Perl Interpreter 5.10.0.0.1 Oracle Net Required Support Files 11.2.0.2.0 Secure Socket Layer 11.2.0.2.0 Oracle Universal Connection Pool 11.2.0.2.0 Oracle JDBC/THIN Interfaces 11.2.0.2.0 Oracle Multimedia Client Option 11.2.0.2.0 Oracle Java Client 11.2.0.2.0 Character Set Migration Utility 11.2.0.2.0 Oracle Code Editor 1.2.1.0.0I PL/SQL Embedded Gateway 11.2.0.2.0 OLAP SQL Scripts 11.2.0.2.0 Database SQL Scripts 11.2.0.2.0 Oracle Locale Builder 11.2.0.2.0 Oracle Globalization Support 11.2.0.2.0 SQL*Plus Files for Instant Client 11.2.0.2.0 Required Support Files 11.2.0.2.0 Oracle Database User Interface 2.2.13.0.0 Oracle ODBC Driver 11.2.0.2.0 Oracle Notification Service 11.2.0.2.0 XML Parser for Java 11.2.0.2.0 Oracle Security Developer Tools 11.2.0.2.0 Oracle Wallet Manager 11.2.0.2.0 Cluster Verification Utility Common Files 11.2.0.2.0 Oracle Clusterware RDBMS Files 11.2.0.2.0 Oracle UIX 2.2.24.6.0 Enterprise Manager plugin Common Files 11.2.0.2.0 HAS Common Files 11.2.0.2.0 Precompiler Common Files 11.2.0.2.0 Installation Common Files 11.2.0.2.0 Oracle Help for the Web 2.0.14.0.0 Oracle LDAP administration 11.2.0.2.0 Buildtools Common Files 11.2.0.2.0 Assistant Common Files 11.2.0.2.0 Oracle Recovery Manager 11.2.0.2.0 PL/SQL 11.2.0.2.0 Generic Connectivity Common Files 11.2.0.2.0 Oracle Database Gateway for ODBC 11.2.0.2.0 Oracle Programmer 11.2.0.2.0 Oracle Database Utilities 11.2.0.2.0 Enterprise Manager Agent 10.2.0.4.3 SQL*Plus 11.2.0.2.0 Oracle Netca Client 11.2.0.2.0 Oracle Multimedia Locator 11.2.0.2.0 Oracle Call Interface (OCI) 11.2.0.2.0 Oracle Multimedia 11.2.0.2.0 Oracle Net 11.2.0.2.0 Oracle XML Development Kit 11.2.0.2.0 Database Configuration and Upgrade Assistants 11.2.0.2.0 Oracle JVM 11.2.0.2.0 Oracle Advanced Security 11.2.0.2.0 Oracle Internet Directory Client 11.2.0.2.0 Oracle Enterprise Manager Console DB 11.2.0.2.0 HAS Files for DB 11.2.0.2.0 Oracle Net Listener 11.2.0.2.0 Oracle Text 11.2.0.2.0 Oracle Net Services 11.2.0.2.0 Oracle Database 11g 11.2.0.2.0 Oracle OLAP 11.2.0.2.0 Oracle Spatial 11.2.0.2.0 Oracle Partitioning 11.2.0.2.0 Enterprise Edition Options 11.2.0.2.0 ----------------------------------------------------------------------------- Instantiating scripts for add node (Tuesday, May 22, 2012 5:09:04 PM CEST) . 1% Done. Instantiation of add node scripts complete Copying to remote nodes (Tuesday, May 22, 2012 5:09:06 PM CEST) ............................................................................................... 96% Done. Home copied to new nodes Saving inventory on nodes (Tuesday, May 22, 2012 5:13:51 PM CEST) . 100% Done. Save inventory complete WARNING: The following configuration scripts need to be executed as the "root" user in each cluster node. /app/oracle/11.2.0/db/root.sh #On nodes rac3-test To execute the configuration scripts: 1. Open a terminal window 2. Log in as "root" 3. Run the scripts in each cluster node The Cluster Node Addition of /app/oracle/11.2.0/db was successful. Please check '/tmp/silentInstall.log' for more details.
- Pour finaliser l’installation nous devons exécuter les commandes sous root sur le nouveau nœud rac3-test
[root@rac3-test oraInventory]# su - root -bash: [: root: unary operator expected [root@rac3-test ~]# /app/oracle/11.2.0/db/root.sh Running Oracle 11g root script... The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /app/oracle/11.2.0/db Enter the full pathname of the local bin directory: [/usr/local/bin]: The contents of "dbhome" have not changed. No need to overwrite. The contents of "oraenv" have not changed. No need to overwrite. The contents of "coraenv" have not changed. No need to overwrite. Entries will be added to the /etc/oratab file as needed by Database Configuration Assistant when a database is created Finished running generic part of root script. Now product-specific root actions will be performed. Finished product-specific root actions. [root@rac3-test ~]# /app/grid/11.2.0/crs/install/rootcrs.pl Using configuration parameter file: /app/grid/11.2.0/crs/install/crsconfig_params Configure Oracle Grid Infrastructure for a Cluster ... succeeded [root@rac3-test ~]#
Création de la nouvelle instance
Ne disposant pas des bibliothèques X11 sur le nouveau noeud, nous allons créer la nouvelle instance ‘RACDB3’ manuellement mais dans le cas où les bibliothèques X11 seraient présentes vous pouvez très bien utiliser l’assistant de création de base de données ‘dbca’ pour effectuer cette opération.
- Sur le nœud 1 rac1-test création des fichiers redo et undo
[oracle@rac1-test:RACDB1:/app/oracle/11.2.0/db/oui/bin] sqlplus / as sysdba SQL*Plus: Release 11.2.0.2.0 Production on Tue May 22 18:57:18 2012 Copyright (c) 1982, 2010, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production With the Partitioning, Real Application Clusters, Automatic Storage Management, Oracle Label Security, OLAP, Data Mining and Real Application Testing options SQL> select instance_name from v$instance; INSTANCE_NAME ---------------- RACDB1 SQL> SQL> ALTER DATABASE ADD LOGFILE THREAD 3 2 GROUP 20 '+REDO/racdb/redo_3_20.log' SIZE 1024M BLOCKSIZE 512 REUSE, 3 GROUP 21 '+REDO/racdb/redo_3_21.log' SIZE 1024M BLOCKSIZE 512 REUSE, 4 GROUP 22 '+REDO/racdb/redo_3_22.log' SIZE 1024M BLOCKSIZE 512 REUSE; Database altered. SQL> alter database enable public thread 3; Database altered. SQL> CREATE SMALLFILE UNDO TABLESPACE "UNDOTBS3" DATAFILE '+DATA3/racdb/undotbs3_01.dbf' SIZE 5385M REUSE AUTOEXTEND ON NEXT 5120K MAXSIZE 32767M; Database altered. SQL> alter system set undo_tablespace='UNDOTBS3' scope=spfile sid='RACDB3'; Database altered. SQL> alter system set thread=3 scope=spfile sid='RACDB3'; Database altered. SQL> alter system set instance_number=3 scope=spfile sid='RACDB3';
- Sur le nouveau nœud création de l’instance ‘RACDB3’ dans le fichier /etc/oratab, du répertoire d’audit, du fichier d’initialisation et du fichier de mots de passe
oracle@rac3-test::/home/oracle] echo "RACDB3:/app/oracle/11.2.0/db:N" >> /etc/oratab oracle@rac3-test::/home/oracle] . oraenv RACDB3 RACDB3 oracle@rac3-test:RACDB3:/home/oracle] mkdir -p /app/oracle/admin/RACDB/adump oracle@rac3-test:RACDB3:/app/oracle/11.2.0/db/dbs] mv orapwRACDB1 orapwRACDB3 oracle@rac3-test:RACDB3:/app/oracle/11.2.0/db/dbs] mv initRACDB1.ora initRACDB3.ora oracle@rac3-test:RACDB3:/home/oracle] sqlplus / as sysdba SQL*Plus: Release 11.2.0.2.0 Production on Tue May 22 19:01:42 2012 Copyright (c) 1982, 2010, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production With the Partitioning, Real Application Clusters, Automatic Storage Management, Oracle Label Security, OLAP, Data Mining and Real Application Testing options SQL> create pfile='/tmp/initRACDB3.ora' from spfile='+DATA1/RACDB/spfileRACDB.ora'; SQL> startup nomount pfile='/tmp/initRACDB3.ora' ORACLE instance started. Total System Global Area 4.5965E+10 bytes Fixed Size 2236864 bytes Variable Size 1.2080E+10 bytes Database Buffers 3.3823E+10 bytes Redo Buffers 60063744 bytes SQL> alter database mount; Database altered. SQL> alter database open; Database altered. SQL> exit
- Créer la nouvelle instance dans le cluster RAC et vérifier le démarrage des ressources associées à l’instance au niveau du cluster
oracle@rac3-test:RACDB3:/home/oracle] srvctl add instance -d racdb -i racdb3 -n rac3-test oracle@rac3-test:RACDB3:/app/oracle/11.2.0/db/dbs] srvctl status database -d racdb Instance RACDB1 is running on node rac1-test Instance RACDB2 is running on node rac2-test Instance RACDB3 is running on node rac3-test oracle@rac1-test:+ASM1:/home/oracle] crs_stat -t Name Type Target State Host ------------------------------------------------------------ ora.ARCH.dg ora....up.type ONLINE ONLINE rac1-test ora.DATA1.dg ora....up.type ONLINE ONLINE rac1-test ora.DATA2.dg ora....up.type ONLINE ONLINE rac1-test ora.DATA3.dg ora....up.type ONLINE ONLINE rac1-test ora.DATA4.dg ora....up.type ONLINE ONLINE rac1-test ora.DG_GRID.dg ora....up.type ONLINE ONLINE rac1-test ora....ER.lsnr ora....er.type ONLINE ONLINE rac1-test ora....N1.lsnr ora....er.type ONLINE ONLINE rac1-test ora....N2.lsnr ora....er.type ONLINE ONLINE rac1-test ora....N3.lsnr ora....er.type ONLINE ONLINE rac2-test ora.REDO.dg ora....up.type ONLINE ONLINE rac1-test ora.asm ora.asm.type ONLINE ONLINE rac1-test ora.cvu ora.cvu.type ONLINE ONLINE rac2-test ora....SM1.asm application ONLINE ONLINE rac1-test ora....O2.lsnr application ONLINE ONLINE rac1-test ora....so2.gsd application OFFLINE OFFLINE ora....so2.ons application ONLINE ONLINE rac1-test ora....so2.vip ora....t1.type ONLINE ONLINE rac1-test ora....SM2.asm application ONLINE ONLINE rac2-test ora....O2.lsnr application ONLINE ONLINE rac2-test ora....so2.gsd application OFFLINE OFFLINE ora....so2.ons application ONLINE ONLINE rac2-test ora....so2.vip ora....t1.type ONLINE ONLINE rac2-test ora....so2.gsd application OFFLINE OFFLINE ora....SM3.asm application ONLINE ONLINE rac3-test ora....O2.lsnr application ONLINE ONLINE rac3-test ora....so2.gsd application OFFLINE OFFLINE ora....so2.ons application ONLINE ONLINE rac3-test ora....so2.vip ora....t1.type ONLINE ONLINE rac3-test ora....serv.db ora....se.type ONLINE ONLINE rac1-test ora.gsd ora.gsd.type OFFLINE OFFLINE ora....network ora....rk.type ONLINE ONLINE rac1-test ora.oc4j ora.oc4j.type ONLINE ONLINE rac2-test ora.ons ora.ons.type ONLINE ONLINE rac1-test ora....ry.acfs ora....fs.type ONLINE ONLINE rac1-test ora.scan1.vip ora....ip.type ONLINE ONLINE rac1-test ora.scan2.vip ora....ip.type ONLINE ONLINE rac1-test ora.scan3.vip ora....ip.type ONLINE ONLINE rac2-test
Voilà et le tour est joué, l’opération n’a pas duré plus de deux heures et encore je suis généreux alors vous aussi vous pouvez vous lancer sans aucun complexe dans l’ajout de noeud en toute sérénité……