Oracle 11gR2 RAC add ASM disk

本文介绍了如何使用Oracle的Automatic Storage Management (ASM)进行磁盘组的管理操作,包括查询当前磁盘组信息、添加新的磁盘到指定磁盘组、调整磁盘组中的数据分布等。文中还详细展示了如何解决权限问题并正确执行这些操作。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Use "grid" user inquires the current diskgroup,disk.

[grid@node1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.3.0 Production on Mon Jan 7 15:33:06 2013

Copyright (c) 1982, 2011, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options

SQL> set lines 150
SQL> col failgroup format a15
SQL> col name format a20
SQL> col path format a20
SQL> alter session set nls_date_format='yyyy-mm-dd hh24:mi:ss';

Session altered.

SQL> select disk_number,failgroup,create_date,path,name from v$asm_disk;

DISK_NUMBER FAILGROUP	    CREATE_DATE 	PATH		     NAME
----------- --------------- ------------------- -------------------- --------------------
	  1					/dev/asm-diske
	  0 DATADG_0000     2013-01-04 16:31:06 /dev/asm-diskc	     DATADG_0000
	  0 CRS_0000	    2013-01-04 16:15:51 /dev/asm-diskb	     CRS_0000
	  0 FRADG_0000	    2013-01-04 16:31:40 /dev/asm-diskd	     FRADG_0000

SQL> show parameter instance_name

NAME				     TYPE		    VALUE
------------------------------------ ---------------------- ------------------------------
instance_name			     string		    +ASM1
SQL> select name from v$asm_diskgroup;

NAME
--------------------
CRS
DATADG
FRADG

Add disk "/dev/asm-diske" to "FRADG" diskgroup.

SQL> alter diskgroup fradg add disk '/dev/asm-diske';
alter diskgroup fradg add failgroup FRADG_0001 disk '/dev/asm-diske'
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15260: permission denied on ASM disk group
SQL> !oerr ora 15032
15032, 00000, "not all alterations performed"
// *Cause:  At least one ALTER DISKGROUP action failed.
// *Action: Check the other messages issued along with this summary error.
//

SQL> !oerr ora 15260
15260, 00000, "permission denied on ASM disk group"
// *Cause:  An attempt was made to perform an operation on an ASM disk
//          group without the appropriate privileges.
//
// *Action: Ask the ASM administrator to perform the operation or grant
//          the required privileges.
//

SYSASM privilege is used for carrying out administration tasks on ASM Diskgroups. SYSDBA privilege can be used only for creating/deleting aliases and querying ASM dictionary views.

[grid@node1 ~]$ sqlplus / as sysasm

SQL*Plus: Release 11.2.0.3.0 Production on Mon Jan 7 15:55:51 2013

Copyright (c) 1982, 2011, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options

SQL> alter diskgroup fradg add disk '/dev/asm-diske';

Diskgroup altered.

SQL> alter session set nls_date_format='yyyy-mm-dd hh24:mi:ss';

Session altered.

SQL> col path format a20
SQL> col name format a20
SQL> col failgroup format a15
SQL> set lines 150
SQL> select disk_number,failgroup,create_date,path,name from v$asm_disk;

DISK_NUMBER FAILGROUP	    CREATE_DATE 	PATH		     NAME
----------- --------------- ------------------- -------------------- --------------------
	  0 DATADG_0000     2013-01-04 16:31:06 /dev/asm-diskc	     DATADG_0000
	  1 FRADG_0001	    2013-01-07 15:56:10 /dev/asm-diske	     FRADG_0001
	  0 CRS_0000	    2013-01-04 16:15:51 /dev/asm-diskb	     CRS_0000
	  0 FRADG_0000	    2013-01-04 16:31:40 /dev/asm-diskd	     FRADG_0000

The average data distribution to the new added ASM disk.

SQL> alter diskgroup fradg rebalance;

Diskgroup altered.

SQL> select * from v$asm_operation;

no rows selected

SQL> /

no rows selected

SQL> 



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值