如何在linux 10gR2 rac 新增ASM磁碟組

paulyibinyi發表於2008-06-27

1.需要對新增加的裝置在每個節點進行授權 使oracle使用者能操作

[root@rac1 oracle]# chown oracle:dba /dev/raw/raw6
[root@rac1 oracle]# chmod 660 /dev/raw/raw6

[root@rac2 oracle]# chown oracle:dba /dev/raw/raw6
[root@rac2 oracle]# chmod 660 /dev/raw/raw6

2.oracle使用者掃描磁碟路徑 能讓asm認到裝置

select path from v$asm_disk;

設定asm裝置搜尋路徑

alter system set asm_diskstring='ORCL:VOL*','/dev/raw/raw*';

3.在rac1節點進行操作

[oracle@rac1 ~]$ export ORACLE_SID=+ASM1

[oracle@rac1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Fri Jun 27 09:03:28 2008

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


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options

SQL>  select group_number,name,state,total_mb from v$asm_diskgroup;

GROUP_NUMBER NAME                           STATE         TOTAL_MB
------------ ------------------------------ ----------- ----------
           2 DATA                           MOUNTED           3057

SQL> create diskgroup testdg external redundancy disk '/dev/raw/raw6';

Diskgroup created.

SQL> select group_number,name,state,total_mb from v$asm_diskgroup;

GROUP_NUMBER NAME                           STATE         TOTAL_MB
------------ ------------------------------ ----------- ----------
           1 TESTDG                         MOUNTED           2047
           2 DATA                           MOUNTED           3057

SQL> exit


4.在rac2節點進行操作

[oracle@rac2 dbs]$ export ORACLE_SID=+ASM2
[oracle@rac2 dbs]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.1.0 - Production on Fri Jun 27 09:08:26 2008

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


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options

SQL> select group_number,name,state,total_mb from v$asm_diskgroup;

GROUP_NUMBER NAME                           STATE         TOTAL_MB
------------ ------------------------------ ----------- ----------
           2 DATA                           MOUNTED           3057

SQL> alter diskgroup testdg mount;
alter diskgroup testdg mount
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15063: ASM discovered an insufficient number of disks for diskgroup
"TESTDG"

這是因為沒在節點2進行授權 所以報這個錯 按照1點 進行授權後就正常了
SQL> select group_number,name,state,total_mb from v$asm_diskgroup;

GROUP_NUMBER NAME                           STATE         TOTAL_MB
------------ ------------------------------ ----------- ----------
           0 TESTDG                         DISMOUNTED           0
           2 DATA                           MOUNTED           3057

SQL> alter diskgroup testdg mount;

Diskgroup altered.

SQL> select group_number,name,state,total_mb from v$asm_diskgroup;

GROUP_NUMBER NAME                           STATE         TOTAL_MB
------------ ------------------------------ ----------- ----------
           1 TESTDG                         MOUNTED           2047
           2 DATA                           MOUNTED           3057

SQL>

 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7199859/viewspace-366108/,如需轉載,請註明出處,否則將追究法律責任。

相關文章