环境:RHEL 6.5 + Oracle 11.2.0.4 RAC
现象:巡检发现自己的测试环境节点2的空间使用率过高,进一步查询,发现大文件是GI目录下crfclust.bdb文件。
crfclust.bdb文件大小达到6G+,如下:
[root@jyrac2 jyrac2]# pwd
/opt/app/11.2.0/grid/crf/db/jyrac2
[root@jyrac2 jyrac2]# ls -lh
total 6.7G
-rw-r--r-- 1 root root 190K Aug 1 10:16 01-AUG-2017-10:16:36.txt
-rw-r--r-- 1 root root 158K Aug 4 23:32 04-AUG-2017-23:32:24.txt
-rw-r--r-- 1 root root 120K Aug 5 11:56 05-AUG-2017-11:56:39.txt
-rw-r--r-- 1 root root 1.9M Jun 17 14:26 17-JUN-2017-02:26:21.txt
-rw-r--r-- 1 root root 1.8M Jun 17 14:27 17-JUN-2017-02:27:19.txt
-rw-r--r-- 1 root root 2.1M Jun 17 15:11 17-JUN-2017-03:11:59.txt
-rw-r--r-- 1 root root 1.9M Jul 18 10:16 18-JUL-2017-10:16:08.txt
-rw-r--r-- 1 root root 1.7M Jul 18 10:17 18-JUL-2017-10:17:58.txt
-rw-r--r-- 1 root root 2.1M Jul 18 13:04 18-JUL-2017-13:04:32.txt
-rw-r--r-- 1 root root 1.1M Jul 18 13:28 18-JUL-2017-13:28:11.txt
-rw-r--r-- 1 root root 2.1M Jul 18 16:14 18-JUL-2017-16:14:55.txt
-rw-r--r-- 1 root root 1.9M Jul 18 16:16 18-JUL-2017-16:16:25.txt
-rw-r--r-- 1 root root 716K Jun 19 07:47 18-JUN-2017-19:47:50.txt
-rw-r--r-- 1 root root 752K Jun 19 11:06 19-JUN-2017-11:06:22.txt
-rw-r--r-- 1 root root 2.1M Jun 19 11:11 19-JUN-2017-11:11:05.txt
-rw-r--r-- 1 root root 2.0M Jun 19 11:12 19-JUN-2017-11:12:01.txt
-rw-r--r-- 1 root root 2.1M Aug 24 07:55 24-AUG-2017-07:55:38.txt
-rw-r--r-- 1 root root 1.8M Aug 25 08:29 25-AUG-2017-08:29:13.txt
-rw-r--r-- 1 root root 1.5M Aug 25 08:31 25-AUG-2017-08:31:12.txt
-rw-r--r-- 1 root root 2.1M Aug 25 09:13 25-AUG-2017-09:13:36.txt
-rw-r--r-- 1 root root 1.6M Aug 25 09:15 25-AUG-2017-09:15:58.txt
-rw-r--r-- 1 root root 2.2M Aug 25 09:54 25-AUG-2017-09:54:16.txt
-rw-r--r-- 1 root root 1.8M Aug 25 09:55 25-AUG-2017-09:55:59.txt
-rw-r--r-- 1 root root 1.9M Jun 28 04:47 28-JUN-2017-04:47:06.txt
-rw-r--r-- 1 root root 1.1M Jun 28 04:55 28-JUN-2017-04:55:17.txt
-rw-r--r-- 1 root root 1.8M Jul 31 14:38 31-JUL-2017-14:38:01.txt
-rw-r--r-- 1 root root 67K Jul 31 15:04 31-JUL-2017-15:04:37.txt
-rw-r--r-- 1 root root 194K Jul 31 16:06 31-JUL-2017-16:06:24.txt
-rw-r--r-- 1 root root 2.1M Jul 31 22:11 31-JUL-2017-22:11:29.txt
-rw-r----- 1 root root 117M Sep 7 22:37 crfalert.bdb
-rw-r----- 1 root root 6.0G Sep 7 22:37 crfclust.bdb
-rw-r----- 1 root root 8.0K Aug 25 09:56 crfconn.bdb
-rw-r----- 1 root root 143M Sep 7 22:37 crfcpu.bdb
-rw-r----- 1 root root 116M Sep 7 22:37 crfhosts.bdb
-rw-r----- 1 root root 141M Sep 7 22:37 crfloclts.bdb
-rw-r----- 1 root root 97M Sep 7 22:37 crfts.bdb
-rw-r----- 1 root root 24K Sep 4 12:16 __db.001
-rw-r----- 1 root root 392K Sep 7 22:37 __db.002
-rw-r----- 1 root root 2.6M Sep 7 22:37 __db.003
-rw-r----- 1 root root 2.1M Sep 7 22:37 __db.004
-rw-r----- 1 root root 1.2M Sep 7 22:37 __db.005
-rw-r----- 1 root root 56K Sep 7 22:37 __db.006
-rw-r--r-- 1 root root 115M Sep 2 01:10 jyrac2.ldb
-rw-r----- 1 root root 16M Sep 7 22:20 log.0000000953
-rw-r----- 1 root root 16M Sep 7 22:37 log.0000000954
-rw-r----- 1 root root 8.0K Sep 7 22:37 repdhosts.bdb
[root@jyrac2 jyrac2]#
网上搜索crfclust.bdb这个文件,发现这类现象遇到的人还挺多,是bug导致让原本正常1G左右大小的文件变的很大,甚至有的都超过了20G。
手工清理此文件的方法:
先停止crf资源,然后rm 删除此文件,最后再启动crf资源即可:
1.停止crf资源
crsctl stop res ora.crf -init
[grid@jyrac2 bin]$ crsctl stat res -t -init
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.asm
1 ONLINE ONLINE jyrac2 Started
ora.cluster_interconnect.haip
1 ONLINE ONLINE jyrac2
ora.crf
1 ONLINE ONLINE jyrac2
ora.crsd
1 ONLINE ONLINE jyrac2
ora.cssd
1 ONLINE ONLINE jyrac2
ora.cssdmonitor
1 ONLINE ONLINE jyrac2
ora.ctssd
1 ONLINE ONLINE jyrac2 ACTIVE:0
ora.diskmon
1 OFFLINE OFFLINE
ora.drivers.acfs
1 ONLINE ONLINE jyrac2
ora.evmd
1 ONLINE ONLINE jyrac2
ora.gipcd
1 ONLINE ONLINE jyrac2
ora.gpnpd
1 ONLINE ONLINE jyrac2
ora.mdnsd
1 ONLINE ONLINE jyrac2
[grid@jyrac2 bin]$ crsctl stop res ora.crf -init
CRS-2673: Attempting to stop 'ora.crf' on 'jyrac2'
CRS-2677: Stop of 'ora.crf' on 'jyrac2' succeeded
[grid@jyrac2 bin]$ crsctl stat res -t -init
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.asm
1 ONLINE ONLINE jyrac2 Started
ora.cluster_interconnect.haip
1 ONLINE ONLINE jyrac2
ora.crf
1 OFFLINE OFFLINE
ora.crsd
1 ONLINE ONLINE jyrac2
ora.cssd
1 ONLINE ONLINE jyrac2
ora.cssdmonitor
1 ONLINE ONLINE jyrac2
ora.ctssd
1 ONLINE ONLINE jyrac2 ACTIVE:0
ora.diskmon
1 OFFLINE OFFLINE
ora.drivers.acfs
1 ONLINE ONLINE jyrac2
ora.evmd
1 ONLINE ONLINE jyrac2
ora.gipcd
1 ONLINE ONLINE jyrac2
ora.gpnpd
1 ONLINE ONLINE jyrac2
ora.mdnsd
1 ONLINE ONLINE jyrac2
2.删除crfclust.bdb文件
[root@jyrac2 jyrac2]# ls -l /opt/app/11.2.0/grid/crf/db/jyrac2/crfclust.bdb
[root@jyrac2 jyrac2]# rm -rf /opt/app/11.2.0/grid/crf/db/jyrac2/crfclust.bdb
[root@jyrac2 jyrac2]# ls -l /opt/app/11.2.0/grid/crf/db/jyrac2/crfclust.bdb
3.启动crf资源
crsctl start res ora.crf -init
[grid@jyrac2 ~]$ crsctl start res ora.crf -init
CRS-2672: Attempting to start 'ora.crf' on 'jyrac2'
CRS-2676: Start of 'ora.crf' on 'jyrac2' succeeded
[grid@jyrac2 ~]$ crsctl stat res -t -init
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.asm
1 ONLINE ONLINE jyrac2 Started
ora.cluster_interconnect.haip
1 ONLINE ONLINE jyrac2
ora.crf
1 ONLINE ONLINE jyrac2
ora.crsd
1 ONLINE ONLINE jyrac2
ora.cssd
1 ONLINE ONLINE jyrac2
ora.cssdmonitor
1 ONLINE ONLINE jyrac2
ora.ctssd
1 ONLINE ONLINE jyrac2 ACTIVE:0
ora.diskmon
1 OFFLINE OFFLINE
ora.drivers.acfs
1 ONLINE ONLINE jyrac2
ora.evmd
1 ONLINE ONLINE jyrac2
ora.gipcd
1 ONLINE ONLINE jyrac2
ora.gpnpd
1 ONLINE ONLINE jyrac2
ora.mdnsd
1 ONLINE ONLINE jyrac2
本文完。