`
ijavagos
  • 浏览: 1183255 次
  • 性别: Icon_minigender_2
  • 来自: 北京
文章分类
社区版块
存档分类
最新评论

ASM 实例 ORA-15063 ORA-15186 ASMLIB error function = [asm_open], error = [1], mesg = [Operation not permitted] 解决方法

 
阅读更多

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 的原因,有两方面原因:

1Oracle ASM database instance parameterasm_diskstringis unset

2Oracle ASM database instance parameterasm_diskstringwas recently modified to include devices or directories that it 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

NAME TYPE VALUE

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

asm_diskstring string ORCL:*

这些设置之后,在创建磁盘组的时候是能够识别的,但是在第二个节点挂载的时候,就报开始提到的错误了。 把整个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';

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

参考:

Oracle ASM 详解

http://blog.csdn.net/tianlesoftware/archive/2010/02/21/5314541.aspx

这次一次通过了。

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 Area 92274688 bytes

Fixed Size 1217884 bytes

Variable Size 65890980 bytes

ASM Cache 25165824 bytes

ASM diskgroups mounted

SQL> col name format a10

SQL> select GROUP_NUMBER,NAME,STATE,TYPE,TOTAL_MB,FREE_MB,

2 UNBALANCED from v$asm_diskgroup;

GROUP_NUMBER NAME STATE TYPE TOTAL_MB FREE_MB U

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

1 DATA MOUNTED EXTERN 11993 11900 N

2 FRA MOUNTED EXTERN 7993 7900 N

3. ASM_DISKSTRING 参数说明

TheASM_DISKSTRINGinitialization parameter specifies a comma-delimited list of strings that limits the set of disks that an Oracle ASM instance discovers. The discovery strings can include 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.

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

Blog http://blog.csdn.net/tianlesoftware

网上资源: http://tianlesoftware.download.csdn.net

相关视频:http://blog.csdn.net/tianlesoftware/archive/2009/11/27/4886500.aspx

DBA1 群:62697716(); DBA2 群:62697977() DBA3 群:62697850()

DBA 超级群:63306533(); DBA4 群: 83829929 DBA5群: 142216823

聊天 群:40132017

--加群需要在备注说明Oracle表空间和数据文件的关系,否则拒绝申请

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics