oracle11g rac asm存储数据迁移

OS:rh6.4

ORACLE 11g RAC ASM

OCR和VOTING DISK在crs磁盘组,控制文件、数据文件、参数文件在DATA组。

1、备份数据库

RUN {
ALLOCATE CHANNEL ch00 DEVICE TYPE disk;
ALLOCATE CHANNEL ch01 DEVICE TYPE disk;
backup database filesperset 5 format '/u01/backup/bk_%d_%T%s_%p' ;
backup current controlfile format '/u01/backup/ctl_%d_%T_%s';
RELEASE CHANNEL ch00;
RELEASE CHANNEL ch01;
}


2、备份参数文件

3、停止监听

4、查看字符集、数据文件、用户等

SQL> select userenv('language') from dual;

USERENV('LANGUAGE')
----------------------------------------------------
AMERICAN_AMERICA.ZHS16GBK


TABLESPACE_NAME SUM_MB FREE_MB USE_PER
---------------- ---------- ---------- ----------
BUSIDATA 20480 20466 .07
PERFDATA 40000 39942 .14
RESDATA 10240 9389 8.31
STATISDATA 61440 61414 .04
SYSAUX 1754 565 67.77
SYSDATA 10240 10034 2.01
SYSTEM 1784 964 45.99
UNDOTBS1 950 880 7.41
UNDOTBS2 175 166 4.89
USERS 5 4 26.25

 

USERNAME DEFAULT_TABLESPACE
------------------------- -------------------------
SYS SYSTEM
SYSTEM SYSTEM
I6000_COL PERFDATA
I6000_PER PERFDATA
I6000_ALA PERFDATA
I6000_KNO SYSDATA
I6000_SYS SYSDATA
I6000_SAF RESDATA
I6000_RES RESDATA
I6000_DIS BUSIDATA
I6000_RUN BUSIDATA

USERNAME DEFAULT_TABLESPACE
------------------------- -------------------------
I6000_REP BUSIDATA
I6000_SER BUSIDATA
I6000_CBM BUSIDATA
I6000_DRM BUSIDATA
I6000_THI BUSIDATA
I6000_STA STATISDATA
OUTLN SYSTEM
MGMT_VIEW SYSTEM
FLOWS_FILES SYSAUX
MDSYS SYSAUX
ORDSYS SYSAUX

USERNAME DEFAULT_TABLESPACE
------------------------- -------------------------
EXFSYS SYSAUX
DBSNMP SYSAUX
WMSYS SYSAUX
APPQOSSYS SYSAUX
APEX_030200 SYSAUX
OWBSYS_AUDIT SYSAUX
ORDDATA SYSAUX
CTXSYS SYSAUX
ANONYMOUS SYSAUX
SYSMAN SYSAUX
XDB SYSAUX

USERNAME DEFAULT_TABLESPACE
------------------------- -------------------------
ORDPLUGINS SYSAUX
OWBSYS SYSAUX
SI_INFORMTN_SCHEMA SYSAUX
OLAPSYS SYSAUX
SCOTT USERS
ORACLE_OCM USERS
XS$NULL USERS
MDDATA USERS
DIP USERS
APEX_PUBLIC_USER USERS
SPATIAL_CSW_ADMIN_USR USERS

USERNAME DEFAULT_TABLESPACE
------------------------- -------------------------
SPATIAL_WFS_ADMIN_USR USERS

NAME
--------------------------------------------------------------------------------
+DATA/idb/datafile/system.256.883073683
+DATA/idb/datafile/sysaux.257.883073683
+DATA/idb/datafile/undotbs1.258.883073683
+DATA/idb/datafile/users.259.883073683
+DATA/idb/datafile/undotbs2.264.883073875
+DATA/idb/datafile/perfdata01.dbf
+DATA/idb/datafile/perfdata02.dbf
+DATA/idb/datafile/sysdata01.dbf
+DATA/idb/datafile/resdata01.dbf
+DATA/idb/datafile/busidata01.dbf
+DATA/idb/datafile/statisdata01.dbf

NAME
--------------------------------------------------------------------------------
+DATA/idb/datafile/statisdata02.dbf
+DATA/idb/datafile/system01.dbf
+DATA/idb/datafile/sysaux01.dbf

停止数据库,重启服务器

数据盘5块400G 4条路径
/dev/sdb
/dev/sdc
/dev/sdd
/dev/sde
/dev/sdf

/dev/sdl
/dev/sdm
/dev/sdn
/dev/sdo
/dev/sdp


/dev/sdah
/dev/sdai
/dev/sdaj
/dev/sdal
/dev/sdak


/dev/sdas
/dev/sdar
/dev/sdat
/dev/sdau
/dev/sdav

36845b1210033a20b214a9ea200000000
[root@orcl1 ~]# scsi_id -g -u /dev/sdc
36845b1210033a20b214a9f6b00000001
[root@orcl1 ~]# scsi_id -g -u /dev/sdd
36845b1210033a20b214a9fb400000002
[root@orcl1 ~]# scsi_id -g -u /dev/sde
36845b1210033a20b214aa00000000003
[root@orcl1 ~]# scsi_id -g -u /dev/sdf
36845b1210033a20b214aa04b00000004

CRS磁盘组3块4G大小,4条路径

/dev/sdi:
/dev/sdj:
/dev/sdk:

/dev/sds:
/dev/sdu:
/dev/sdt:

/dev/sdao:
/dev/sdap:
/dev/sdaq:

/dev/sday:
/dev/sdaz:
/dev/sdba:

[root@orcl1 ~]# scsi_id -g -u /dev/sdi
36845b1210033a20b2194051d0000000b
[root@orcl1 ~]# scsi_id -g -u /dev/sdj
36845b1210033a20b2194055e0000000c
[root@orcl1 ~]# scsi_id -g -u /dev/sdk
36845b1210033a20b219405a10000000d

两块500G归档 4条路径

/dev/sdg:
/dev/sdh:

/dev/sdq:
/dev/sdr:

/dev/sdam:
/dev/sdan:

/dev/sdaw:
/dev/sdax:
节点1:
36845b1210033a20b214b92ff00000007
[root@orcl1 ~]# scsi_id -g -u /dev/sdh
36845b1210033a20b214b934000000008

节点2:
36845b1210033a20b214b93a000000009
[root@orcl2 ~]# scsi_id -g -u /dev/sdh
36845b1210033a20b214b94150000000a

cd /etc/udev/rules.d
vi 99-oracle-asmdevices.rules

KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="36001438006489e470000500002d50000", NAME="asm-crs1", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="36001438006489e470000500002d90000", NAME="asm-crs2", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="36001438006489e470000500002dd0000", NAME="asm-crs3", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="36001438006489e470000500002c90000", NAME="asm-data1", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="36001438006489e470000500002cd0000", NAME="asm-data2", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="36001438006489e470000500002d10000", NAME="asm-data3", OWNER="grid", GROUP="asmadmin", MODE="0660"


两个节点添加(注意字符空格等信息):

KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="36845b1210033a20b214a9ea200000000", NAME="asm-data4", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="36845b1210033a20b214a9f6b00000001", NAME="asm-data5", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="36845b1210033a20b214a9fb400000002", NAME="asm-data6", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="36845b1210033a20b214aa00000000003", NAME="asm-data7", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="36845b1210033a20b214aa04b00000004", NAME="asm-data8", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="36845b1210033a20b2194051d0000000b", NAME="asm-crs4", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="36845b1210033a20b2194055e0000000c", NAME="asm-crs5", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="36845b1210033a20b219405a10000000d", NAME="asm-crs6", OWNER="grid", GROUP="asmadmin", MODE="0660"


start_udev

参看1638177.1

./ocrconfig -add +CRS_VOTE
./ocrconfig -delete +CRS
./crsctl replace votedisk +CRS_VOTE

SQL> create pfile='/tmp/init' from spfile;
SQL> create spfile='+CRS_VOTE' from pfile='/tmp/init';
./gpnptool get
alter diskgroup CRS_VOTE mount;

crsctl stop crs
crsctl start crs
srvctl add CRS_VOTE -g CRS


./crs_unregister ora.gsd
./crs_unregister ora.CRS.dg

 DATA组采用ASMCA图形化界面加盘再DROP老盘,ASM自动转移数据

数据迁移后清除踢出去的盘的UDEV配置信息

你可能感兴趣的:(oracle11g rac asm存储数据迁移)