Oracle RAC 迁移解决方案(存储迁移)
raw /dev/raw/raw15 /dev/mapper/mpath10
raw /dev/raw/raw16 /dev/mapper/mpath11
raw /dev/raw/raw17 /dev/mapper/mpath14
raw /dev/raw/raw18 /dev/mapper/mpath15
raw /dev/raw/raw19 /dev/mapper/mpath16
raw /dev/raw/raw20 /dev/mapper/mpath12
raw /dev/raw/raw21 /dev/mapper/mpath17
Check:
raw -a
ll /dev/raw
vi /etc/udev/rules.d/60-raw.rules
KERNEL=="raw[15-16]*", OWNER="root", GROUP="oinstall",MODE="775"
KERNEL=="raw[17-21]*", OWNER="oracle", GROUP="oinstall",MODE="775"
二、在线迁移数据文件、Redo Log & Archive Log
2.1DBCA创建ASM磁盘组
export ORACLE_SID=+ASM1
sqlplus / as sysdba
create diskgroup ORADATA external redundancy disk '/dev/raw/raw20';
Diskgroup created.
create diskgroup ARCHIVE external redundancy disk '/dev/raw/raw21';
Diskgroup created.
(另一节点Mount新建DiskGroup
Alter diskgroup ORADATA mount;
Alter diskgroup archive mount;)
2.2添加磁盘组到ASM参数文件(两节点编辑参数文件)
vi /u01/app/oracle/product/10.2.0/db_1/dbs/init+ASM1.ora
asm_diskgroups='ORADATA','ARCHIVE','ORADATA1','ARCHIVE1'
2.3拷贝DATAFILE到新的磁盘组
DataBase cmesrel
select 'copy datafile '||''''||file_name||''''||' to '||''''||'+ORADATA/'||''';' from dba_data_files;
产生脚本文件,考虑到在不影响生产的情况下,采用一个进程处理,不开启并行拷