ITPub博客

首页 > 数据库 > Oracle > 20140218_RAC ASM新增磁盘测试

20140218_RAC ASM新增磁盘测试

原创 Oracle 作者:gdutllf2006 时间:2014-02-18 17:24:33 0 删除 编辑

环境:Vmware+Redhat6.1 + Oracle11.2.0.3 + 3节点RAC + ASM


测试asm添加磁盘四种情况
第一种:节点3添加磁盘组后在节点1是否可以直接认出
--认不到,说明分配共享存储后节点的OS必须重启

第二种:节点3添加磁盘组后,节点1重启,认出共享盘但没绑定裸设备,是否能认出新的磁盘组
--认不到,说明OS重启,Raw绑定都是必须在所有节点上做的

第三种:节点3添加磁盘组后,节点1重启,认出共享盘,绑定裸设备,是否能认出新的磁盘组
--认不到,说明OS重启,Raw绑定,mount磁盘组都是必须在所有节点上做的

第四种:节点3添加磁盘组后,节点1提前绑定裸设备信息,重启服务器后能否直接认出新的磁盘组
--认不到,说明OS重启,Raw绑定,mount磁盘组都是必须在所有节点上做的,如果在OS重启前就提前绑定RAW,
那么Mount的动作是可以省略的,但最好确认下


一.节点3添加磁盘组后在节点1是否可以直接认出
1.添加共享盘
vmkfstools -c 1G -d   eagerzeroedthick /vmfs/volumes/DS01/diskarrayls/vocr5.vmdk -a lsilogic

绑定裸设备
vi /etc/rc.local 
/bin/raw /dev/raw/raw7  /dev/disk/by-id/scsi-36000c296397ade932d26e09836be18ad

2.3节点创建磁盘组
SQL> create diskgroup TEST_DATA external redundancy disk '/dev/raw/raw7';
Diskgroup created.
3.在节点三上查看磁盘的路径,可以看到新加入的磁盘组
col PATH for a40
select NAME,PATH from v$asm_disk;      
NAME                           PATH
------------------------------ ----------------------------------------
CRS_0003                       /dev/raw/raw6
CRS_0002                       /dev/raw/raw5
CRS_0001                       /dev/raw/raw4
DATA_0000                      /dev/raw/raw3
CRS_0000                       /dev/raw/raw2
FRA_0000                       /dev/raw/raw1
TEST_DATA_0000                 /dev/raw/raw7

[grid@add_node_test ~]$ asmcmd
ASMCMD> ls
CRS/
DATA/
FRA/
TEST_DATA/

7 rows selected.

4.在第一节点上查看,没有发现新的磁盘组和磁盘
SQL> select NAME,PATH from v$asm_disk;

NAME                           PATH
------------------------------ ----------------------------------------
CRS_0003                       /dev/raw/raw6
CRS_0002                       /dev/raw/raw5
CRS_0001                       /dev/raw/raw4
DATA_0000                      /dev/raw/raw3
CRS_0000                       /dev/raw/raw2
FRA_0000                       /dev/raw/raw1

[grid@esxi1v01 ~]$ asmcmd
ASMCMD> ls
CRS/
DATA/
FRA/

节点3上检查asm相关日志发现有相关报错的信息
磁盘组创建成功,但信息无法再rac里面跟新,因为其余rac节点没有添加到新的共享盘
@linlf ???这是什么意思?
NOTE: diskgroup resource ora.TEST_DATA.dg is online
SUCCESS: create diskgroup TEST_DATA external redundancy disk '/dev/raw/raw7'
ERROR: failed to update diskgroup resource ora.TEST_DATA.dg

5.新加表空间测试
节点3:添加成功,新加入磁盘组可以使用
SYS@test3 SQL>create tablespace asm_test3 datafile'+TEST_DATA/asm_test3.dbf' size 10m;
Tablespace created.
节点3告警日志
Tue Feb 18 14:21:48 2014
create tablespace asm_test datafile'+TEST_DATA/asm_test.dbf' size 10m
SUCCESS: diskgroup TEST_DATA was mounted

节点1:找不到路径
SYS@test1 SQL>create tablespace asm_test2 datafile'+TEST_DATA/asm_test2.dbf' size 10m;
create tablespace asm_test2 datafile'+TEST_DATA/asm_test2.dbf' size 10m
*
ERROR at line 1:
ORA-01119: error in creating database file '+TEST_DATA/asm_test2.dbf'
ORA-17502: ksfdcre:4 Failed to create file +TEST_DATA/asm_test2.dbf
ORA-15001: diskgroup "TEST_DATA" does not exist or is not mounted
ORA-15001: diskgroup "TEST_DATA" does not exist or is not mounted
节点1告警日志
Tue Feb 18 14:21:39 2014
ORA-17503: ksfdopn:2 Failed to open file +TEST_DATA/asm_test.dbf
ORA-15001: diskgroup "TEST_DATA" does not exist or is not mounted
ORA-15001: diskgroup "TEST_DATA" does not exist or is not mounted
Errors in file /oracle/app/oracle/diag/rdbms/test/test1/trace/test1_dbw0_9770.trc:
ORA-01186: file 22 failed verification tests

二.节点3添加磁盘组后,节点1重启,认出共享盘但没绑定裸设备,是否能认出新的磁盘组
重启节点1服务器后新加入磁盘组出现 但没有绑定裸设备
此时查看下asm依然是无法识别
[grid@esxi1v01 ~]$ asmcmd
ASMCMD> ls
CRS/
DATA/
FRA/

 


三.节点3添加磁盘组后,节点1重启,认出共享盘,绑定裸设备,是否能认出新的磁盘组
在集群启动的情况下绑定好裸设备查看,新的磁盘组任然未显示出来
@linlf --需要mount

[root@esxi1v01 raw]# ls
raw1  raw2  raw3  raw4  raw5  raw6  raw7  rawctl
[grid@esxi1v01 ~]$ asmcmd
ASMCMD> ls
CRS/
DATA/
FRA/

查看磁盘情况已经认出了新增磁盘
col PATH for a40
select name,state,path from v$asm_disk;
SQL> select name,state,path from v$asm_disk;

NAME                           STATE    PATH
------------------------------ -------- ----------------------------------------
                               NORMAL   /dev/raw/raw7
CRS_0003                       NORMAL   /dev/raw/raw6
CRS_0002                       NORMAL   /dev/raw/raw5
CRS_0001                       NORMAL   /dev/raw/raw4
DATA_0000                      NORMAL   /dev/raw/raw3
CRS_0000                       NORMAL   /dev/raw/raw2
FRA_0000                       NORMAL   /dev/raw/raw1

查看磁盘组情况 还是没有mount的状态
SQL> select NAME,TYPE,STATE from v$asm_diskgroup;

NAME                           TYPE   STATE
------------------------------ ------ -----------
CRS                            EXTERN MOUNTED
DATA                           EXTERN MOUNTED
FRA                            EXTERN MOUNTED
TEST_DATA                             DISMOUNTED


手动mount磁盘组
SQL> alter diskgroup TEST_DATA  mount;

Diskgroup altered.

查看状态OK
SQL> select NAME,TYPE,STATE from v$asm_diskgroup;

NAME                           TYPE   STATE
------------------------------ ------ -----------
CRS                            EXTERN MOUNTED
DATA                           EXTERN MOUNTED
FRA                            EXTERN MOUNTED
TEST_DATA                      EXTERN MOUNTED

测试在新磁盘组上添加表空间 成功
SYS@test1 SQL>create tablespace asm_test2 datafile'+TEST_DATA/asm_test2.dbf' size 10m;

Tablespace created.

四.节点3添加磁盘组后,节点1提前绑定裸设备信息,重启服务器后能否直接认出新的磁盘组
系统重启先 添加以下信息
vi /etc/rc.local 
/bin/raw /dev/raw/raw7  /dev/disk/by-id/scsi-36000c296397ade932d26e09836be18ad

重启后查看新增磁盘状态

SQL> select NAME,TYPE,STATE from v$asm_diskgroup;

NAME                           TYPE   STATE
------------------------------ ------ -----------
CRS                            EXTERN MOUNTED
DATA                           EXTERN MOUNTED
FRA                            EXTERN MOUNTED
TEST_DATA                      EXTERN MOUNTED

测试新增磁盘组是否可用
SQL> create tablespace asm_test3 datafile'+TEST_DATA/asm_test3.dbf' size 10m;

Tablespace created.

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

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

注册时间:2009-07-08

  • 博文量
    133
  • 访问量
    388517