{"id":237,"date":"2009-06-17T16:08:27","date_gmt":"2009-06-17T21:08:27","guid":{"rendered":"http:\/\/appcrawler.com\/wordpress\/?p=237"},"modified":"2011-07-06T09:56:15","modified_gmt":"2011-07-06T14:56:15","slug":"renaming-an-asm-diskgroup-in-10g","status":"publish","type":"post","link":"http:\/\/appcrawler.com\/wordpress\/2009\/06\/17\/renaming-an-asm-diskgroup-in-10g\/","title":{"rendered":"Renaming an ASM diskgroup in 10g"},"content":{"rendered":"<p>Since their is no &#8220;alter diskgroup rename&#8221; command, I tried this on a test system and it works.\u00a0 Pretty cool, but this not even remotely supported by oracle, so use at your own risk \ud83d\ude42<\/p>\n<p>With everything down&#8230;<\/p>\n<pre lang=\"text\">\r\ncd $ORACLE_HOME\/rdbms\/lib\r\nmake -f ins_rdbms.mk ikfed\r\nfor f in $(ls \/dev\/raw\/raw* | grep -v rawctl); do\r\n  echo \"Processing DATA disk $file ...\"\r\n  search=CURRENT_DISKGROUP_NAME\r\n  replace=NEW_DISKGROUP_NAME\r\n  newlength=$(echo $replace | wc -m)\r\n  newlength=$newlength-1\r\n  shortname=$(echo $f | cut -f 6 -d \/)\r\n  kfed op=read dev=$f | sed -e '24,24s\/ '$search' \/ '$replace' \/' -e '24,24s\/length=.*\/length='$newlength'\/' &gt; \/tmp\/$shortname.kfed\r\n  kfed op=write dev=$f text=\/tmp\/$shortname.kfed CHKSUM=YES\r\ndone\r\n<\/pre>\n<p>change all parameters that reference the old diskgroup name<br \/>\nmount database<br \/>\nrename datafiles and redo logs<br \/>\ncatalog archivelogs (if any)<br \/>\nopen database<\/p>\n<p>Make sure you are only doing ASM disks.  In other words \/dev\/raw\/raw* may give too many devices, so filter as necessary in your environment.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Since their is no &#8220;alter diskgroup rename&#8221; command, I tried this on a test system and it works.\u00a0 Pretty cool, but this not even remotely supported by oracle, so use at your own risk \ud83d\ude42 With everything down&#8230; cd $ORACLE_HOME\/rdbms\/lib&hellip;<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"http:\/\/appcrawler.com\/wordpress\/2009\/06\/17\/renaming-an-asm-diskgroup-in-10g\/\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"footnotes":""},"categories":[19,22],"tags":[],"_links":{"self":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/237"}],"collection":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/comments?post=237"}],"version-history":[{"count":9,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/237\/revisions"}],"predecessor-version":[{"id":950,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/237\/revisions\/950"}],"wp:attachment":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/media?parent=237"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/categories?post=237"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/tags?post=237"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}