在Oracle10g RAC环境下,对ASM磁盘组的修改应当极为谨慎。如果设置不当极易导致其他节点宕机。
在创建ASM磁盘组之前,需要先对设备文件进行授权,这个步骤一定需要在RAC的不同节点都作。
其次,不同节点的设备文件最好相同。
bash-2.05# chown oracle:dba /dev/rdsk/c2t0d3*
bash-2.05# chmod 660 /dev/rdsk/c2t0d3*
然后在Oracle用户下,修改磁盘扫描路径,可以发现新的磁盘已经被识别:
SQL> select path from v$asm_disk;
PATH
--------------------------------------------------------------------------------
/dev/vx/rdsk/10gracdg/asmdata
SQL> show parameter string
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
asm_diskstring string /dev/vx/rdsk/10gracdg/asmdata
SQL> alter system set asm_diskstring='/dev/vx/rdsk/10gracdg/asmdata','/dev/rdsk/*';
System altered.
SQL> show parameter string
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
asm_diskstring string /dev/vx/rdsk/10gracdg/asmdata,
/dev/rdsk/*
SQL> select path from v$asm_disk;
PATH
--------------------------------------------------------------------------------
/dev/rdsk/c2t0d3s1
/dev/rdsk/c2t0d3s6
/dev/vx/rdsk/10gracdg/asmdata
要确认在不同节点,磁盘都能够被正确识别,然后可以创建ASM磁盘组:
SQL> create diskgroup testdg external redundancy disk '/dev/rdsk/c2t0d3s6';
Diskgroup created.
SQL> select group_number,name,state,total_mb from v$asm_diskgroup;
GROUP_NUMBER NAME STATE TOTAL_MB
------------ ------------------------------ ----------- ----------
1 ORADG MOUNTED 16384
2 TESTDG MOUNTED 927
然后可以在另外的节点手工挂接新的磁盘组:
SQL> select group_number,name,state,total_mb from v$asm_diskgroup;
GROUP_NUMBER NAME STATE TOTAL_MB
------------ ------------------------------ ----------- ----------
1 ORADG MOUNTED 16384
0 TESTDG DISMOUNTED 0
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 ORADG MOUNTED 16384
2 TESTDG MOUNTED 927
以上操作来自Solaris平台,不同平台步骤可能不同,操作有风险,动作须谨慎。
阅读(231) | 评论(0) | 转发(0) |