手机版
你好,游客 登录 注册 搜索
背景:
阅读新闻

一步一步在VirtualBox4.1.6中安装基于RHEL5.5x86_64的Oracle 10g R2双节点RAC

[日期:2012-02-02] 来源:Linux社区  作者:t0nsha [字体:大 中 小]

11. 配置ssh
ssh-keygen -t rsa
cat id_rsa.pub >>authorized_keys
scp authorized_keys rac2:/home/Oracle/.ssh/
scp authorized_keys rac1:/home/oracle/.ssh/

rac1和rac2上执行以下4条命令,没有提示输入密码表示ssh配置成功:
ssh rac1 date
ssh rac1-priv date
ssh rac2 date
ssh rac2-priv date

12. 配置共享磁盘为裸设备
vim  /etc/udev/rules.d/60-raw.rules
ACTION=="add", KERNEL=="sdb", RUN+="/bin/raw /dev/raw/raw1 %N"
ACTION=="add", KERNEL=="sdc", RUN+="/bin/raw /dev/raw/raw2 %N"
ACTION=="add", KERNEL=="sdd", RUN+="/bin/raw /dev/raw/raw3 %N"
ACTION=="add", KERNEL=="sde", RUN+="/bin/raw /dev/raw/raw4 %N"
ACTION=="add", KERNEL=="sdf", RUN+="/bin/raw /dev/raw/raw5 %N"
ACTION=="add", KERNEL=="sdg", RUN+="/bin/raw /dev/raw/raw6 %N"
ACTION=="add", KERNEL=="sdh", RUN+="/bin/raw /dev/raw/raw7 %N"
ACTION=="add", KERNEL=="sdi", RUN+="/bin/raw /dev/raw/raw8 %N"
ACTION=="add", KERNEL=="raw[1-8]", OWNER="oracle", GROUP="oinstall", MODE="0660"

13. 验证集群软件
cd /clusterware/cluvfy/
./runcluvfy.sh stage -pre crsinst -n rac1,rac2 -verbose

如下错误是bug导致,可以忽略
Could not find a suitable set of interfaces for VIPs.
(http://www.eygle.com/archives/2007/12/oracle10g_rac_linux_cluvfy.html)

14. 安装集群软件
cd /clusterware/
./runInstaller

运行/clusterware/runInstaller遇到以下问题时,
用root用户运行/clusterware/rootpre/rootpre.sh,
两个节点都需要执行:
Has 'rootpre.sh' been run by root? [y/n] (n)
# cd /clusterware/rootpre
./rootpre.sh

如遇系统版本不兼容,修改如下文件:
vim /etc/RedHat-release
redhat-4

执行/u01/oracle/crs/root.sh时碰到:
Failed to upgrade Oracle Cluster Registry configuration
有两点需要解决:
1. 需要打一个patch(其实就是替换每个节点的clsfmt.bin): p4679769_10201_Linux-x86-64.zip
2. 作为ocr和voting的磁盘没有分区,用fdisk将sdb-sdi分区
(由于是共享磁盘,只需在一个节点rac1分区即可,到rac2上就可看到分区了),
然后用dd命令刷新ocr和voting裸设备即可:
dd if=/dev/zero of=/dev/raw/raw1 bs=1M count=256
dd if=/dev/zero of=/dev/raw/raw2 bs=1M count=256
dd if=/dev/zero of=/dev/raw/raw3 bs=1M count=256
dd if=/dev/zero of=/dev/raw/raw4 bs=1M count=256
dd if=/dev/zero of=/dev/raw/raw5 bs=1M count=256
* a.) Are the RAW devices you are using partitions or full disks? They have to be partitions.
(https://cn.forums.oracle.com/forums/thread.jspa?threadID=1122862&start=0&tstart=0)

再次执行root.sh:
[root@rac1 crs]# ./root.sh
WARNING: directory '/u01/oracle' is not owned by root
WARNING: directory '/u01' is not owned by root
Checking to see if Oracle CRS stack is already configured

Setting the permissions on OCR backup directory
Setting up NS directories
Oracle Cluster Registry configuration upgraded successfully
WARNING: directory '/u01/oracle' is not owned by root
WARNING: directory '/u01' is not owned by root
Successfully accumulated necessary OCR keys.
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
node <nodenumber>: <nodename> <private interconnect name> <hostname>
node 1: rac1 rac1-priv rac1
node 2: rac2 rac2-priv rac2
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Now formatting voting device: /dev/raw/raw3
Now formatting voting device: /dev/raw/raw4
Now formatting voting device: /dev/raw/raw5
Format of 3 voting devices complete.
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.
        rac1
CSS is inactive on these nodes.
        rac2
Local node checking complete.
Run root.sh on remaining nodes to start CRS daemons.

在rac2节点上运行root.sh碰到如下错误:
[root@rac2 crs]# ./root.sh
WARNING: directory '/u01/oracle' is not owned by root
WARNING: directory '/u01' is not owned by root
Checking to see if Oracle CRS stack is already configured

Setting the permissions on OCR backup directory
Setting up NS directories
Oracle Cluster Registry configuration upgraded successfully
WARNING: directory '/u01/oracle' is not owned by root
WARNING: directory '/u01' is not owned by root
clscfg: EXISTING configuration version 3 detected.
clscfg: version 3 is 10G Release 2.
Successfully accumulated necessary OCR keys.
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
node <nodenumber>: <nodename> <private interconnect name> <hostname>
node 1: rac1 rac1-priv rac1
node 2: rac2 rac2-priv rac2
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.
        rac1
        rac2
CSS is active on all nodes.
Waiting for the Oracle CRSD and EVMD to start
Waiting for the Oracle CRSD and EVMD to start
Oracle CRS stack installed and running under init(1M)
Running vipca(silent) for configuring nodeapps
/u01/oracle/crs/jdk/jre//bin/Java: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory
需要修改两个脚本:
For the VIPCA utility, alter the $CRS_HOME/bin/vipca script on all nodes to remove LD_ASSUME_KERNEL. After the "if" statement in line 123, add an unset

command to ensure LD_ASSUME_KERNEL is not set as follows:

if [ "$arch" = "i686" -o "$arch" = "ia64" -o "$arch" = "x86_64" ]
       then
            LD_ASSUME_KERNEL=2.4.19
            export LD_ASSUME_KERNEL
       fi
            unset LD_ASSUME_KERNEL
With the newly inserted line, root.sh should be able to call VIPCA successfully.

For the SRVCTL utility, alter the $CRS_HOME/bin/srvctl scripts on all nodes by adding a line, unset LD_ASSUME_KERNEL, after line 174 as follows:

LD_ASSUME_KERNEL=2.4.19
export LD_ASSUME_KERNEL
unset LD_ASSUME_KERNEL

http://docs.oracle.com/cd/B19306_01/relnotes.102/b15666/toc.htm

只得重新运行一遍/u01/oracle/crs/root.sh:
先删除cssfatal:
rm -f /etc/oracle/scls_scr/rac1/oracle/cssfatal
再刷新ocr与voting disk:
dd if=/dev/zero of=/dev/raw/raw1 bs=1M count=256
dd if=/dev/zero of=/dev/raw/raw2 bs=1M count=256
dd if=/dev/zero of=/dev/raw/raw3 bs=1M count=256
dd if=/dev/zero of=/dev/raw/raw4 bs=1M count=256
dd if=/dev/zero of=/dev/raw/raw5 bs=1M count=256

linux
相关资讯       VirtualBox  Oracle基础教程 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款