{"id":559,"date":"2009-01-15T18:05:01","date_gmt":"2009-01-15T16:05:01","guid":{"rendered":"http:\/\/www.ora-solutions.net\/web\/?p=559"},"modified":"2009-01-15T18:05:01","modified_gmt":"2009-01-15T16:05:01","slug":"huge-space-consumption-by-oracle_homepatch_storage","status":"publish","type":"post","link":"https:\/\/www.ora-solutions.net\/web\/2009\/01\/15\/huge-space-consumption-by-oracle_homepatch_storage\/","title":{"rendered":"Huge Space Consumption by $ORACLE_HOME\/.patch_storage"},"content":{"rendered":"<p>If you are keeping your system up to date with Patchsets, Patch Bundles, Merge Label Requests (MLR) or Critical Patch Updates (CPU), you will most likely suffer from a huge .patch_storage Subdirectory in your $ORACLE_HOME.<\/p>\n<p>On one of my databases it looked like this:<\/p>\n<p>Space used by $ORACLE_HOME: 7 GB<br \/>\nSpace used by $ORACLE_HOME\/.patch_storage: 4.3 GB<\/p>\n<p>Can data in this directory be removed?<\/p>\n<p>MetaLink Note 550522.1 (Subject: How To Avoid Disk Full Issues Because OPatch Backups Take Big Amount Of Disk Space.) has the answer and tells you: it depends. Normally, this data is used in order to be able to rollback a patch. However, if you have installed a patchset (eg. 10.2.0.4), then the patches for the previous patchset (10.2.0.3) which are located in the .patch_storage directory are not needed anymore and can be removed. However, I would not recommend that you delete the directories manually yourself, as this would not be supported. Instead let Oracle do it for you:<\/p>\n<p><strong>Recent versions of opatch (current is 10.2.0.4.5 as of January 2009) have a utility included, which removes patches not needed anymore from the .patch_storage directory. Moreover, the opatch utility creates these .patch_storage backup directories more intelligently which should result in less space wasted.<\/strong><\/p>\n<blockquote><p>[oracle@vmhost1 ora10]$.\/OPatch\/opatch util Cleanup<br \/>\nInvoking OPatch 10.2.0.4.5<\/p>\n<p>Oracle Interim Patch Installer version 10.2.0.4.5<br \/>\nCopyright (c) 2008, Oracle Corporation.  All rights reserved.<\/p>\n<p>UTIL session<\/p>\n<p>Oracle Home       : \/oracle\/ora10<br \/>\nCentral Inventory : \/oracle\/oraInventory<br \/>\n   from           : \/var\/opt\/oracle\/oraInst.loc<br \/>\nOPatch version    : 10.2.0.4.5<br \/>\nOUI version       : 10.2.0.4.0<br \/>\nOUI location      : \/oracle\/ora10\/oui<br \/>\nLog file location : \/oracle\/ora10\/cfgtoollogs\/opatch\/opatch2009-01-15_17-00-51PM.log<\/p>\n<p>Patch history file: \/oracle\/ora10\/cfgtoollogs\/opatch\/opatch_history.txt<\/p>\n<p>Invoking utility &#8220;cleanup&#8221;<br \/>\nOPatch will clean up &#8216;restore.sh,make.txt&#8217; files and &#8216;rac,scratch,backup&#8217; directories.<br \/>\nYou will be still able to rollback patches after this cleanup.<br \/>\nDo you want to proceed? [y|n]<br \/>\ny<br \/>\nUser Responded with: Y<br \/>\nSize of directory &#8220;\/oracle\/ora10\/.patch_storage&#8221; before cleanup is 4575330012 bytes.<br \/>\nSize of directory &#8220;\/oracle\/ora10\/.patch_storage&#8221; after cleanup is 188326505 bytes.<\/p>\n<p>UtilSession: Backup area for restore has been cleaned up. For a complete list of files\/directories<br \/>\ndeleted, Please refer log file.<\/p>\n<p>OPatch succeeded.<\/p><\/blockquote>\n<p>180 MB instead of 4 GB. I like that.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you are keeping your system up to date with Patchsets, Patch Bundles, Merge Label Requests (MLR) or Critical Patch Updates (CPU), you will most likely suffer from a huge .patch_storage Subdirectory in your $ORACLE_HOME. On one of my databases it looked like this: Space used by $ORACLE_HOME: 7 GB Space used by $ORACLE_HOME\/.patch_storage: 4.3 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[13,14,19,5],"tags":[],"class_list":["post-559","post","type-post","status-publish","format-standard","hentry","category-10g","category-11g","category-metalink","category-oracle-database"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.ora-solutions.net\/web\/wp-json\/wp\/v2\/posts\/559","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ora-solutions.net\/web\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ora-solutions.net\/web\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ora-solutions.net\/web\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ora-solutions.net\/web\/wp-json\/wp\/v2\/comments?post=559"}],"version-history":[{"count":4,"href":"https:\/\/www.ora-solutions.net\/web\/wp-json\/wp\/v2\/posts\/559\/revisions"}],"predecessor-version":[{"id":563,"href":"https:\/\/www.ora-solutions.net\/web\/wp-json\/wp\/v2\/posts\/559\/revisions\/563"}],"wp:attachment":[{"href":"https:\/\/www.ora-solutions.net\/web\/wp-json\/wp\/v2\/media?parent=559"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ora-solutions.net\/web\/wp-json\/wp\/v2\/categories?post=559"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ora-solutions.net\/web\/wp-json\/wp\/v2\/tags?post=559"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}