您的位置:首页 > 大数据 > 人工智能

AIX 安装 RAC 无法发现节点(后遗症。。。)

2015-03-31 11:56 260 查看
解决无法发现节点问题后,又留下另一后遗症。。。。。。
安装CRS软件后,在第一个节点运行root.sh脚本时,出现以下错误:

[root@aix213 /]#/u01/crs_1/root.sh
WARNING: directory '/u01' is not owned by rootChecking to see if Oracle CRS stack is already configured
Setting the permissions on OCR backup directorySetting up NS directoriesOracle Cluster Registry configuration upgraded successfullyWARNING: directory '/u01' is not owned by root
clscfg -install -nn nodeA,nodeAnum,nodeB,nodeBnum... -o crshome       -l languageid -c clustername -q votedisk       [-t p1,p2,p3,p4] [-pn privA,privAnum,privB,privBnum...]       [-hn hostA,hostAnum,hostB,hostBnum...]
 -o crshome     - directory CRS is installed in  -q votedisk    - path to the CSS voting disk  -c clustername - name of the cluster. 1-14 character string  -l languageid  - Oracle localization language id.                   e.g. AMERICAN_AMERICA.WE8ASCII37C  -nn name,num   - nodename list in pairs of nodename,nodenumber                   If OS clusterware is installed see vendor docs.                   e.g. node1,1,node2,2,node4,4  -pn name,num   - Defines private interconnect names for nodes already                   specified with the -nn flag.                   Defaults to the nodename if not specified.  -hn name,num   - Defines hostnames for nodes specified with the -nn                   flag in the same format as above.                   Defaults to the nodename if not specified.  -t p1,p2,p3,p4 - Specifies TCP ports to be used by the CRS daemons                   on the private interconnect.                   default ports: 49895,49896,49897,49898  -force           Forces overwrite of any previous configuration.
WARNING: Using this tool may corrupt your cluster configuration. Do not         use unless you positively know what you are doing.
Failed to initialize Oracle Cluster Registry for cluster0

解决方法:
[root@aix213 /]#cat /u01/crs_1/root.sh
#!/bin/sh/u01/crs_1/install/rootinstall/u01/crs_1/install/rootconfig
分析root.sh 执行的脚本:
[root@aix213 /]#cat /u01/crs_1/install/rootconfig

#!/bin/sh## rootconfig.sh for Oracle CRS homes##    This is run once per node during the Oracle CRS install.#    This script does the following:#    1) Stop if any GSDs are running from 9.x oracle homes#    2) Initialize new OCR device or upgrade the existing OCR device#    3) Setup OCR for running CRS stack#    4) Copy the CRS init script to init.d for init process to start#    5) Start the CRS stack#    6) Configure NodeApps if CRS is up and running on all nodes## NOTE: Use sample paramfile in $ORA_CRS_HOME/srvm/admin/paramfile.sample for#       setting CRS parameters# The following commands need to be run before Oracle Cluster Registry is# populated.# This is run during CRS installation and not during RAC
SILENT=falseORA_CRS_HOME=/u01/crs_1CRS_ORACLE_OWNER=oracleCRS_DBA_GROUP=oinstallCRS_VNDR_CLUSTER=trueCRS_OCR_LOCATIONS=/dev/rrac_ocrCRS_CLUSTER_NAME=crsCRS_HOST_NAME_LIST=CRS_NODE_NAME_LIST=CRS_PRIVATE_NAME_LIST=aix213-priv,,aix214-priv,CRS_LANGUAGE_ID='AMERICAN_AMERICA.WE8ISO8859P1'CRS_VOTING_DISKS=/dev/rrac_voteCRS_NODELIST=aix213,aix214

发现
CRS_HOST_NAME_LIST=CRS_NODE_NAME_LIST=
这两个环境变量后面没有赋值,应该是在初期安装CRS时,没有发现节点,通过crs配置文件生成后,而这两个变量无法自动赋值,从而导致执行脚本出错。

1、重新配置 rootconfig.sh
#!/bin/sh## rootconfig.sh for Oracle CRS homes##    This is run once per node during the Oracle CRS install.#    This script does the following:#    1) Stop if any GSDs are running from 9.x oracle homes#    2) Initialize new OCR device or upgrade the existing OCR device#    3) Setup OCR for running CRS stack#    4) Copy the CRS init script to init.d for init process to start#    5) Start the CRS stack#    6) Configure NodeApps if CRS is up and running on all nodes## NOTE: Use sample paramfile in $ORA_CRS_HOME/srvm/admin/paramfile.sample for#       setting CRS parameters# The following commands need to be run before Oracle Cluster Registry is# populated.# This is run during CRS installation and not during RAC
SILENT=falseORA_CRS_HOME=/u01/crs_1CRS_ORACLE_OWNER=oracleCRS_DBA_GROUP=oinstallCRS_VNDR_CLUSTER=trueCRS_OCR_LOCATIONS=/dev/rrac_ocrCRS_CLUSTER_NAME=crsCRS_HOST_NAME_LIST=aix213,1,aix214,2CRS_NODE_NAME_LIST=aix213,1,aix214,2CRS_PRIVATE_NAME_LIST=aix213-priv,,aix214-priv,CRS_LANGUAGE_ID='AMERICAN_AMERICA.WE8ISO8859P1'CRS_VOTING_DISKS=/dev/rrac_voteCRS_NODELIST=aix213,aix214CRS_NODEVIPS='aix213/aix213-vip/255.255.255.0/en0,aix214/aix214-vip/255.255.255.0/en0'
2、删除crs 配置信息
[root@aix213 /]#/u01/crs_1/install/rootdelete.sh
3、修改OCR、VOTE 对应raw 属性
[root@aix213 /]#ls -l /dev |grep ocrbrw-rw----    1 oracle   dba          88,  1 Feb 24 09:51 rac_ocrcrw-r-----    1    oracle   dba    88,  1 Feb 26 08:58 rrac_ocr
[root@aix213 /]#ls -l /dev |grep votebrw-rw----    1 oracle   dba          88,  2 Feb 24 09:51 rac_votecrw-r--r--    1    oracle   dba     88,  2 Feb 26 08:58 rrac_vote

4、清空OCR、VOTE 磁盘头信息(所有节点)
[root@aix213 /] dd  if=/dev/zero  of=/dev/rrac_ocr  bs=1024k  count=2560
[root@aix213 /] dd  if=/dev/zero  of=/dev/rrac_vote  bs=1024k  count=2560
5、重新运行root.sh

[root@aix213 /]#/u01/crs_1/root.sh

至此,问题全部解决!

本文出自 “天涯客的blog” 博客,请务必保留此出处http://tiany.blog.51cto.com/513694/1363570
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: