Chinaunix首页 | 论坛 | 博客
  • 博客访问: 120677
  • 博文数量: 43
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 400
  • 用 户 组: 普通用户
  • 注册时间: 2016-10-14 10:31
文章分类

分类: 信息化

2017-01-10 10:29:25

删除11.2.0.4 rac中 ora.crf的两类文件 和  禁止ora.crf随ohas启动而启动

背景:
ora.crf服务是为Cluster Health Monitor(以下简称CHM)提供服务的,用来自动收集的资源(CPU、内存、SWAP、进程、I/O以及网络等)的使用情况。由于bug 10165314,ora.crf服务生成的文件($GI_HOME/crf/db/$HOMENAME/目录中所有的crf*.bdb和$HOSTNAME.ldb)会很大,这样就对$GI_HOME的使用率造成了压力。

下面来说明删除删除这两类文件($GI_HOME/crf/db/$HOMENAME/目录中所有的crf*.bdb和$HOSTNAME.ldb)的步骤 和 禁止ora.crf随ohas启动而启动的步骤。

一、删除crf*.bdb和$HOSTNAME.ldb的步骤

点击(此处)折叠或打开

  1. [root@leihost1 leihost1]# /u01/11.2.0/grid/bin/crsctl stop res ora.crf -init
  2.     CRS-2673: Attempting to stop 'ora.crf' on 'leihost1'
  3.     CRS-2677: Stop of 'ora.crf' on 'leihost1' succeeded
  4.     [root@leihost1 leihost1]#
  5.     [root@leihost1 leihost1]# cd /u01/11.2.0/grid/crf/db/leihost1
  6.     [root@leihost1 leihost1]# ls -lrt
  7.     total 195748
  8.     -rw-r--r-- 1 root root 120000000 Oct 24 20:20 leihost1.ldb
  9.     -rw-r--r-- 1 root root 1063396 Oct 24 20:27 24-OCT-2015-20:27:46.txt
  10.     -rw-r----- 1 root root 8192 Oct 24 20:28 crfconn.bdb
  11.     -rw-r----- 1 root root 16777216 Oct 25 11:06 log.0000000018
  12.     -rw-r----- 1 root root 24576 Oct 25 11:37 __db.001
  13.     -rw-r----- 1 root root 8192 Oct 25 11:38 repdhosts.bdb
  14.     -rw-r----- 1 root root 16777216 Oct 25 11:38 log.0000000019
  15.     -rw-r----- 1 root root 2301952 Oct 25 11:38 crfts.bdb
  16.     -rw-r----- 1 root root 3522560 Oct 25 11:38 crfloclts.bdb
  17.     -rw-r----- 1 root root 2621440 Oct 25 11:38 crfhosts.bdb
  18.     -rw-r----- 1 root root 3686400 Oct 25 11:38 crfcpu.bdb
  19.     -rw-r----- 1 root root 143720448 Oct 25 11:38 crfclust.bdb
  20.     -rw-r----- 1 root root 3244032 Oct 25 11:38 crfalert.bdb
  21.     -rw-r----- 1 root root 57344 Oct 25 11:38 __db.006
  22.     -rw-r----- 1 root root 401408 Oct 25 11:38 __db.002
  23.     -rw-r----- 1 root root 1187840 Oct 25 11:38 __db.005
  24.     -rw-r----- 1 root root 2162688 Oct 25 11:38 __db.004
  25.     -rw-r----- 1 root root 2629632 Oct 25 11:38 __db.003
  26.     [root@leihost1 leihost1]# rm *.bdb
  27.     rm: remove regular file `crfalert.bdb'? y
  28.     rm: remove regular file `crfclust.bdb'? y
  29.     rm: remove regular file `crfconn.bdb'? y
  30.     rm: remove regular file `crfcpu.bdb'? y
  31.     rm: remove regular file `crfhosts.bdb'? y
  32.     rm: remove regular file `crfloclts.bdb'? y
  33.     rm: remove regular file `crfts.bdb'? y
  34.     rm: remove regular file `repdhosts.bdb'? y
  35.     [root@leihost1 leihost1]# du -sh
  36.     40M .
  37.     [root@leihost1 leihost1]# ls -lrt
  38.     total 40200
  39.     -rw-r--r-- 1 root root 120000000 Oct 24 20:20 leihost1.ldb
  40.     -rw-r--r-- 1 root root 1063396 Oct 24 20:27 24-OCT-2015-20:27:46.txt
  41.     -rw-r----- 1 root root 16777216 Oct 25 11:06 log.0000000018
  42.     -rw-r----- 1 root root 24576 Oct 25 11:37 __db.001
  43.     -rw-r----- 1 root root 16777216 Oct 25 11:38 log.0000000019
  44.     -rw-r----- 1 root root 57344 Oct 25 11:38 __db.006
  45.     -rw-r----- 1 root root 401408 Oct 25 11:38 __db.002
  46.     -rw-r----- 1 root root 1187840 Oct 25 11:38 __db.005
  47.     -rw-r----- 1 root root 2162688 Oct 25 11:38 __db.004
  48.     -rw-r----- 1 root root 2629632 Oct 25 11:38 __db.003
  49.     [root@leihost1 leihost1]# mv leihost1.ldb back_leihost1.ldb
  50.     [root@leihost1 leihost1]# ls -lrt
  51.     total 40200
  52.     -rw-r--r-- 1 root root 120000000 Oct 24 20:20 back_leihost1.ldb
  53.     -rw-r--r-- 1 root root 1063396 Oct 24 20:27 24-OCT-2015-20:27:46.txt
  54.     -rw-r----- 1 root root 16777216 Oct 25 11:06 log.0000000018
  55.     -rw-r----- 1 root root 24576 Oct 25 11:37 __db.001
  56.     -rw-r----- 1 root root 16777216 Oct 25 11:38 log.0000000019
  57.     -rw-r----- 1 root root 57344 Oct 25 11:38 __db.006
  58.     -rw-r----- 1 root root 401408 Oct 25 11:38 __db.002
  59.     -rw-r----- 1 root root 1187840 Oct 25 11:38 __db.005
  60.     -rw-r----- 1 root root 2162688 Oct 25 11:38 __db.004
  61.     -rw-r----- 1 root root 2629632 Oct 25 11:38 __db.003
  62.     [root@leihost1 leihost1]# /u01/11.2.0/grid/bin/crsctl status res ora.crf -init
  63.     NAME=ora.crf
  64.     TYPE=ora.crf.type
  65.     TARGET=OFFLINE
  66.     STATE=OFFLINE
  67.     [root@leihost1 leihost1]#

如上摘自:

ODA Nodes Lacking Space Due to Large Cluster Health Monitor FileCrfclust.Bdb (文档 ID 1616910.1)

 

如上步骤可以在clusterware和database 运行的时候操作,原因是:

点击(此处)折叠或打开

  1. Is stop/start ora.crf affecting clusterware function or cluster database function?
  2.       
  3.     No, stop/start ora.crf resource will stop and start Cluster Health Monitor and its data collection, it will not affect clusterware or database functionality.
如上摘自:
Cluster Health Monitor (CHM) FAQ (文档 ID 1328466.1)

点击(此处)折叠或打开

  1. 上面的步骤,请在集群的其他节点上也执行。
二、
禁止ora.crf随ohas启动而启动的步骤。
2.1

点击(此处)折叠或打开

  1. [root@leihost1 leihost1]# /u01/11.2.0/grid/bin/crsctl modify res ora.crf -attr ENABLED=0 -init
2.2查看修改后的效果:

点击(此处)折叠或打开

  1. [root@leihost1 leihost1]# /u01/11.2.0/grid/bin/crsctl status res ora.crf -init -f
  2.     NAME=ora.crf
  3.     TYPE=ora.crf.type
  4.     STATE=OFFLINE
  5.     TARGET=ONLINE
  6.     ACL=owner:root:rw-,pgrp:oinstall:rw-,other::r--,user:grid:r-x
  7.     ACTION_FAILURE_TEMPLATE=
  8.     ACTION_SCRIPT=
  9.     ACTIVE_PLACEMENT=0
  10.     AGENT_FILENAME=%CRS_HOME%/bin/orarootagent%CRS_EXE_SUFFIX%
  11.     AUTO_START=always
  12.     CARDINALITY=1
  13.     CARDINALITY_ID=0
  14.     CHECK_ARGS=
  15.     CHECK_COMMAND=
  16.     CHECK_INTERVAL=30
  17.     CLEAN_ARGS=
  18.     CLEAN_COMMAND=
  19.     CREATION_SEED=16
  20.     DAEMON_LOGGING_LEVELS=CRFMOND=0,CRFLDREP=0,CRFLOGD=0,CRFPROXY=0,OCLUMON=0,OCRAPI=0,OCRCLI=0,OCRMSG=0,CSSCLNT=0,CRFM=0
  21.     DAEMON_TRACING_LEVELS=CRFMOND=0,CRFLDREP=0,CRFLOGD=0,CRFPROXY=0,OCLUMON=0,OCRAPI=0,OCRCLI=0,OCRMSG=0,CSSCLNT=0,CRFM=0
  22.     DEFAULT_TEMPLATE=
  23.     DEGREE=1
  24.     DESCRIPTION="Resource type for Crf Agents"
  25.     DETACHED=true
  26.     ENABLED=0 --------------->此处
  27.     FAILOVER_DELAY=0
  28.     FAILURE_INTERVAL=3
  29.     FAILURE_THRESHOLD=5
  30.     HOSTING_MEMBERS=
  31.     ID=ora.crf
  32.     LOAD=1
  33.     LOGGING_LEVEL=1
  34.     NOT_RESTARTING_TEMPLATE=
  35.     OFFLINE_CHECK_INTERVAL=0
  36.     ORA_VERSION=11.2.0.4.0
  37.     PID_FILE=
  38.     PLACEMENT=balanced
  39.     PROCESS_TO_MONITOR=
  40.     PROFILE_CHANGE_TEMPLATE=
  41.     RESTART_ATTEMPTS=5
  42.     SCRIPT_TIMEOUT=60
  43.     SERVER_POOLS=
  44.     START_ARGS=
  45.     START_COMMAND=
  46.     START_DEPENDENCIES=hard(ora.gpnpd)
  47.     START_TIMEOUT=120
  48.     STATE_CHANGE_TEMPLATE=
  49.     STOP_ARGS=
  50.     STOP_COMMAND=
  51.     STOP_DEPENDENCIES=hard(shutdown:ora.gipcd)
  52.     STOP_TIMEOUT=120
  53.     UNRESPONSIVE_TIMEOUT=180
  54.     UPTIME_THRESHOLD=1m
  55.     USR_ORA_ENV=
  56.       
  57.     [root@leihost1 leihost1]#
2.3 重启crs

点击(此处)折叠或打开

  1. # $GRID_ORACLE_HOME/bin/crsctl stop crs
  2. # $GRID_ORACLE_HOME/bin/crsctl start crs
2.4 观察ora.crf的输出:

点击(此处)折叠或打开

  1. [root@leihost1 leihost1]# /u01/11.2.0/grid/bin/crsctl status res ora.crf -init
  2.     NAME=ora.crf
  3.     TYPE=ora.crf.type
  4.     TARGET=ONLINE
  5.     STATE=OFFLINE
2.5 观察$GI_HOME/crf/db/$HOMENAME/目录中所有的crf*.bdb和$HOSTNAME.ldb, 不再生成。

点击(此处)折叠或打开

  1. 上面的步骤,请在集群的其他节点上也执行。
********************************************************************************************

问题分析:

     一上班就接到用户现场电话说有一套RAC无法访问,随即登陆上去首先查看了磁盘空间,发现两个节点的/DBSoft目录已满,首先怀疑的是告警日志文件和$ORACLE_HOME/dbs 产生的归档日志文件没有删导致,经过检查后事实否认了我的判断。

     随即想到的是CHM(ClusterHealth Monitor)服务未关导致crf文件无限增长导致磁盘空间占满,随即进入crf目录检查$ORACLE_HOME/crf/db;一看果然是crf文件导致磁盘占满,crfclust.bdb文件已经达到31GB了

 

问题处理:

         既然知道了问题的原因,那么下一步就是问题的处理;该问题的处理,有两个办法:

1、  删除过大的crf文件,并且关闭ora.crf。(我们采用的是第一种方法。)

2、  删除过大的crf文件,并且应用Patch 10165314进行修复。

问题处理过程:

         我们采用的是如上第一种方法,节点一处理过程如下:

1、  查看ora.crf服务

2、  停止ora.crf服务

3、  删除$ORACLE_HOME/crf/db/$HOMENAME/目录中所有的crf*.bdb

4、  查看磁盘空间,已腾出。

节点二处理过程同上。


***********************************************************************

== check
crsctl stat res ora.crf -init -t

== stop
crsctl stop res ora.crf -init

== delete

rm *.bdb

== start
crsctl start res ora.crf -init

阅读(3018) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~