$CRS_HOME/cdata下大量数字命名的文件,占用空间大

本文描述了Oracle集群中OCR自动备份文件不断累积导致文件系统空间耗尽的问题。由于权限设置错误,Cluster Ready Services (CRS) 无法正常覆盖旧备份文件。文章提供了问题的根本原因、受影响版本以及解决此问题的方法,包括手动更改文件所有权和权限。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

问题现象:
    <CRS_HOME>/cdata目录下存在大量数字命名的文件,导致文件系统爆满

$ls -alrth /opt/oracle/product/CRS/cdata/crs
-rw-r--r-- 1 root root 3.9M Oct 19 00:51 25974360
-rw-r--r-- 1 root root 3.9M Oct 19 04:51 39631111
-rw-r--r-- 1 root root 3.9M Oct 19 08:51 20660854
-rw-r--r-- 1 root root 3.9M Oct 19 12:51 35589462
-rw-r--r-- 1 root root 3.9M Oct 19 16:51 12309480
$ls  /opt/oracle/product/CRS/cdata/crs |egrep '^[0-9]+'   |wc -l
9692
Automatic OCR Backup Filling Up <CRS_HOME>/cdata/<clustername> Directory (Doc ID 1191067.1)
ls -l $GRID_HOME/cdata/$CLUSTERNAME
-rwxr-xr-x 1 grid oinstall 6791168 Jul 16 22:45 week.ocr
-rwxr-xr-x 1 grid oinstall 6791168 Jul 16 22:45 day.ocr
-rwxr-xr-x 1 grid oinstall 6791168 Jul 16 22:45 backup02.ocr
-rwxr-xr-x 1 grid oinstall 6791168 Jul 17 02:45 backup01.ocr
-rwxr-xr-x 1 grid oinstall 6791168 Jul 17 02:45 day_.ocr
-rw------- 1 root root     7114752 Jul 17 11:43 backup00.ocr
-rw------- 1 root root     7114752 Jul 17 15:43 35568671.ocr
-rw------- 1 root root     7114752 Jul 17 19:43 38296812.ocr..
-rw------- 1 root root     7143424 Aug 30 05:40 37208845.ocr
-rw------- 1 root root     7143424 Aug 30 09:40 38455890.ocr
Due to bug 9446443, automatic OCR backups are incorrectly owned which is preventing CRSD from overwriting them.

Applies to:Oracle Database - Enterprise Edition - Version 10.2.0.1 and later
Information in this document applies to any platform.Symptoms

Automatic OCR backup rotation is not working with 11gR2 Grid Infrastructure, instead of overwriting existing backup file, CRSD keeps creating new backup files which taking more and more space:

ls -l $GRID_HOME/cdata/$CLUSTERNAME
-rwxr-xr-x 1 grid oinstall 6791168 Jul 16 22:45 week.ocr
-rwxr-xr-x 1 grid oinstall 6791168 Jul 16 22:45 day.ocr
-rwxr-xr-x 1 grid oinstall 6791168 Jul 16 22:45 backup02.ocr
-rwxr-xr-x 1 grid oinstall 6791168 Jul 17 02:45 backup01.ocr
-rwxr-xr-x 1 grid oinstall 6791168 Jul 17 02:45 day_.ocr
-rw------- 1 root root     7114752 Jul 17 11:43 backup00.ocr
-rw------- 1 root root     7114752 Jul 17 15:43 35568671.ocr
-rw------- 1 root root     7114752 Jul 17 19:43 38296812.ocr
..
-rw------- 1 root root     7143424 Aug 30 05:40 37208845.ocr
-rw------- 1 root root     7143424 Aug 30 09:40 38455890.ocrCause
Due to bug 9446443, automatic OCR backups are incorrectly owned which is preventing CRSD from overwriting them.
Expected ownership and permission on Linux - all 7 of them:
-rw------- 1 root root 11640832 Aug 30 08:46 backup00.ocr
-rw------- 1 root root 11640832 Aug 30 04:46 backup01.ocr
-rw------- 1 root root 11640832 Aug 30 00:46 backup02.ocr
-rw------- 1 root root 11640832 Aug 30 00:46 day_.ocr
-rw------- 1 root root 11640832 Aug 29 00:46 day.ocr
-rw------- 1 root root 11640832 Aug 26 00:45 week_.ocr
-rw------- 1 root root 11640832 Aug 19 00:44 week.ocrSolution
bug 9446443 is fixed in 11.2.0.2, 12.1.

It's recommended to apply patch to fix the issue, but if patch is unavailable, workaround is to change ownership and permission of all 7 automatic backup files manually. OCR should be owned by root, but depend on platform, group may or may not be root - you can check any randomly named backup file to identify what ownership and permission it should have; in example below:

-rw------- 1 root root     7143424 Aug 30 09:40 38455890.ocr

With this, please change all 7 automatic backup files to be owned  by root:root with permission "-rw-------"References
NOTE:1083982.1 - Incorrect Ownership and Permission after Relinking or Patching 11gR2 Grid Infrastructure
BUG:9446443 - ROOTCRS.PL RESETS THE PERMISSIONS ON /CDATA/
BUG:7313884 - NEWLY GENERATED OCR BACKUP IN CDATA DIRECTORY CAN'T BE RENAMED
BUG:5893629 - CRSD CRASHES AFTER BEING UNABLE TO DELETE BACKUP OCR FILE
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值