标签归档:could not initialize the diag context

KFED – ERROR!!! could not initialize the diag context

grid用户执行kfed报ERROR!!! could not initialize the diag context错误

[grid@xifenfei ~]$ kfed
ERROR!!! could not initialize the diag context 

asmtool权限/所有者不对
通过分析是由于kfed在执行的时候需要在$ORACLE_BASE/diag目录下面创建asmtool文件夹以及相关文件,当grid用户无法创建之时,就会出现此类错误

[grid@xifenfei ~]$ cd $ORACLE_BASE/diag
[grid@xifenfei diag]$ ls
asm  asmtool  rdbms  tnslsnr
[grid@xifenfei diag]$ ls -ltr
total 16
drwxr-xr-x. 3 grid oinstall 4096 Jul 31  2014 tnslsnr
drwxr-xr-x. 3 root   root     4096 Apr 21 10:11 asmtool
drwxr-x---. 4 grid oinstall 4096 Apr 29  2018 rdbms
drwxr-xr-x. 3 grid oinstall 4096 Jun 19  2018 asm

修改asmtool所有者

[root@xifenfei ~]# cd /u01/app/grid/diag/
[root@xifenfei diag]# chown  grid:oinstall asmtool/ 

grid用户执行kfed正常

[grid@xifenfei diag]$ kfed 
as/mlib         ASM Library [asmlib='lib']
aun/um          AU number to examine or update [AUNUM=number]
aus/z           Allocation Unit size in bytes [AUSZ=number]
blkn/um         Block number to examine or update [BLKNUM=number]
blks/z          Metadata block size in bytes [BLKSZ=number]
ch/ksum         Update checksum before each write [CHKSUM=YES/NO]
cn/t            Count of AUs to process [CNT=number]
de/v            ASM device to examine or update [DEV=string]
dm/pall         Don't suppress repeated lines when dumping corrupt blocks [DMPALL=YES/NO]
o/p             KFED operation type [OP=READ/WRITE/MERGE/REPAIR/NEW/FORM/FIND/STRUCT]
p/rovnm         Name for provisioning purposes [PROVNM=string]
s/eek           AU number to seek to [SEEK=number]
te/xt           File name for translated block text [TEXT=string]
ty/pe           ASM metadata block type number [TYPE=number]

kfed创建对应目录

[grid@xifenfei asmtool]$ ls -ltr
total 8
drwxr-xr-x. 3 root   root     4096 Apr 21 10:23 user_root
drwxr-xr-x. 3 grid oinstall 4096 Apr 21 10:24 user_grid
发表在 Oracle | 标签为 , | 评论关闭