{"id":891,"date":"2013-06-17T16:14:19","date_gmt":"2013-06-17T08:14:19","guid":{"rendered":"http:\/\/www.yallonking.com\/?p=891"},"modified":"2013-06-17T18:33:49","modified_gmt":"2013-06-17T10:33:49","slug":"rac%e5%8d%95%e8%8a%82%e7%82%b9%e5%b1%9e%e7%bb%84%e6%81%a2%e5%a4%8d","status":"publish","type":"post","link":"http:\/\/www.yallonking.com\/?p=891","title":{"rendered":"RAC\u5355\u8282\u70b9\u5c5e\u7ec4\u6062\u590d"},"content":{"rendered":"<p>rac\u5355\u8282\u70b9\u6743\u9650\u6062\u590d<br \/>\n\u80cc\u666f\uff1a\u4e00\u4e2a\u540c\u4e8b\u8bef\u5bf9ORACLE_BASE\u7684\u9876\u5c42\u76ee\u5f55\u8fdb\u884c\u4e86chown -R oracle:oinstall \/u01 \u64cd\u4f5c\uff0c\u5bfc\u81f4rac\u8282\u70b91\u65e0\u6cd5\u6b63\u5e38\u542f\u52a8\u3002<br \/>\n\u4e0b\u8fb9\u91cd\u73b0\u5e76\u5728\u6ca1\u6709\u5907\u4efd\u7684\u60c5\u51b5\u4e0b\u6062\u590d\u3002<\/p>\n<p>\u4e3b\u8981\u6280\u672f\uff1agetfacl \u548csetfacl<br \/>\n\u8be5\u547d\u4ee4\u662f\u7528\u6765\u5907\u4efd\u6587\u4ef6\u8bbf\u95ee\u6743\u9650\u548c\u6062\u590d\u6587\u4ef6\u6743\u9650\u7684<br \/>\n\u8fd9\u4e2a\u662f\u53ef\u4ee5\u4ece\u8282\u70b92 \u505a\u8282\u70b91 \u7684 \u5c5e\u7ec4\u95ee\u9898\u7684<\/p>\n<p>\u8282\u70b91\u5f53\u524d\u72b6\u6001<\/p>\n<pre class=\"wp-code-highlight prettyprint\">\r\n[root@11grac1 ~]# su - grid\r\n[grid@11grac1 ~]$ crs_stat -t\r\nName           Type           Target    State     Host        \r\n------------------------------------------------------------\r\nora....SM1.asm application    ONLINE    ONLINE    11grac1     \r\nora....C1.lsnr application    ONLINE    ONLINE    11grac1     \r\nora....ac1.gsd application    OFFLINE   OFFLINE               \r\nora....ac1.ons application    ONLINE    ONLINE    11grac1     \r\nora....ac1.vip ora....t1.type ONLINE    ONLINE    11grac1     \r\nora....SM2.asm application    ONLINE    ONLINE    11grac2     \r\nora....C2.lsnr application    ONLINE    ONLINE    11grac2     \r\nora....ac2.gsd application    OFFLINE   OFFLINE               \r\nora....ac2.ons application    ONLINE    ONLINE    11grac2     \r\nora....ac2.vip ora....t1.type ONLINE    ONLINE    11grac2     \r\nora.DATA.dg    ora....up.type ONLINE    ONLINE    11grac1     \r\nora....ER.lsnr ora....er.type ONLINE    ONLINE    11grac1     \r\nora....N1.lsnr ora....er.type ONLINE    ONLINE    11grac1     \r\nora.asm        ora.asm.type   ONLINE    ONLINE    11grac1     \r\nora.cvu        ora.cvu.type   ONLINE    ONLINE    11grac2     \r\nora.gsd        ora.gsd.type   OFFLINE   OFFLINE               \r\nora....network ora....rk.type ONLINE    ONLINE    11grac1     \r\nora.oc4j       ora.oc4j.type  ONLINE    ONLINE    11grac2     \r\nora.ons        ora.ons.type   ONLINE    ONLINE    11grac1     \r\nora.racdb.db   ora....se.type ONLINE    ONLINE    11grac1     \r\nora.scan1.vip  ora....ip.type ONLINE    ONLINE    11grac1   \r\n<\/pre>\n<p>\u6570\u636e\u5e93\u7248\u672c<\/p>\n<pre class=\"wp-code-highlight prettyprint\">\r\nSQL&gt; set line 400\r\nSQL&gt; select * from gv$version;\r\n\r\n   INST_ID BANNER\r\n---------- --------------------------------------------------------------------------------\r\n         1 Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production\r\n         1 PL\/SQL Release 11.2.0.3.0 - Production\r\n         1 CORE 11.2.0.3.0      Production\r\n         1 TNS for Linux: Version 11.2.0.3.0 - Production\r\n         1 NLSRTL Version 11.2.0.3.0 - Production\r\n         2 Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production\r\n         2 PL\/SQL Release 11.2.0.3.0 - Production\r\n         2 CORE 11.2.0.3.0      Production\r\n         2 TNS for Linux: Version 11.2.0.3.0 - Production\r\n         2 NLSRTL Version 11.2.0.3.0 - Production\r\n\r\n10 rows selected.\r\n<\/pre>\n<p>OS\u4fe1\u606f<\/p>\n<pre class=\"wp-code-highlight prettyprint\">\r\n[oracle@11grac1 ~]$ uname -a\r\nLinux 11grac1 2.6.32-220.el6.x86_64 #1 SMP Wed Nov 9 08:03:13 EST 2011 x86_64 x86_64 x86_64 GNU\/Linux\r\n\r\n<\/pre>\n<p>\u6a21\u62df\u5728\u8282\u70b91\u4fee\u6539oracle\u6839\u76ee\u5f55\u5c5e\u7ec4<\/p>\n<pre class=\"wp-code-highlight prettyprint\">\r\n[root@11grac1 ~]# su - oracle\r\n[oracle@11grac1 ~]$ env | grep ORACLE_BASE\r\nORACLE_BASE=\/u01\/app\/oracle\r\n[root@11grac1 ~]# ls -l \/\r\ntotal 110\r\ndr-xr-xr-x.   2 root root      4096 May 10 08:33 bin\r\ndr-xr-xr-x.   5 root root      1024 May  8 23:15 boot\r\ndrwxr-xr-x.   2 root root      4096 Jul 26  2011 cgroup\r\ndrwxr-xr-x   16 root root      3700 Jun 17 15:12 dev\r\ndrwxr-xr-x. 121 root root     12288 Jun 17 15:12 etc\r\ndrwxr-xr-x.   4 root root      4096 May  8 15:23 home\r\ndr-xr-xr-x.  13 root root      4096 May 10 08:33 lib\r\ndr-xr-xr-x.   9 root root     12288 May  9 14:02 lib64\r\ndrwx------.   2 root root     16384 May  8 23:04 lost+found\r\ndrwxr-xr-x.   2 root root      4096 Jun 28  2011 media\r\ndrwxr-xr-x    2 root root         0 Jun 17 15:12 misc\r\ndrwxr-xr-x.   2 root root      4096 Jun 28  2011 mnt\r\ndrwxr-xr-x    2 root root         0 Jun 17 15:12 net\r\ndrwxr-xr-x.   4 root root      4096 May  9 12:50 opt\r\ndr-xr-xr-x  242 root root         0 Jun 17 15:11 proc\r\ndr-xr-x---.  21 root root      4096 May 11 22:04 root\r\ndr-xr-xr-x.   2 root root     12288 May  9 09:14 sbin\r\ndrwxr-xr-x.   2 root root      4096 May  8 23:07 selinux\r\ndrwxr-xr-x.   2 root root      4096 Jun 28  2011 srv\r\ndrwxr-xr-x   13 root root         0 Jun 17 15:11 sys\r\ndrwxrwxrwt.  15 root root      4096 Jun 17 15:12 tmp\r\ndrwxr-xr-x.   5 root oinstall  4096 May  9 13:19 u01\r\ndrwxr-xr-x.  13 root root      4096 May  8 23:08 usr\r\ndrwxr-xr-x.  22 root root      4096 May  8 23:14 var\r\n[root@11grac1 ~]# chown oracle:oinstall -R \/u01\r\n[root@11grac1 ~]# ls -l \/\r\ntotal 110\r\ndr-xr-xr-x.   2 root   root      4096 May 10 08:33 bin\r\ndr-xr-xr-x.   5 root   root      1024 May  8 23:15 boot\r\ndrwxr-xr-x.   2 root   root      4096 Jul 26  2011 cgroup\r\ndrwxr-xr-x   16 root   root      3700 Jun 17 15:12 dev\r\ndrwxr-xr-x. 121 root   root     12288 Jun 17 15:12 etc\r\ndrwxr-xr-x.   4 root   root      4096 May  8 15:23 home\r\ndr-xr-xr-x.  13 root   root      4096 May 10 08:33 lib\r\ndr-xr-xr-x.   9 root   root     12288 May  9 14:02 lib64\r\ndrwx------.   2 root   root     16384 May  8 23:04 lost+found\r\ndrwxr-xr-x.   2 root   root      4096 Jun 28  2011 media\r\ndrwxr-xr-x    2 root   root         0 Jun 17 15:12 misc\r\ndrwxr-xr-x.   2 root   root      4096 Jun 28  2011 mnt\r\ndrwxr-xr-x    2 root   root         0 Jun 17 15:12 net\r\ndrwxr-xr-x.   4 root   root      4096 May  9 12:50 opt\r\ndr-xr-xr-x  242 root   root         0 Jun 17 15:11 proc\r\ndr-xr-x---.  21 root   root      4096 May 11 22:04 root\r\ndr-xr-xr-x.   2 root   root     12288 May  9 09:14 sbin\r\ndrwxr-xr-x.   2 root   root      4096 May  8 23:07 selinux\r\ndrwxr-xr-x.   2 root   root      4096 Jun 28  2011 srv\r\ndrwxr-xr-x   13 root   root         0 Jun 17 15:11 sys\r\ndrwxrwxrwt.  15 root   root      4096 Jun 17 15:12 tmp\r\ndrwxr-xr-x.   5 oracle oinstall  4096 May  9 13:19 u01\r\ndrwxr-xr-x.  13 root   root      4096 May  8 23:08 usr\r\ndrwxr-xr-x.  22 root   root      4096 May  8 23:14 var\r\n\r\n[root@11grac1 ~]# sync\r\n[root@11grac1 ~]# reboot\r\n\r\nBroadcast message from root@11grac1\r\n        (\/dev\/pts\/0) at 15:29 ...\r\n\r\nThe system is going down for reboot NOW!\r\n\r\n[root@11grac1 bin]# .\/crsctl start crs\r\nCRS-4640: Oracle High Availability Services is already active\r\nCRS-4000: Command Start failed, or completed with errors.\r\n[root@11grac1 bin]# .\/crsctl check crs\r\nCRS-4638: Oracle High Availability Services is online\r\nCRS-4535: Cannot communicate with Cluster Ready Services\r\nCRS-4530: Communications failure contacting Cluster Synchronization Services daemon\r\nCRS-4534: Cannot communicate with Event Manager\r\n<\/pre>\n<p>\u8282\u70b92\u6b63\u5e38<\/p>\n<pre class=\"wp-code-highlight prettyprint\">\r\n[root@11grac2 ~]# su - grid\r\n[grid@11grac2 ~]$ crs_stat -t\r\nName           Type           Target    State     Host        \r\n------------------------------------------------------------\r\nora....ac1.vip ora....t1.type ONLINE    ONLINE    11grac2     \r\nora....SM2.asm application    ONLINE    ONLINE    11grac2     \r\nora....C2.lsnr application    ONLINE    ONLINE    11grac2     \r\nora....ac2.gsd application    OFFLINE   OFFLINE               \r\nora....ac2.ons application    ONLINE    ONLINE    11grac2     \r\nora....ac2.vip ora....t1.type ONLINE    ONLINE    11grac2     \r\nora.DATA.dg    ora....up.type ONLINE    ONLINE    11grac2     \r\nora....ER.lsnr ora....er.type ONLINE    ONLINE    11grac2     \r\nora....N1.lsnr ora....er.type ONLINE    ONLINE    11grac2     \r\nora.asm        ora.asm.type   ONLINE    ONLINE    11grac2     \r\nora.cvu        ora.cvu.type   ONLINE    ONLINE    11grac2     \r\nora.gsd        ora.gsd.type   OFFLINE   OFFLINE               \r\nora....network ora....rk.type ONLINE    ONLINE    11grac2     \r\nora.oc4j       ora.oc4j.type  ONLINE    ONLINE    11grac2     \r\nora.ons        ora.ons.type   ONLINE    ONLINE    11grac2     \r\nora.racdb.db   ora....se.type ONLINE    ONLINE    11grac2     \r\nora.scan1.vip  ora....ip.type ONLINE    ONLINE    11grac2   \r\n<\/pre>\n<p>\u5728\u8282\u70b92\u5907\u4efd\u6743\u9650\u5e76\u4f20\u5230\u8282\u70b91<\/p>\n<pre class=\"wp-code-highlight prettyprint\">\r\n[root@11grac2 ~]# cd \/\r\n[root@11grac2 \/]# date;getfacl -R u01 &gt; \/tmp\/ch.bak;date\r\nMon Jun 17 15:42:59 CST 2013\r\nMon Jun 17 15:44:39 CST 2013\r\n[root@11grac2 \/]# scp \/tmp\/ch.bak 192.168.137.165:\/tmp\/ch.bak \r\nThe authenticity of host &#039;192.168.137.165 (192.168.137.165)&#039; can&#039;t be established.\r\nRSA key fingerprint is 69:c3:cb:7f:5b:dd:59:a9:5c:94:4e:33:fa:5b:0c:70.\r\nAre you sure you want to continue connecting (yes\/no)? yes\r\nWarning: Permanently added &#039;192.168.137.165&#039; (RSA) to the list of known hosts.\r\nroot@192.168.137.165&#039;s password: \r\nch.bak                                                                                            100% 9531KB   4.7MB\/s   00:02    \r\n\r\n<\/pre>\n<p><strong>\u5728\u8282\u70b91\u4e0a\u66ff\u6362ch.bak\u4e2d\u548c\u8282\u70b9\u76f8\u5173\u7684\u6587\u4ef6\u540d\u53ca\u76ee\u5f55\u540d\u540e\u8fdb\u884c\u6062\u590d<\/strong><br \/>\n<strong>\u6ce8\u610f\uff1a\u66ff\u6362\u6709\u8282\u70b9\u540d\uff0c\u5b9e\u4f8b\u540d\u76f8\u5173\u7684\u5b57\u7b26\u4e32<\/strong><\/p>\n<pre class=\"wp-code-highlight prettyprint\">\r\n[root@11grac1 bin]# date;setfacl --restore=\/tmp\/ch.bak;date\r\n<\/pre>\n<p>\u90e8\u5206\u8f93\u51fa\u7565<\/p>\n<pre class=\"wp-code-highlight prettyprint\">\r\nsetfacl: \/u01\/app\/oracle\/diag\/clients\/user_oracle\/host_870208700_80\/incident: No such file or directory\r\nsetfacl: \/u01\/app\/oracle\/diag\/clients\/user_oracle\/host_870208700_80\/alert: No such file or directory\r\nsetfacl: \/u01\/app\/oracle\/diag\/clients\/user_oracle\/host_870208700_80\/alert\/log.xml: No such file or directory\r\nsetfacl: \/u01\/app\/oracle\/diag\/clients\/user_oracle\/host_870208700_80\/incpkg: No such file or directory\r\nsetfacl: \/u01\/app\/oracle\/diag\/clients\/user_oracle\/host_870208700_80\/metadata_dgif: No such file or directory\r\nsetfacl: \/u01\/app\/oraInventory\/logs\/AttachHome2013-05-09_09-56-32PM.log: No such file or directory\r\nsetfacl: \/u01\/app\/oraInventory\/logs\/AttachHome2013-05-09_10-17-21PM.log: No such file or directory\r\nsetfacl: \/u01\/app\/oraInventory\/logs\/AttachHome2013-05-09_08-58-40PM.log: No such file or directory\r\nsetfacl: \/u01\/app\/oraInventory\/logs\/UpdateNodeList2013-05-09_09-28-20PM.log: No such file or directory\r\nsetfacl: \/u01\/app\/oraInventory\/logs\/AttachHome2013-05-09_08-40-32PM.log: No such file or directory\r\nMon Jun 17 16:02:38 CST 2013\r\n<\/pre>\n<p>\u7a0d\u8fc7\u51e0\u5206\u949f\u5373\u53ef<\/p>\n<pre class=\"wp-code-highlight prettyprint\">\r\n[root@11grac1 bin]# .\/crsctl check crs\r\nCRS-4638: Oracle High Availability Services is online\r\nCRS-4537: Cluster Ready Services is online\r\nCRS-4529: Cluster Synchronization Services is online\r\nCRS-4533: Event Manager is online\r\n[root@11grac1 bin]# su - grid\r\n[grid@11grac1 ~]$ crs_stat -t\r\nName           Type           Target    State     Host        \r\n------------------------------------------------------------\r\nora....SM1.asm application    ONLINE    ONLINE    11grac1     \r\nora....C1.lsnr application    ONLINE    ONLINE    11grac1     \r\nora....ac1.gsd application    OFFLINE   OFFLINE               \r\nora....ac1.ons application    ONLINE    ONLINE    11grac1     \r\nora....ac1.vip ora....t1.type ONLINE    ONLINE    11grac1     \r\nora....SM2.asm application    ONLINE    ONLINE    11grac2     \r\nora....C2.lsnr application    ONLINE    ONLINE    11grac2     \r\nora....ac2.gsd application    OFFLINE   OFFLINE               \r\nora....ac2.ons application    ONLINE    ONLINE    11grac2     \r\nora....ac2.vip ora....t1.type ONLINE    ONLINE    11grac2     \r\nora.DATA.dg    ora....up.type ONLINE    ONLINE    11grac1     \r\nora....ER.lsnr ora....er.type ONLINE    ONLINE    11grac1     \r\nora....N1.lsnr ora....er.type ONLINE    ONLINE    11grac2     \r\nora.asm        ora.asm.type   ONLINE    ONLINE    11grac1     \r\nora.cvu        ora.cvu.type   ONLINE    ONLINE    11grac2     \r\nora.gsd        ora.gsd.type   OFFLINE   OFFLINE               \r\nora....network ora....rk.type ONLINE    ONLINE    11grac1     \r\nora.oc4j       ora.oc4j.type  ONLINE    ONLINE    11grac2     \r\nora.ons        ora.ons.type   ONLINE    ONLINE    11grac1     \r\nora.racdb.db   ora....se.type ONLINE    ONLINE    11grac1     \r\nora.scan1.vip  ora....ip.type ONLINE    ONLINE    11grac2    \r\n<\/pre>\n<p>\u81f3\u6b64\uff0c\u5168\u90e8OK\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>rac\u5355\u8282\u70b9\u6743\u9650\u6062\u590d \u80cc\u666f\uff1a\u4e00\u4e2a\u540c\u4e8b\u8bef\u5bf9ORACLE_BASE\u7684\u9876\u5c42\u76ee\u5f55\u8fdb\u884c\u4e86chown -R oracle: [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[35,36],"tags":[206,207],"_links":{"self":[{"href":"http:\/\/www.yallonking.com\/index.php?rest_route=\/wp\/v2\/posts\/891"}],"collection":[{"href":"http:\/\/www.yallonking.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.yallonking.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.yallonking.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.yallonking.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=891"}],"version-history":[{"count":2,"href":"http:\/\/www.yallonking.com\/index.php?rest_route=\/wp\/v2\/posts\/891\/revisions"}],"predecessor-version":[{"id":901,"href":"http:\/\/www.yallonking.com\/index.php?rest_route=\/wp\/v2\/posts\/891\/revisions\/901"}],"wp:attachment":[{"href":"http:\/\/www.yallonking.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=891"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.yallonking.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=891"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.yallonking.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=891"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}