数据库名
|
节点编号
|
数据库版本
|
实例编号
|
操作系统内核版本
|
文件系统
|
集群管理器
|
SSKYDB
|
四个节点 ― oradb1、oradb2、oradb3 和 oradb4
|
10.2.0.1
|
四个实例 ― SSKY1、SSKY2、SSKY3 和 SSKY4
|
Red Hat Enterprise Linux AS 3 Linux sumsky.net 2.4.21-32.ELsmp |
OCFS 1.0 和 ASM
|
Oracle 集群件
|
[root@oradb5 root]# rpm -qa | grep -i gcc compat-gcc-c++-7.3-2.96.128 compat-gcc-7.3-2.96.128 libgcc-3.2.3-42 gcc-3.2.3-42 [root@oradb5 root]# rpm -qa | grep -i openmotif openmotif-2.2.3-3.RHEL3 openmotif21-2.1.30-8 [root@oradb5 root]# rpm -qa | grep -i glibc glibc-2.3.3-74 glibc-utils-2.3.3-74 glibc-kernheaders-2.4-8.34.1 glibc-common-2.3.3-74 glibc-headers-2.3.3-74 glibc-devel-2.3.3-74 [root@oradb5 root]# rpm -qa | grep -i compat compat-libstdc++-7.3-2.96.128 compat-gcc-c++-7.3-2.96.128 compat-gcc-7.3-2.96.128 compat-db-4.0.14-5 compat-libstdc++-devel-7.3-2.96.128 [root@oradb5 root]# |
kernel.core_uses_pid = 1 kernel.hostname = oradb5.sumsky.net kernel.domainname = sumsky.net kernel.shmall = 2097152 #kernel.shmmax = 536870912 kernel.shmmax = 2147483648 kernel.shmmni = 4096 kernel.shmseg = 4096 kernel.sem = 250 32000 100 150 kernel.msgmnl = 2878 kernel.msgmnb = 65535 fs.file-max = 65536 net.ipv4.ip_local_port_range = 1024 65000 net.core.rmem_default = 262144 net.core.wmem_default = 262144 net.core.rmem_max = 262144 net.core.wmem_max = 262144 |
oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536 |
[root@oradb5 root]$ more /etc/fstab LABEL=/ / ext3 defaults 1 1 none /dev/pts devpts gid=5,mode=620 0 0 none /proc proc defaults 0 0 none /dev/shm tmpfs defaults 0 0 /dev/sda2 swap swap defaults 0 0 /dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0 /dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0 /dev/sdb5 /u01 ocfs _netdev 0 0 /dev/sdb6 /u02 ocfs _netdev 0 0 /dev/sdb7 /u03 ocfs _netdev 0 0 /dev/sdb8 /u04 ocfs _netdev 0 0 /dev/sdb9 /u05 ocfs _netdev 0 0 /dev/sdb10 /u06 ocfs _netdev 0 0 /dev/sdb14 /u14 ocfs _netdev 0 0 |
[oracle@oradb1 oracle]$ id oracle uid=500(oracle) gid=500(oinstall) groups=501(dba), 502(oper) |
groupadd -g 500 oinstall groupadd -g 501 dba groupadd -g 502 oper |
useradd -u 500 -g oinstall -G dba, oper oracle passwd oracle Changing password for user oracle. New password: Retype new password: passwd: all authentication tokens updated successfully. |
[root@oradb5 root]$ id oracle uid=500(oracle) gid=500(oinstall) groups=501(dba), 502(oper) |
root@oradb5 root]# more /etc/hosts 127.0.0.1 localhost.localdomain localhost 192.168.2.10 oradb1.sumsky.net oradb1 192.168.2.20 oradb2.sumsky.net oradb2 192.168.2.30 oradb3.sumsky.net oradb3 192.168.2.40 oradb4.sumsky.net oradb4 192.168.2.50 oradb5.sumsky.net oradb5 #Private Network/interconnect 10.168.2.110 oradb1-priv.sumsky.net oradb1-priv 10.168.2.120 oradb2-priv.sumsky.net oradb2-priv 10.168.2.130 oradb3-priv.sumsky.net oradb3-priv 10.168.2.140 oradb4-priv.sumsky.net oradb4-priv 10.168.2.150 oradb5-priv.sumsky.net oradb5-priv # VIP 192.168.2.15 oradb1-vip.sumsky.net oradb1-vip 192.168.2.25 oradb2-vip.sumsky.net oradb2-vip 192.168.2.35 oradb3-vip.sumsky.net oradb3-vip 192.168.2.45 oradb4-vip.sumsky.net oradb4-vip 192.168.2.55 oradb5-vip.sumsky.net oradb5-vip |
[oracle@oradb5 oracle]$ ssh-keygen -t dsa -b 1024 Generating public/private dsa key pair. Enter file in which to save the key (/home/oracle/.ssh/id_dsa): Created directory '/home/oracle/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/oracle/.ssh/id_dsa. Your public key has been saved in /home/oracle/.ssh/id_dsa.pub. The key fingerprint is: b6:07:42:ae:47:56:0a:a3:a5:bf:75:3e:21:85:8d:30 [email protected] [oracle@oradb5 oracle]$ |
[oracle@oradb5 oracle]$ cd .ssh [oracle@oradb5 .ssh]$ cat id_dsa.pub > authorized_keys |
[oracle@oradb1 oracle]$ ssh oradb1 hostname oradb1.sumsky.net [oracle@oradb1 oracle]$ ssh oradb5 hostname Oradb5.sumsky.net [oracle@oradb1 oracle]$ ssh oradb1-priv hostname oradb1.sumsky.net [oracle@oradb1 oracle]$ ssh oradb5-priv hostname Oradb5.sumsky.net |
cluvfy stage -post hwos -n oradb1,oradb5 Performing post-checks for hardware and operating system setup Checking node reachability... Node reachability check passed from node "oradb1". Checking user equivalence... User equivalence check passed for user "oracle". Checking node connectivity... Node connectivity check passed for subnet "192.168.2.0" with node(s) oradb5,oradb1. Node connectivity check passed for subnet "10.168.2.0" with node(s) oradb5,oradb1. Suitable interfaces for the private interconnect on subnet "192.168.2.0": oradb5 eth0:192.168.2.50 eth0:192.168.2.55 oradb1 eth0:192.168.2.10 eth0:192.168.2.15 Suitable interfaces for the private interconnect on subnet "10.168.2.0": oradb5 eth1:10.168.2.150 oradb1 eth1:10.168.2.110 Checking shared storage accessibility... Shared storage check failed on nodes "oradb5". Post-check for hardware and operating system setup was unsuccessful on all the nodes. |
Checking shared storage accessibility... Shared storage check passed on nodes "oradb5,oradb1". Post-check for hardware and operating system setup was successful on all the nodes. |
[oracle@oradb1 cluvfy]$ cluvfy stage -pre crsinst -n oradb1,oradb5 Performing pre-checks for cluster services setup Checking node reachability... Node reachability check passed from node "oradb1". Checking user equivalence... User equivalence check passed for user "oracle". Checking administrative privileges... User existence check passed for "oracle". Group existence check passed for "oinstall". Membership check for user "oracle" in group "oinstall" [as Primary] failed. Check failed on nodes: oradb5,oradb1 Administrative privileges check passed. Checking node connectivity... Node connectivity check passed for subnet "192.168.2.0" with node(s) oradb5,oradb1. Node connectivity check passed for subnet "10.168.2.0" with node(s) oradb5,oradb1. Suitable interfaces for the private interconnect on subnet "192.168.2.0": oradb5 eth0:192.168.2.50 eth0:192.168.2.55 oradb1 eth0:192.168.2.10 eth0:192.168.2.15 Suitable interfaces for the private interconnect on subnet "10.168.2.0": oradb5 eth1:10.168.2.150 oradb1 eth1:10.168.2.110 Checking system requirements for 'crs'... Total memory check passed. Check failed on nodes: oradb5,oradb1 Free disk space check passed. Swap space check passed. System architecture check passed. Kernel version check passed. Package existence check passed for "make-3.79". Package existence check passed for "binutils-2.14". Package existence check passed for "gcc-3.2". Package existence check passed for "glibc-2.3.2-95.27". Package existence check passed for "compat-db-4.0.14-5". Package existence check passed for "compat-gcc-7.3-2.96.128". Package existence check passed for "compat-gcc-c++-7.3-2.96.128". Package existence check passed for "compat-libstdc++-7.3-2.96.128". Package existence check passed for "compat-libstdc++-devel-7.3-2.96.128". Package existence check passed for "openmotif-2.2.3". Package existence check passed for "setarch-1.3-1". Group existence check passed for "dba". Group existence check passed for "oinstall". User existence check passed for "nobody". System requirement failed for 'crs' Pre-check for cluster services setup was successful on all the nodes. |
公共节点名称 | 私有节点名称 | 虚拟主机名称 |
oradb5 | oradb5-priv | oradb5-vip |
/usr/app/oracle/oraInventory/orainstRoot.sh on node oradb5
[root@oradb5 oraInventory]# ./orainstRoot.sh Changing permissions of /usr/app/oracle/oraInventory to 770. Changing groupname of /usr/app/oracle/oraInventory to dba. The execution of the script is complete [root@oradb5 oraInventory]# |
[root@oradb1 install]# ./rootaddnode.sh clscfg: EXISTING configuration version 3 detected. clscfg: version 3 is 10G Release 2. Attempting to add 1 new nodes to the configuration Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897. node <nodenumber>: <nodename> <private interconnect name> <hostname> node 5: oradb5 oradb5-priv oradb5 Creating OCR keys for user 'root', privgrp 'root'.. Operation successful. /usr/app/oracle/product/10.2.0/crs/bin/srvctl add nodeapps -n oradb5 -A oradb5-v ip/255.255.255.0/bond0 -o /usr/app/oracle/product/10.2.0/crs [root@oradb1 install]# |
[root@oradb5 crs]# ./root.sh WARNING: directory '/usr/app/oracle/product/10.2.0' is not owned by root WARNING: directory '/usr/app/oracle/product' is not owned by root WARNING: directory '/usr/app/oracle' is not owned by root Checking to see if Oracle CRS stack is already configured /etc/oracle does not exist. Creating it now. OCR backup directory '/usr/app/oracle/product/10.2.0/crs/cdata/SskyClst' does not exist. Creating now Setting the permissions on OCR backup directory Setting up NS directories Oracle Cluster Registry configuration upgraded successfully WARNING: directory '/usr/app/oracle/product/10.2.0' is not owned by root WARNING: directory '/usr/app/oracle/product' is not owned by root WARNING: directory '/usr/app/oracle' is not owned by root clscfg: EXISTING configuration version 3 detected. clscfg: version 3 is 10G Release 2. assigning default hostname oradb1 for node 1. Successfully accumulated necessary OCR keys. Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897. node : node 1: oradb1 oradb1-priv oradb1 node 2: oradb2 oradb2-priv oradb2 node 3: oradb3 oradb3-priv oradb3 node 4: oradb4 oradb4-priv oradb4 clscfg: Arguments check out successfully. NO KEYS WERE WRITTEN. Supply -force parameter to override. -force is destructive and will destroy any previous cluster configuration. Oracle Cluster Registry for cluster has already been initialized Startup will be queued to init within 90 seconds. Adding daemons to inittab Expecting the CRS daemons to be up within 600 seconds. CSS is active on these nodes. oradb1 oradb2 oradb3 oradb4 oradb5 CSS is active on all nodes. Waiting for the Oracle CRSD and EVMD to start Oracle CRS stack installed and running under init(1M) Running vipca(silent) for configuring nodeapps IP address "oradb-vip" has already been used. Enter an unused IP address. |
[root@oradb5 root]# ls -ltr /etc/init.d/init.* -r-xr-xr-x 1 root root 3197 Aug 13 23:32 /etc/init.d/init.evmd -r-xr-xr-x 1 root root 35401 Aug 13 23:32 /etc/init.d/init.cssd -r-xr-xr-x 1 root root 4721 Aug 13 23:32 /etc/init.d/init.crsd -r-xr-xr-x 1 root root 1951 Aug 13 23:32 /etc/init.d/init.crs [root@oradb5 root]# |
[root@oradb5 root]# tail -5 /etc/inittab # Run xdm in runlevel 5 x:5:respawn:/etc/X11/prefdm -nodaemon h1:35:respawn:/etc/init.d/init.evmd run >/dev/null 2>&1 </dev/null h2:35:respawn:/etc/init.d/init.cssd fatal >/dev/null 2>&1 </dev/null h3:35:respawn:/etc/init.d/init.crsd run >/dev/null 2>&1 </dev/null |
[oracle@oradb1 oracle]$ olsnodes oradb1 oradb2 oradb3 oradb4 oradb5 [oracle@oradb1 oracle]$ |
[oracle@oradb1 oracle]$ crs_stat -t Name Type Target State Host ------------------------------------------------------------ ora.oradb1.gsd application ONLINE ONLINE oradb1 ora.oradb1.ons application ONLINE ONLINE oradb1 ora.oradb1.vip application ONLINE ONLINE oradb1 ora.oradb2.gsd application ONLINE ONLINE oradb2 ... ora.oradb3.vip application ONLINE ONLINE oradb3 ora.oradb4.gsd application ONLINE ONLINE oradb4 ora.oradb4.ons application ONLINE ONLINE oradb4 ora.oradb4.vip application ONLINE ONLINE oradb4 ora.oradb5.gsd application ONLINE ONLINE oradb5 ora.oradb5.ons application ONLINE ONLINE oradb5 ora.oradb5.vip application ONLINE ONLINE oradb5 |
[oracle@oradb5 oracle]$ ifconfig -a eth0 Link encap:Ethernet HWaddr 00:90:27:B8:58:10 inet addr:192.168.2.50 Bcast:192.168.2.255 Mask:255.255.255.0 UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1 RX packets:123 errors:0 dropped:0 overruns:0 frame:0 TX packets:67 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:583308844 (556.2 Mb) TX bytes:4676477 (4.4 Mb) eth0:1 Link encap:Ethernet HWaddr 00:90:27:B8:58:10 inet addr:192.168.2.55 Bcast:192.168.3.255 Mask:255.255.252.0 UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1 RX packets:14631 errors:0 dropped:0 overruns:0 frame:0 TX packets:21377 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:8025681 (7.6 Mb) TX bytes:600 (600.0 b) Interrupt:11 Base address:0x2400 Memory:41300000-41300038 |
[root@oradb5 db_1]# ./root.sh Running Oracle10 root.sh script... The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /usr/app/oracle/product/10.2.0/db_1 Enter the full pathname of the local bin directory: [/usr/local/bin]: The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y Copying dbhome to /usr/local/bin ... The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y Copying oraenv to /usr/local/bin ... The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y Copying coraenv to /usr/local/bin ... 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.sh script. Now product-specific root actions will be performed |
SQL> select * from v$active_instances; INST_NUMBER INST_NAME ----------- ----------------------------------- 1 oradb1.sumsky.net:SSKY1 2 oradb2.sumsky.net:SSKY2 3 oradb3.sumsky.net:SSKY3 4 oradb4.sumsky.net:SSKY4 5 oradb5.sumsky.net:SSKY5 |
SQL> SELECT NAME,STATE,TYPE FROM V$ASM_DISKGROUP; NAME STATE TYPE ------------------------------ ----------- ------ ASMGRP1 CONNECTED NORMAL ASMGRP2 CONNECTED NORMAL SQL> SELECT NAME FROM V$DATAFILE; NAME ----------------------------------------------------------------- +ASMGRP1/sskydb/datafile/system.256.581006553 +ASMGRP1/sskydb/datafile/undotbs1.258.581006555 +ASMGRP1/sskydb/datafile/sysaux.257.581006553 +ASMGRP1/sskydb/datafile/users.259.581006555 +ASMGRP1/sskydb/datafile/example.269.581007007 +ASMGRP1/sskydb/datafile/undots2.271.581029215 |
[oracle@oradb1 oracle]$ srvctl status database -d SSKYDB Instance SSKY1 is running on node oradb1 Instance SSKY2 is running on node oradb2 Instance SSKY3 is running on node oradb3 Instance SSKY4 is running on node oradb4 Instance SSKY5 is running on node oradb5 |
[oracle@oradb1 oracle]$ srvctl status service -d SSKYDB Service CRM is running on instance(s) SSKY1 Service CRM is running on instance(s) SSKY2 Service CRM is running on instance(s) SSKY3 Service CRM is running on instance(s) SSKY4 Service CRM is running on instance(s) SSKY5 Service PAYROLL is running on instance(s) SSKY1 Service PAYROLL is running on instance(s) SSKY5 |
[oracle@oradb5 oracle]$ more .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs export ORACLE_BASE=/usr/app/oracle export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1 export ORA_CRS_HOME=$ORACLE_BASE/product/10.2.0/crs export PATH=.:${PATH}:$HOME/bin:$ORACLE_HOME/bin export PATH=${PATH}:$ORA_CRS_HOME/bin export PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin:/sbin export ORACLE_ADMIN=$ORACLE_BASE/admin export TNS_ADMIN=$ORACLE_HOME/network/admin export LD_ASSUME_KERNEL=2.4.19 export LD_LIBRARY=$ORACLE_HOME/lib export LD_LIBRARY=${LD_LIBRARY}:/lib:/usr/lib:/usr/local/bin export LD_LIBRARY=${LD_LIBRARY}:$ORA_CRS_HOME/lib export CLASSPATH=$ORACLE_HOME/JRE export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib export THREADS_FLAG=native export ORACLE_SID=SSKY5 |
CRAC = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = oradb1-vip)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = oradb2-vip)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = oradb3-vip)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = oradb4-vip)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = oradb5-vip)(PORT = 1521)) (LOAD_BALANCE = yes) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = CRM) ) ) |
[oracle@oradb4 oracle]$ more $ORACLE_HOME/opmn/conf/ons.config localport=6101 remoteport=6201 loglevel=3 useocr=on nodes=oradb4.sumsky.net:6101,oradb2.sumsky.net:6201, oradb1.sumsky.net:6201,oradb3.sumsky.net:6201,oradb5.sumsky.net:6201 onsclient1.sumsky.net:6200,onsclient2.sumsky.net:6200 |
数据库名 | 节点编号 | 数据库版本 | 实例编号 | 操作系统内核版本 | 文件系统 | 集群管理器 |
SSKYDB
|
五个节点 ― oradb1、oradb2、oradb3、oradb4 和 oradb5
|
10.2.0.1
|
五个实例 ― SSKY1、SSKY2、SSKY3、SSKY4 和 SSKY5
|
Red Hat Advanced Server 3.0 Linux sumsky.net 2.4.21-32.ELsmp |
OCFS 1.0 和 ASM
|
Oracle 集群件
|