{"id":779,"date":"2012-04-22T23:29:34","date_gmt":"2012-04-22T15:29:34","guid":{"rendered":"https:\/\/yangtingkun.net\/?p=779"},"modified":"2012-04-25T00:32:32","modified_gmt":"2012-04-24T16:32:32","slug":"%e4%bd%bf%e7%94%a8kfed%e5%87%ba%e7%8e%b0%e6%97%a0%e6%b3%95%e5%88%9d%e5%a7%8b%e5%8c%96diag%e7%9a%84%e9%94%99%e8%af%af","status":"publish","type":"post","link":"https:\/\/yangtingkun.net\/?p=779","title":{"rendered":"\u4f7f\u7528kfed\u51fa\u73b0\u65e0\u6cd5\u521d\u59cb\u5316diag\u7684\u9519\u8bef"},"content":{"rendered":"<p>\u6d4b\u8bd5\u73af\u5883\u4e0a\u4f7f\u7528kfed\u5de5\u5177\u51fa\u73b0\u9519\u8bef\u3002<br \/>\n\u9519\u8bef\u4fe1\u606f\u5982\u4e0b\uff1a<\/p>\n<pre lang='SQL'>grid@solaris:~$ kfed\r\nERROR!!! could not initialize the diag context \r\ngrid@solaris:~$ id\r\nuid=502(grid) gid=501(dba)\r\ngrid@solaris:\/u02\/app\/oracle\/product\/11.2.0\/grid\/bin$ .\/kfed\r\nUnable to run program ed<\/pre>\n<p>\u6839\u636e\u9519\u8bef\u4fe1\u606f\u641c\u7d22MOS\uff0c\u786e\u8ba4\u95ee\u9898\u4e3aKFED &#8211; ERROR!!! could not initialize the diag context [ID 1335596.1]\u3002\u5bfc\u81f4\u95ee\u9898\u7684\u539f\u56e0\u662fkfed\u4f1a\u5c1d\u8bd5\u5efa\u7acb\u81ea\u5df1\u7684\u76ee\u5f55\u5e76\u8bb0\u5f55\u65e5\u5fd7\uff0c\u800c\u5f53\u524d\u7684\u76ee\u5f55\u7ed3\u6784\u4f7f\u5f97grid\u7528\u6237\u6ca1\u6709\u6743\u9650\u6267\u884c\u8fd9\u4e2a\u521d\u59cb\u5316\u7684\u52a8\u4f5c\u3002\u5728MOS\u7684\u8fd9\u7bc7\u6587\u6863\u4e2d\uff0c\u662f\u7531\u4e8e\u4f7f\u7528root\u6267\u884c\u56fdkfed\uff0c\u5bfc\u81f4\u76ee\u5f55\u7684owner\u53d8\u4e3aroot\uff0c\u800cgrid\u7528\u6237\u6267\u884c\u64cd\u4f5c\u65f6\u5219\u62a5\u9519\u3002<\/p>\n<pre lang='SQL'>grid@solaris:~$ ls -l $ORACLE_HOME\/log\/diag\r\ntotal 14\r\n-rw-r----- 1 grid dba 16 Apr 23 16:49 adrci_dir.mif\r\ndrwxr-xr-x 3 grid dba 3 Apr 23 11:26 asm\r\ndrwxr-xr-x 3 grid dba 3 Apr 21 16:03 asmcmd\r\ndrwxrwx--- 2 grid dba 2 Jan 29 14:56 clients\r\ndrwxr-xr-x 3 grid dba 3 Jan 29 15:18 tnslsnr<\/pre>\n<p>\u5f53\u524d\u7684\u95ee\u9898\u548cMOS\u6587\u6863\u63cf\u8ff0\u7684\u5e76\u4e0d\u5b8c\u5168\u76f8\u540c\uff0c\u5f53\u524d\u8def\u5f84\u4e0b\u6ca1\u6709root\u6743\u9650\u7684\u76ee\u5f55\uff0c\u4e5f\u6ca1\u6709\u627e\u5230\u76ee\u6807\u76ee\u5f55asmtool\u3002\u4e0d\u8fc7\u65e0\u8bba\u662f\u73b0\u8c61\u8fd8\u662f\u9519\u8bef\u4fe1\u606f\u90fd\u8bf4\u660e\u95ee\u9898\u786e\u5b9e\u548ckfed\u5199\u65e5\u5fd7\u6709\u5173\u7cfb\u3002\u67e5\u770bORACLE_BASE\/diag\u76ee\u5f55\uff0c\u679c\u7136\u53d1\u73b0\u95ee\u9898\uff1a<\/p>\n<pre lang='SQL'>grid@solaris:~\/grid$ cd $ORACLE_BASE\/diag\r\ngrid@solaris:\/u01\/app\/oracle\/diag$ ls -l\r\ntotal 30\r\ndrwxrwxr-x 3 oracle dba 3 Apr 21 16:20 asm\r\ndrwxr-xr-x 3 kamus staff 3 Mar 23 14:31 asmtool\r\ndrwxrwxr-x 3 oracle dba 3 Jan 30 15:20 clients\r\ndrwxrwxr-x 2 oracle dba 2 Jan 4 18:18 crs\r\ndrwxrwxr-x 2 oracle dba 2 Jan 4 18:18 diagtool\r\ndrwxrwxr-x 2 oracle dba 2 Jan 4 18:18 lsnrctl\r\ndrwxrwxr-x 2 oracle dba 2 Jan 4 18:18 netcman\r\ndrwxrwxr-x 2 oracle dba 2 Jan 4 18:18 ofm\r\ndrwxrwxr-x 4 oracle dba 4 Feb 15 15:44 rdbms\r\ndrwxrwxr-x 3 oracle dba 3 Jan 6 23:55 tnslsnr<\/pre>\n<p>\u76ee\u5f55asmtool\u76ee\u5f55\u7684owner\u679c\u7136\u4e0d\u662fgrid\u7528\u6237\uff0c\u5bfc\u81f4grid\u5728\u5199\u65e5\u5fd7\u662f\u6ca1\u6709\u6743\u9650\uff1a<\/p>\n<pre lang='SQL'>root@solaris:~# chown grid:dba $ORACLE_BASE\/diag\/asmtool\r\nchown: \/diag\/asmtool: No such file or directory\r\nroot@solaris:~# chown grid:dba \/u01\/app\/oracle\/diag\/asmtool<\/pre>\n<p>\u91cd\u65b0\u8bbe\u7f6eowner\u540e\uff0c\u95ee\u9898\u89e3\u51b3\uff1a<\/p>\n<pre lang='SQL'>grid@solaris:\/u01\/app\/oracle\/diag$ kfed\r\nas\/mlib ASM Library [asmlib='lib']\r\naun\/um AU number to examine or update [AUNUM=number]\r\naus\/z Allocation Unit size in bytes [AUSZ=number]\r\nblkn\/um Block number to examine or update [BLKNUM=number]\r\nblks\/z Metadata block size in bytes [BLKSZ=number]\r\nch\/ksum Update checksum before each write [CHKSUM=YES\/NO]\r\ncn\/t Count of AUs to process [CNT=number]\r\nde\/v ASM device to examine or update [DEV=string]\r\ndm\/pall Don't suppress repeated lines when dumping corrupt blocks [DMPALL=YES\/NO]\r\no\/p KFED operation type [OP=READ\/WRITE\/MERGE\/REPAIR\/NEW\/FORM\/FIND\/STRUCT]\r\np\/rovnm Name for provisioning purposes [PROVNM=string]\r\ns\/eek AU number to seek to [SEEK=number]\r\nte\/xt File name for translated block text [TEXT=string]\r\nty\/pe ASM metadata block type number [TYPE=number]<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u6d4b\u8bd5\u73af\u5883\u4e0a\u4f7f\u7528kfed\u5de5\u5177\u51fa\u73b0\u9519\u8bef\u3002 \u9519\u8bef\u4fe1\u606f\u5982\u4e0b\uff1a grid@solaris:~$ kfed ERROR!!! could not initialize the diag context grid@solaris:~$ id uid=502(grid) gid=501(dba) grid@solaris:\/u02\/app\/oracle\/product\/11.2.0\/grid\/bin$ .\/kfed Unable to run program ed \u6839\u636e\u9519\u8bef\u4fe1\u606f\u641c\u7d22MOS\uff0c\u786e\u8ba4\u95ee\u9898\u4e3aKFED &#8211; ERROR!!! could not initialize the diag context [ID 1335596.1]\u3002\u5bfc\u81f4\u95ee\u9898\u7684\u539f\u56e0\u662fkfed\u4f1a\u5c1d\u8bd5\u5efa\u7acb\u81ea\u5df1\u7684\u76ee\u5f55\u5e76\u8bb0\u5f55\u65e5\u5fd7\uff0c\u800c\u5f53\u524d\u7684\u76ee\u5f55\u7ed3\u6784\u4f7f\u5f97grid\u7528\u6237\u6ca1\u6709\u6743\u9650\u6267\u884c\u8fd9\u4e2a\u521d\u59cb\u5316\u7684\u52a8\u4f5c\u3002\u5728MOS\u7684\u8fd9\u7bc7\u6587\u6863\u4e2d\uff0c\u662f\u7531\u4e8e\u4f7f\u7528root\u6267\u884c\u56fdkfed\uff0c\u5bfc\u81f4\u76ee\u5f55\u7684owner\u53d8\u4e3aroot\uff0c\u800cgrid\u7528\u6237\u6267\u884c\u64cd\u4f5c\u65f6\u5219\u62a5\u9519\u3002 grid@solaris:~$ ls -l $ORACLE_HOME\/log\/diag total 14 -rw-r&#8212;&#8211; &hellip; <a href=\"https:\/\/yangtingkun.net\/?p=779\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3],"tags":[641,469,18,640],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2yiY3-cz","_links":{"self":[{"href":"https:\/\/yangtingkun.net\/index.php?rest_route=\/wp\/v2\/posts\/779"}],"collection":[{"href":"https:\/\/yangtingkun.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yangtingkun.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yangtingkun.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yangtingkun.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=779"}],"version-history":[{"count":1,"href":"https:\/\/yangtingkun.net\/index.php?rest_route=\/wp\/v2\/posts\/779\/revisions"}],"predecessor-version":[{"id":780,"href":"https:\/\/yangtingkun.net\/index.php?rest_route=\/wp\/v2\/posts\/779\/revisions\/780"}],"wp:attachment":[{"href":"https:\/\/yangtingkun.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=779"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yangtingkun.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=779"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yangtingkun.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=779"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}