ITPub博客

首页 > 数据库 > Oracle > ASM中磁盘组权限问题

ASM中磁盘组权限问题

原创 Oracle 作者:dingzihan 时间:2014-02-20 10:32:57 0 删除 编辑
昨天,在向ASM磁盘组backup中添加磁盘的时候,一直添加不了。报错如下:(从日志里将报错信息摘出来)
cd /oracle/app/grid/diag/asm/+asm/+ASM1/trace
SQL> alter diskgroup BACKUP add disk '/dev/mapper/backup1p1' 
ORA-15032: not all alterations performed
ORA-15031: disk specification '/dev/mapper/backup1p1' matches no disks
ORA-15025: could not open disk "/dev/mapper/backup1p1"
ORA-15056: additional error message
Linux-x86_64 Error: 13: Permission denied
Additional information: 42
Additional information: -448706944
ERROR: alter diskgroup BACKUP add disk '/dev/mapper/backup1p1'

将昨天的操作步骤简单回顾下:
1、停集群
cd /oracle/app/11.2/grid/bin
./crsctl stop cluster -all  --需要root权限执行
./crs_stat -t
2、fdisk /dev/mapper/backup1
 /sbin/partprobe /dev/mapper/backup1   (另一台也需要做)
在集群所以服务器上运行以下命令来加载已更新的块设备分区表/sbin/partprobe /dev/mapper/backup1(两台服务器都需要做)
总结:使用partprobe可以不用重启系统即可配合fdisk工具创建新的分区。
在/dev/mapper/下生产一个新的目录backup1p1

3、授权
chown -R oracle:oinstall /dev/mapper/backup*  (另一台也需要做)

4、启集群
cd /oracle/app/11.2/grid/bin
./crsctl start cluster -all  --需要root权限执行
./crs_stat -t

5、添加磁盘组
su - grid
sqlplus / as sysasm
alter diskgroup data add disk '/dev/mapper/backup1p1';

SQL> alter diskgroup BACKUP add disk '/dev/mapper/backup1p1';
alter diskgroup backup add disk '/dev/mapper/backup1p1'
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15031: disk specification '/dev/mapper/backup1p1' matches no disks
ORA-15025: could not open disk "/dev/mapper/backup1p1"
ORA-15056: additional error message
Linux-x86_64 Error: 13: Permission denied
Additional information: 42
Additional information: -953398608

后来在朋友的帮助下,修改了/dev/mapper/backup的属主,添加磁盘成功。
chown -R grid:asmadmini  /dev/mapper/backup*
alter diskgroup data add disk '/dev/mapper/backup1';   ----注意这里:添加的磁盘是backup1 ,而不是bachup1p1。
添加磁盘成功。


上午继续在网上查询大量资料,了解管理多路径下ASM磁盘权限问题,发现资料比较少,我决定把自己的操作过程记录下来。

[grid@RAC-2 mapper]$ ls -l backup*
lrwxrwxrwx 1 oracle oinstall 8 Jan 23 17:04 backup -> ../dm-38
lrwxrwxrwx 1 oracle oinstall 8 Jan 23 17:04 backup1 -> ../dm-42
lrwxrwxrwx 1 oracle oinstall 8 Feb 18 14:33 backup1p1 -> ../dm-55
lrwxrwxrwx 1 oracle oinstall 8 Jan 23 17:04 backup2 -> ../dm-39
lrwxrwxrwx 1 oracle oinstall 8 Feb 18 14:34 backup2p1 -> ../dm-56
lrwxrwxrwx 1 oracle oinstall 8 Jan 23 17:04 backup3 -> ../dm-27
lrwxrwxrwx 1 oracle oinstall 8 Feb 18 14:34 backup3p1 -> ../dm-57
lrwxrwxrwx 1 oracle oinstall 8 Jan 23 17:04 backup4 -> ../dm-35
lrwxrwxrwx 1 oracle oinstall 8 Feb 18 14:34 backup4p1 -> ../dm-58
lrwxrwxrwx 1 oracle oinstall 8 Jan 23 17:04 backup5 -> ../dm-32
lrwxrwxrwx 1 oracle oinstall 8 Jan 23 17:04 backup6 -> ../dm-31
lrwxrwxrwx 1 oracle oinstall 8 Jan 23 17:04 backupp1 -> ../dm-48
backup1p1 对应的dm-55
backup2p1 对应的dm-56
backup3p1 对应的dm-57
backup4p1 对应的dm-58  都属于root用户所有,难怪昨天磁盘怎么也加不了。疑惑在这儿?
在不同的属主下,下面两种方式添加的磁盘,对数据库有影响吗?效果一样吗?
chown -R oracle:oinstall /dev/mapper/backup*
alter diskgroup data add disk '/dev/mapper/backup1p1';
chown -R grid:asmadmini  /dev/mapper/backup*
alter diskgroup data add disk '/dev/mapper/backup1'; 
规范:在11g R2的ASM系统中(grid 和oracle用户),建议设置磁盘为:grid:asmadmin,  权限设置为660。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/22969361/viewspace-1084351/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2009-12-04

  • 博文量
    55
  • 访问量
    420934