Oracle RAC 更换存储处理过程

目标:Oracle RAC系统更换共享存储,由HUAWEI存储更换为IBM存储。

计划步骤:

1.根据现有的LUN的数量及大小,从IBM新分配LUN;

2.使用Oracle的工具(asmca或OEM),从磁盘组层面替换磁盘;

遇到的问题:

在给磁盘组添加磁盘时,系统报错,不能添加磁盘。于是测试使用新的IBM磁盘创建磁盘组,报错,alert.log中的内容如下:

SQL> CREATE DISKGROUP testgroup EXTERNAL REDUNDANCY  DISK '/dev/mapper/asmdisk_0a' SIZE 307200M  ATTRIBUTE 'compatible.asm'='11.2.0.0.0','au_size'='1M' /* ASMCA */
NOTE: Assigning number (2,0) to disk (/dev/mapper/asmdisk_0a)
NOTE: initializing header on grp 2 disk TESTGROUP_0000
WARNING: detected duplicate paths to the same disk:
  '/dev/mapper/asmdisk_0a' and
  '/dev/dm-2'
More trace information dumped to '/oracle/app/oracle/diag/asm/+asm/+ASM1/trace/+ASM1_ora_60504.trc'
NOTE: erasing header on grp 2 disk TESTGROUP_0000
GMON dismounting group 2 at 40 for pid 37, osid 60504
NOTE: Disk  in mode 0x8 marked for de-assignment
ERROR: diskgroup TESTGROUP was not created
ORA-15018: diskgroup cannot be created
ORA-15020: discovered duplicate ASM disk "TESTGROUP_0000"
ERROR: CREATE DISKGROUP testgroup EXTERNAL REDUNDANCY  DISK '/dev/mapper/asmdisk_0a' SIZE 307200M  ATTRIBUTE 'compatible.asm'='11.2.0.0.0','au_size'='1M' /* ASMCA */

由此可知由于系统检查到 '/dev/mapper/asmdisk_0a' 和  '/dev/dm-2'时相同的磁盘,从而导致不能创建磁盘组。
原因在于ASM数据库的asm_diskstring的值时/dev/*,/dev/mapper/*,所以能搜索到'/dev/mapper/asmdisk_0a' 和  '/dev/dm-2'


处理方法:
指定asm_diskstring的值为/dev/mapper/*,使系统只能搜索到/dev/mapper/下的磁盘。


处理步骤:

1.检查原华为磁盘的路径,建立链接连接到/dev/mapper/下。
ASMCMD> lsdsk     
Path
/dev/sdan1
/dev/sdao1
/dev/sdap1
/dev/sdaq1
/dev/sdar1
/dev/sdas1
/dev/sdat1
/dev/sdau1
/dev/sdav1
/dev/sdaw1
/dev/sdax1
/dev/sday1
/dev/sdaz1
/dev/sdba1
/dev/sdbb1
/dev/sdbc1
/dev/sdbd1
/dev/sdbe1
/dev/sdbf1

#建立链接
ln /dev/sdan1 /dev/mapper/huawei_sdan1
ln /dev/sdao1 /dev/mapper/huawei_sdao1
ln /dev/sdap1 /dev/mapper/huawei_sdap1
ln /dev/sdaq1 /dev/mapper/huawei_sdaq1
ln /dev/sdar1 /dev/mapper/huawei_sdar1
ln /dev/sdas1 /dev/mapper/huawei_sdas1
ln /dev/sdat1 /dev/mapper/huawei_sdat1
ln /dev/sdau1 /dev/mapper/huawei_sdau1
ln /dev/sdav1 /dev/mapper/huawei_sdav1
ln /dev/sdaw1 /dev/mapper/huawei_sdaw1
ln /dev/sdax1 /dev/mapper/huawei_sdax1
ln /dev/sday1 /dev/mapper/huawei_sday1
ln /dev/sdaz1 /dev/mapper/huawei_sdaz1
ln /dev/sdba1 /dev/mapper/huawei_sdba1
ln /dev/sdbb1 /dev/mapper/huawei_sdbb1
ln /dev/sdbc1 /dev/mapper/huawei_sdbc1
ln /dev/sdbd1 /dev/mapper/huawei_sdbd1
ln /dev/sdbe1 /dev/mapper/huawei_sdbe1
ln /dev/sdbf1 /dev/mapper/huawei_sdbf1


2.修改asm实例的参数asm_diskstring使只搜索/dev/mapper目录。
alter system set asm_diskstring="/dev/mapper/*" scope=spfile;


3.重新启动集群,系统自动变更磁盘的路径。


4.使用em或asmca或脚本添加IBM磁盘,移去华为磁盘。



你可能感兴趣的:(Oracle RAC 更换存储处理过程)