清理.patch_storage目录
发表于:2024-10-22 作者:千家信息网编辑
千家信息网最后更新 2024年10月22日,某天突然接到告警说oracle目录使用率高,经过检查发现.patch_storage占了大约40G的空间。.patch_storage的作用?每次在打补丁的时候,会对库文件和模块做一些改变;变动之前,
千家信息网最后更新 2024年10月22日清理.patch_storage目录某天突然接到告警说oracle目录使用率高,经过检查发现.patch_storage占了大约40G的空间。
.patch_storage的作用?
每次在打补丁的时候,会对库文件和模块做一些改变;变动之前,opatch会在$ORACLE_HOME/.patch_storage/ 目录中创建一个snapshot。有时候会出现需要回滚补丁的时候,这个目录下面会有一个restore.sh脚本,这个脚本可以remove之前做过的changes。
目录结构:
drwxr-xr-x 4 oracle oinstall 256 Nov 08 2016 17592127_Jan_8_2014_23_02_20
drwxr-xr-x 4 oracle oinstall 256 Nov 08 2016 13343438_Dec_28_2011_01_17_39
drwxr-xr-x 4 oracle oinstall 256 Nov 08 2016 13923374_Jun_14_2012_23_16_11
drwxr-xr-x 4 oracle oinstall 256 Nov 08 2016 13696216_Apr_8_2012_21_52_22
drwxr-xr-x 4 oracle oinstall 256 Nov 08 2016 14727310_Dec_31_2012_01_47_37
drwxr-xr-x 4 oracle oinstall 256 Nov 08 2016 14275605_Oct_3_2012_23_27_54
drwxr-xr-x 4 oracle oinstall 256 Nov 08 2016 16056266_Mar_13_2013_05_49_56
其中一个目录内的文件:
oracle/app/oracle/product/11.2.0/db_1/.patch_storage/17586955_Jun_16_2015_10_26_31$ ls -lrt
total 8
drwxr-xr-x 4 oracle oinstall 256 Jan 10 23:30 original_patch
drwxr-xr-x 3 oracle oinstall 256 Jan 10 23:30 files
-rwx--x--- 1 oracle oinstall 1533 Jan 10 23:30 rollback.sh
这也就是说,打补丁的时候是需要一定的磁盘空间的。不然这个copy的过程不能完成。理论上,一次补丁的最大所需空间为1.8G,但是实际上是会小于这个数值的,一般oracle目录也不会就剩下这么点空间,所以不用太过于关注。
下面是清理过程:
一节点:
[grid@byo87631:/oracle/app/product/grid]du -sg .patch_storage
37.73 .patch_storage
[grid@byo87631:/oracle/app/product/grid]opatch util cleanup
Invoking OPatch 11.2.0.1.6
Oracle Interim Patch Installer version 11.2.0.1.6
Copyright (c) 2011, Oracle Corporation. All rights reserved.
UTIL session
Oracle Home : /oracle/app/product/grid
Central Inventory : /oracle/app/oraInventory
from : /etc/oraInst.loc
OPatch version : 11.2.0.1.6
OUI version : 11.2.0.2.0
Log file location : /oracle/app/product/grid/cfgtoollogs/opatch/opatch3018-02-02_19-39-49PM.log
Invoking utility "cleanup"
OPatch will clean up 'restore.sh,make.txt' files and 'rac,scratch,backup' directories.
You will be still able to rollback patches after this cleanup.
Do you want to proceed? [y|n]
y
User Responded with: Y
Size of directory "/oracle/app/product/grid/.patch_storage" before cleanup is 40496924381 bytes.
Size of directory "/oracle/app/product/grid/.patch_storage" after cleanup is 23138284034 bytes.
UtilSession: Backup area for restore has been cleaned up. For a complete list of files/directories
deleted, Please refer log file.
OPatch succeeded.
二节点:
[grid@byo87632:/oracle/app/product/grid]du -sg .patch_storage
37.73 .patch_storage
[grid@byo87632:/oracle/app/product/grid]opatch util cleanup
Invoking OPatch 11.2.0.1.6
Oracle Interim Patch Installer version 11.2.0.1.6
Copyright (c) 2011, Oracle Corporation. All rights reserved.
UTIL session
Oracle Home : /oracle/app/product/grid
Central Inventory : /oracle/app/oraInventory
from : /etc/oraInst.loc
OPatch version : 11.2.0.1.6
OUI version : 11.2.0.2.0
Log file location : /oracle/app/product/grid/cfgtoollogs/opatch/opatch3018-02-02_19-54-42PM.log
Invoking utility "cleanup"
OPatch will clean up 'restore.sh,make.txt' files and 'rac,scratch,backup' directories.
You will be still able to rollback patches after this cleanup.
Do you want to proceed? [y|n]
y
User Responded with: Y
Size of directory "/oracle/app/product/grid/.patch_storage" before cleanup is 40496924381 bytes.
Size of directory "/oracle/app/product/grid/.patch_storage" after cleanup is 23138284034 bytes.
UtilSession: Backup area for restore has been cleaned up. For a complete list of files/directories
deleted, Please refer log file.
OPatch succeeded.
[grid@byo87632:/oracle/app/product/grid]du -sg .patch_storage
21.56 .patch_storage
从40多G清理到20多G。
.patch_storage的作用?
每次在打补丁的时候,会对库文件和模块做一些改变;变动之前,opatch会在$ORACLE_HOME/.patch_storage/
目录结构:
drwxr-xr-x 4 oracle oinstall 256 Nov 08 2016 17592127_Jan_8_2014_23_02_20
drwxr-xr-x 4 oracle oinstall 256 Nov 08 2016 13343438_Dec_28_2011_01_17_39
drwxr-xr-x 4 oracle oinstall 256 Nov 08 2016 13923374_Jun_14_2012_23_16_11
drwxr-xr-x 4 oracle oinstall 256 Nov 08 2016 13696216_Apr_8_2012_21_52_22
drwxr-xr-x 4 oracle oinstall 256 Nov 08 2016 14727310_Dec_31_2012_01_47_37
drwxr-xr-x 4 oracle oinstall 256 Nov 08 2016 14275605_Oct_3_2012_23_27_54
drwxr-xr-x 4 oracle oinstall 256 Nov 08 2016 16056266_Mar_13_2013_05_49_56
其中一个目录内的文件:
oracle/app/oracle/product/11.2.0/db_1/.patch_storage/17586955_Jun_16_2015_10_26_31$ ls -lrt
total 8
drwxr-xr-x 4 oracle oinstall 256 Jan 10 23:30 original_patch
drwxr-xr-x 3 oracle oinstall 256 Jan 10 23:30 files
-rwx--x--- 1 oracle oinstall 1533 Jan 10 23:30 rollback.sh
这也就是说,打补丁的时候是需要一定的磁盘空间的。不然这个copy的过程不能完成。理论上,一次补丁的最大所需空间为1.8G,但是实际上是会小于这个数值的,一般oracle目录也不会就剩下这么点空间,所以不用太过于关注。
下面是清理过程:
一节点:
[grid@byo87631:/oracle/app/product/grid]du -sg .patch_storage
37.73 .patch_storage
[grid@byo87631:/oracle/app/product/grid]opatch util cleanup
Invoking OPatch 11.2.0.1.6
Oracle Interim Patch Installer version 11.2.0.1.6
Copyright (c) 2011, Oracle Corporation. All rights reserved.
UTIL session
Oracle Home : /oracle/app/product/grid
Central Inventory : /oracle/app/oraInventory
from : /etc/oraInst.loc
OPatch version : 11.2.0.1.6
OUI version : 11.2.0.2.0
Log file location : /oracle/app/product/grid/cfgtoollogs/opatch/opatch3018-02-02_19-39-49PM.log
Invoking utility "cleanup"
OPatch will clean up 'restore.sh,make.txt' files and 'rac,scratch,backup' directories.
You will be still able to rollback patches after this cleanup.
Do you want to proceed? [y|n]
y
User Responded with: Y
Size of directory "/oracle/app/product/grid/.patch_storage" before cleanup is 40496924381 bytes.
Size of directory "/oracle/app/product/grid/.patch_storage" after cleanup is 23138284034 bytes.
UtilSession: Backup area for restore has been cleaned up. For a complete list of files/directories
deleted, Please refer log file.
OPatch succeeded.
二节点:
[grid@byo87632:/oracle/app/product/grid]du -sg .patch_storage
37.73 .patch_storage
[grid@byo87632:/oracle/app/product/grid]opatch util cleanup
Invoking OPatch 11.2.0.1.6
Oracle Interim Patch Installer version 11.2.0.1.6
Copyright (c) 2011, Oracle Corporation. All rights reserved.
UTIL session
Oracle Home : /oracle/app/product/grid
Central Inventory : /oracle/app/oraInventory
from : /etc/oraInst.loc
OPatch version : 11.2.0.1.6
OUI version : 11.2.0.2.0
Log file location : /oracle/app/product/grid/cfgtoollogs/opatch/opatch3018-02-02_19-54-42PM.log
Invoking utility "cleanup"
OPatch will clean up 'restore.sh,make.txt' files and 'rac,scratch,backup' directories.
You will be still able to rollback patches after this cleanup.
Do you want to proceed? [y|n]
y
User Responded with: Y
Size of directory "/oracle/app/product/grid/.patch_storage" before cleanup is 40496924381 bytes.
Size of directory "/oracle/app/product/grid/.patch_storage" after cleanup is 23138284034 bytes.
UtilSession: Backup area for restore has been cleaned up. For a complete list of files/directories
deleted, Please refer log file.
OPatch succeeded.
[grid@byo87632:/oracle/app/product/grid]du -sg .patch_storage
21.56 .patch_storage
从40多G清理到20多G。
目录
空间
补丁
时候
脚本
节点
过程
最大
不用
也就是
也就是说
作用
使用率
实际
实际上
库文件
数值
文件
有时候
模块
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
惠州软件开发怎么样
贵州系统软件开发
快有家网络技术有限公司
矿机服务器
东莞软件开发驻场哪家可靠
网络技术职业对接
自学编程需要什么软件开发
维护网络安全有哪些意义
黄冈网络安全分析
南京航空航天大学网络安全专业
数据库日志文件清空
wincp服务器收费吗
存储高通量测序原始数据的数据库
网络安全有哪些大赛
防城港纠仿网络技术有
日本软件开发公司要求
徐汇区自动软件开发产品介绍
西平天气预报软件开发
软件开发费 审计
红心游戏软件开发者是谁
国家网络安全先进集体材料
显示账户余额(读数据库)
战地1多人模式显示服务器已断线
幻想神域服务器
三分钟停掉数据库
网络安全文字50字
北京亲家网络技术怎么样
信息对抗与网络安全读书笔记
怎样数据库脚本覆盖
想做一个安卓软件开发