在执行命令/etc/init.d/oracleasm configure -i时没有出现下面修改asm磁盘启动时候的权限:
Fix permissions of Oracle ASM disks on boot? (y/n) | Enter y to fix permissions of Oracle ASM disks when the system starts. |
只出现下面操作:
[root@rac11ga ~]# /usr/sbin/oracleasm configure -i
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting <ENTER> without typing an
answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface [grid]:
Default group to own the driver interface [asmadmin]:
Start Oracle ASM library driver on boot (y/n) [y]:
Scan for Oracle ASM disks on boot (y/n) [y]:
Writing Oracle ASM library driver configuration: done
[root@rac11ga ~]#
重新启动机器后查看asm磁盘权限,所有者和组都变为root。
[root@rac11ga oracleasm]# ll
total 0
drwxr-xr-x 1 root root 0 Apr 28 11:00 disks
drwxrwx--- 1 grid asmadmin 0 Apr 28 11:00 iid
在/etc/udev/rules.d目录先新建一个文件99-grid-permissions.rules:
vi 99-grid-permissions.rules
输入如下内容
# Set permissions of block bindings to Oracle Clusterware devices
PROGRAM="/bin/chown grid:asmadmin /dev/oracleasm/disks"
保存然后重启机器
重新登录并重启asm实例成功
[grid@rac11ga ~]$ sqlplus / as sysasm
SQL*Plus: Release 11.2.0.2.0 Production on Sat Apr 28 14:11:14 2012
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ASM instance started
Total System Global Area 283930624 bytes
Fixed Size 2225792 bytes
Variable Size 256539008 bytes
ASM Cache 25165824 bytes
ASM diskgroups mounted
SQL>