ASM 实例 ORA-15063 ORA-15186 ASMLIB error function = [asm_open], error = [1], mesg = [Operation not pe...

装RAC时,用DBCA命令创建了ASM实例,之后创建diskgroup的时候,有一个节点的diskgroup挂不上,看了下日志,错误如下:

ORA-15186: ASMLIB error function = [asm_open], error = [1], mesg = [Operation not permitted]

ORA-15063: ASM discovered an insufficient number of disks for diskgroup "FRA"

ORA-15063: ASM discovered an insufficient number of disks for diskgroup "DATA"

不过错误是提示是很恶心的,误导了我很长时间:

Ensure that the listener is runing on this node and the ASM instance is registered to the listener.

一度以为是监听的问题。不过后来发现还是权限问题。

总的来说,导致不能mount的原因,有两方面原因:

(1)Oracle ASM database instance parameterasm_diskstringis unset

(2)Oracle ASM database instance parameterasm_diskstringwas recently modified to include devices or directories thatit has no privilege to access

1.对应Device的权限问题

Device需要oracle用户的权限。

[oracle@rac1 mapper]$ ll

brw-rw---- 1 oracle oinstall 253,3 Mar 21 15:01 data

brw-rw---- 1 oracle oinstall 253, 12 Mar 24 13:40 datap1

brw-rw---- 1 oracle oinstall 253,2 Mar 21 15:01 fra

brw-rw---- 1 oracle oinstall 253,8 Mar 24 13:40 frap1

不过一般安装的时候,默认是root:disk.使用命令修改一下:

$chown oracle:oinstall device_name

2. asm_diskstring参数的问题

这个参数也会导致权限的问题。这个参数是支持通配符的。我开始一直设置成ORCL:*,如:

SQL> show parameter asm_diskstring

NAMETYPEVALUE

------------------------------------ ----------- ------------------------------

asm_diskstringstringORCL:*

这些设置之后,在创建磁盘组的时候是能够识别的,但是在第二个节点挂载的时候,就报开始提到的错误了。把整个ASM删除了2次,重建了2次,问题依旧。无耐,没有设置通配符了。

(1)先讲所有已经挂载的磁盘dismout

SQL>alter diskgroup all dismount

(2)重新指定asm_diskstring:

SQL> alter system set asm_diskstring='/dev/mapper/datap1','/dev/mapper/frap1';

(3)dbca继续挂载,当然也可以手工的创建磁盘组。

参考:

Oracle ASM详解

http://blog.csdn.net/xujinyang/article/details/6837288

这次一次通过了。

(4)shutdown ASM实例,重启启动。

我们之前的的修改是只对内存生效,所以如果ASM重启,就没有了。所以需要修改pfile,在重启。

[oracle@rac1 dbs]$ pwd

/u01/app/oracle/product/10.2.0/db_1/dbs

[oracle@rac1 dbs]$ vi init+ASM2.ora

asm_diskstring='/dev/mapper/datap1','/dev/mapper/frap1'

注意:

$ORACLE_HOME下的init+ASM2.ora只是一个link,

[oracle@rac1 dbs]$ ls -lrt init+ASM2.ora

lrwxrwxrwx 1 oracle oinstall 41 Mar 24 12:49 init+ASM2.ora -> /u01/app/oracle/admin/+ASM/pfile/init.ora

SQL> startup

ASM instance started

Total System Global Area92274688 bytes

Fixed Size1217884 bytes

Variable Size65890980 bytes

ASM Cache25165824 bytes

ASM diskgroups mounted

SQL> col name format a10

SQL> selectGROUP_NUMBER,NAME,STATE,TYPE,TOTAL_MB,FREE_MB,

2UNBALANCEDfrom v$asm_diskgroup;

GROUP_NUMBER NAMESTATETYPETOTAL_MBFREE_MB U

------------ ---------- ----------- ------ ---------- ---------- -

1 DATAMOUNTEDEXTERN1199311900 N

2 FRAMOUNTEDEXTERN79937900 N

3.ASM_DISKSTRING参数说明

TheASM_DISKSTRINGinitialization parameter specifies a comma-delimited list of strings thatlimits the set of disks that an Oracle ASM instance discovers. The discovery strings caninclude wildcard characters. Only disks that match one of the strings are discovered. The same disk cannot be discovered twice.

The discovery string format depends on the Oracle ASM library and the operating system that are in use. Pattern matching is supported. Refer to your operating system-specific installation guide for information about the default pattern matching.

For example, on a Linux server that does not use ASMLIB, to limit the discovery process to only include disks that are in the/dev/rdsk/mydisksdirectory, set theASM_DISKSTRINGinitialization parameter to:

/dev/rdsk/mydisks/*

The asterisk is required. To limit the discovery process to only include disks that have a name that ends indisk3ordisk4, setASM_DISKSTRINGto:

/dev/rdsk/*disk3,/dev/rdsk/*disk4

The?character, when used as the first character of a path, expands to the Oracle home directory. Depending on the operating system, when you use the?character elsewhere in the path, it is a wildcard for one character.

The default value of theASM_DISKSTRINGparameter is aNULLstring.ANULLvalue causes Oracle ASM to search a default path for all disks in the system to which the Oracle ASM instance has read and write access. The default search path is platform-specific. Refer to your operating system specific installation guide for more information about the default search path.

Oracle ASM cannot use a disk unless all of the Oracle ASM instances in the cluster can discover the disk through one of their own discovery strings.The names do not have to be the same on every node, but all disks must be discoverable by all of the nodes in the cluster. This may require dynamically changing the initialization parameter to enable adding new storage.

---------------------------------------------------------------------------------------------------

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值