当前位置: 首页 > news >正文

AIX系统学习之-CRS安装后校验

系统环境:

操作系统:AIX 5.3.8

Oracle:  Oracle 10gR2

案例分析

在构建RAC时,安装完CRS需要做安装后的校验,在执行校验工具cluvfy时出现以下错误:

[root@aix230:/u01/soft/Disk1/cluvfy]#crs_stat -t

1
2
3
4
5
6
7
8
Name           Type           Target    State     Host        
------------------------------------------------------------
ora.aix229.gsd application    ONLINE    ONLINE    aix229      
ora.aix229.ons application    ONLINE    ONLINE    aix229      
ora.aix229.vip application    ONLINE    ONLINE    aix229      
ora.aix230.gsd application    ONLINE    ONLINE    aix230      
ora.aix230.ons application    ONLINE    ONLINE    aix230      
ora.aix230.vip application    ONLINE    ONLINE    aix230

[root@aix230:/u01/soft/Disk1]#ls -l

total 56

1
2
3
4
5
6
7
drwxr-xr-x     7  oracle   dba              512  Oct  16  18 : 42  cluvfy
drwxr-xr-x     4  oracle   dba              512  Oct  16  13 : 35  install
drwxr-xr-x     2  oracle   dba              512  Oct  16  13 : 35  response
drwxr-xr-x     3  oracle   dba              512  Oct  16  13 : 35  rootpre
-rwxr-xr-x     1  oracle   dba             2602  Aug  20  2005   runInstaller
drwxr-xr-x     9  oracle   dba             3072  Oct  16  13 : 35  stage
drwxr-xr-x     2  oracle   dba              512  Oct  16  13 : 35  upgrade

[root@aix230:/u01/soft/Disk1/cluvfy]#/u01/soft/Disk1/cluvfy/runcluvfy.sh -h

The unzip of archive file /u01/soft/Disk1/cluvfy/jrepack.zip failed


查看目录权限:

1
2
3
4
5
6
7
8
9
10
11
12
13
[root@aix230:/u01/soft/Disk1/cluvfy]#ls -ld /u01
drwxr-sr-x     6  oracle   dba              512  Oct  16  13 : 43  /u01
 
[root@aix230:/u01/soft/Disk1/cluvfy]#ls -l
total  118384
drwxrwxr-x     3  oracle   dba             2048  Oct  16  18 : 42  bin
drwxr-xr-x     5  root     system           512  Jul  16  2005   cv
-rwxr-xr-x     1  oracle   dba         21378978  Aug  20  2005   cvupack.zip
drwxrwxr-x     2  root     system           512  Aug  16  2005   jlib
-rwxrwxrwx     1  oracle   dba         39203424  Aug  20  2005   jrepack.zip
drwxrwxr-x    10  oracle   dba             3072  Oct  16  18 : 42  lib
drwxrwxr-x     2  root     system           512  Jul  19  2005   lib32
-rwxr-xr-x     1  oracle   dba             3107  Aug  20  2005   runcluvfy.sh

修改可执行脚本权限:

[root@aix230:/u01/soft/Disk1/cluvfy]#chmod 777 runcluvfy.sh 

仍然失败,看来不是权限的问题:

[root@aix230:/u01/soft/Disk1/cluvfy]#./runcluvfy.sh 

The unzip of archive file ./jrepack.zip failed


查看可执行脚本的内容,发现秘密j_0015.gif

[root@aix230:/u01/soft/Disk1/cluvfy]#cat runcluvfy.sh 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#!/bin/sh
#
# This script sets up the environment  for  invocation of cluster verification 
# tool (cluvfy), unpacks the archive (cluvfy.zip)   for  the verification 
# framework software, executes the requested verification command,  and  cleans
# up the space occupied by the unpacked verification software.
# Usage: cluvfy.sh <cluvfy command options>
TMPDIR=/tmp
ECHO=/bin/echo
RM=/bin/rm
MKDIR=/bin/mkdir
case `/bin/uname`  in
Linux) UNZIP=/usr/bin/unzip
        DIRNAME=/usr/bin/dirname
       ;;
HP-UX) UNZIP=/usr/bin/unzip
        DIRNAME=/bin/dirname
       ;;
SunOS) UNZIP=/usr/bin/unzip
        DIRNAME=/bin/dirname
       ;;
AIX)   
        DIRNAME=/bin/dirname
        UNZIP=/usr/bin/unzip
        if  [ -f $UNZIP ]
            then
            UNZIP=/usr/bin/unzip
        else
            UNZIP=/usr/local/bin/unzip
        fi
       ;;
OSF1)  UNZIP=/usr/bin/unzip
        DIRNAME=/usr/bin/dirname
       ;;
*)     $ECHO  "ERROR: Unknown Operating system"
       exit  -1 ;
       ;;
esac
EXEC_DIR=`$DIRNAME $ 0 `
CVUZIP_FILE=$EXEC_DIR/cvupack.zip
JREZIP_FILE=$EXEC_DIR/jrepack.zip
# Setup CV_HOME environment variable  for  cluvfy 
# This variable points to the home  for  cluster verification software.
# If  not  set by the caller of  this  script, it points (by default) 
# to temporary directory
if  "X$CV_HOME"  "X"  ]
then
   CV_HOME=$TMPDIR/$$
else
   CV_HOME=$CV_HOME/$$
fi
$RM -rf $CV_HOME
$MKDIR -p $CV_HOME
export CV_HOME
# Setup CV_JDKHOME environment variable  for  cluvfy 
# This variable points to the java  package  required by cluster verification
# framework 
# If  this  varible isn't set by the caller of  this  script, the jrepack.zip
# archive is unpacked  in  $CV_HOME/jre directory  and  this  directory is set  in
# CV_JDKHOME
if  "X$CV_JDKHOME"  "X"  ]
then
   if  [ ! -f $JREZIP_FILE ];  then
     $ECHO  "\"$JREZIP_FILE\" does not exist." 
     $ECHO  "ERROR. Either CV_JDKHOME environment variable should be set"
     $ECHO  "       or $JREZIP_FILE should exist."
     exit  1
   else
     $UNZIP -o $JREZIP_FILE -d $CV_HOME/jre >/dev/ null  2 >& 1
     EXEC_STATUS=$?
     if  [ $EXEC_STATUS !=  "0"  ];  then
        $ECHO The unzip of archive file $JREZIP_FILE failed
        exit  1
     fi
     CV_JDKHOME=$CV_HOME/jre
     export CV_JDKHOME
   fi
fi
# Setup CV_DESTLOC environment variable  for  cluvfy 
# This variable points to a directory  on  each (remote  as  well  as  local) node
# that is writable. The cluster verifcation tool will copy the required 
# software bits ( on  need basis) to  this  directory.
# If  not  set by the caller of  this  script, it points (by default) 
# to temporary directory
if  "X$CV_DESTLOC"  "X"  ]
then
   CV_DESTLOC=$TMPDIR
fi
export CV_DESTLOC
# Unpack the cluster verification software archive  on  its home
$UNZIP -o $CVUZIP_FILE -d $CV_HOME >/dev/ null  2 >& 1
EXEC_STATUS=$?
if  [ $EXEC_STATUS !=  "0"  ];  then
    $ECHO The unzip of archive file $CVUZIP_FILE failed
    exit  1
fi
# Execute the requested cluster verification command
${CV_HOME}/bin/cluvfy  "$@"
EXEC_STATUS=$?
# Cleanup the home  for  cluster verification software
$RM -rf $CV_HOME
# Return the status of executed cluster verification command 
exit $EXEC_STATUS

从以上内容:

1
2
3
AIX)   
        DIRNAME=/bin/dirname
        UNZIP=/usr/bin/unzip

可以看到,在执行脚本时需要执行“unzip”,执行路径为“/usr/bin/unzip"


查看本机unzip可执行文件位置:

[root@aix230:/u01/soft/Disk1/cluvfy]#which unzip

/u01/crs_1/bin/unzip

竟然不在"/usr/bin"下


拷贝unzip到"/usr/bin"下

1
2
3
4
[root@aix230:/u01/soft/Disk1/cluvfy]#cp /u01/crs_1/bin/unzip /usr/bin
 
[root@aix230:/u01/soft/Disk1/cluvfy]#which unzip
/usr/bin/unzip

然后执行:

[root@aix230:/u01/soft/Disk1/cluvfy]#/u01/soft/Disk1/cluvfy/runcluvfy.sh -h

1
2
3
4
5
6
USAGE:
cluvfy [ -help ]
cluvfy stage { -list | -help }
cluvfy stage {-pre|-post} <stage-name> <stage-specific options>  [-verbose]
cluvfy comp  { -list | -help }
cluvfy comp  <component-name> <component-specific options>  [-verbose]

@至此,问题得以解决!!!










本文转自 客居天涯 51CTO博客,原文链接:http://blog.51cto.com/tiany/1565249,如需转载请自行联系原作者

相关文章:

  • SSRS 2012 Report Items -- 表格类对象
  • oracle 查找OS进程id
  • linux--armv4l的安装
  • dwz(jui)刷新当前dialog的方法
  • Stucts应用引起的OutOfMemoryError
  • 跟我一起写 Makefile(一)
  • Linux使用笔记: 定制core dump文件的文件名
  • LVM 磁盘分区扩容
  • Nand flash uboot 命令详解【转】
  • golomb哥伦布编码——本质上就是通过0来区分商和余数
  • 百度云管家 v 5.5.0 破解安装版
  • linux常用命令与基本管理
  • #define
  • 无法加入域
  • 编译安装NTP时间服务报错
  • 【Under-the-hood-ReactJS-Part0】React源码解读
  • conda常用的命令
  • co模块的前端实现
  • crontab执行失败的多种原因
  • Docker 笔记(1):介绍、镜像、容器及其基本操作
  • npx命令介绍
  • Selenium实战教程系列(二)---元素定位
  • 海量大数据大屏分析展示一步到位:DataWorks数据服务+MaxCompute Lightning对接DataV最佳实践...
  • ------- 计算机网络基础
  • 记一次删除Git记录中的大文件的过程
  • 聊聊spring cloud的LoadBalancerAutoConfiguration
  • 使用 Xcode 的 Target 区分开发和生产环境
  • 微信小程序开发问题汇总
  • 数据库巡检项
  • ​io --- 处理流的核心工具​
  • ​力扣解法汇总1802. 有界数组中指定下标处的最大值
  • # 计算机视觉入门
  • #QT(TCP网络编程-服务端)
  • #考研#计算机文化知识1(局域网及网络互联)
  • #我与Java虚拟机的故事#连载06:收获颇多的经典之作
  • (react踩过的坑)antd 如何同时获取一个select 的value和 label值
  • (二)Linux——Linux常用指令
  • (二)linux使用docker容器运行mysql
  • (三十五)大数据实战——Superset可视化平台搭建
  • (转)AS3正则:元子符,元序列,标志,数量表达符
  • (转)C#开发微信门户及应用(1)--开始使用微信接口
  • (转)jQuery 基础
  • (转)Spring4.2.5+Hibernate4.3.11+Struts1.3.8集成方案一
  • (转)清华学霸演讲稿:永远不要说你已经尽力了
  • .form文件_SSM框架文件上传篇
  • .helper勒索病毒的最新威胁:如何恢复您的数据?
  • .NET LINQ 通常分 Syntax Query 和Syntax Method
  • .NET Micro Framework初体验(二)
  • .net MVC中使用angularJs刷新页面数据列表
  • .net 程序发生了一个不可捕获的异常
  • .net 获取url的方法
  • .NET/C# 解压 Zip 文件时出现异常:System.IO.InvalidDataException: 找不到中央目录结尾记录。
  • .NETCORE 开发登录接口MFA谷歌多因子身份验证
  • @EventListener注解使用说明
  • @RequestParam,@RequestBody和@PathVariable 区别